summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2024-11-11 12:05:32 -0500
committersowgro <tpoke.ferrari@gmail.com>2024-11-11 12:05:32 -0500
commitb5504afc21e0c67ee85a5ebadd772e8bd0272897 (patch)
tree3ccddd43a7bdc21ce7948b51fe0f8e7e174283fa /templates
parent47a552230db8828cafc8c97e4b7744063736e58f (diff)
downloadgrav-sowtheme-b5504afc21e0c67ee85a5ebadd772e8bd0272897.tar.gz
grav-sowtheme-b5504afc21e0c67ee85a5ebadd772e8bd0272897.tar.bz2
grav-sowtheme-b5504afc21e0c67ee85a5ebadd772e8bd0272897.zip
Create grid layout
Diffstat (limited to 'templates')
-rw-r--r--templates/directory.html.twig12
-rw-r--r--templates/grid.html.twig37
-rw-r--r--templates/partials/list.html.twig9
3 files changed, 47 insertions, 11 deletions
diff --git a/templates/directory.html.twig b/templates/directory.html.twig
index 6903f08..9cd1372 100644
--- a/templates/directory.html.twig
+++ b/templates/directory.html.twig
@@ -1,6 +1,6 @@
<!DOCTYPE html>
{% do assets.addCss('theme://css/website.css', 100) %}
-<html>
+<html lang="en">
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
@@ -15,7 +15,15 @@
<div class="center">
<div class="content">
{{ page.content|raw }}
- {% include 'partials/list.html.twig' %}
+ <ul>
+ {% for current_page in page.children %}
+ <li>
+ <a href="{{ current_page.url|e }}">
+ {{ current_page.title|e }}
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
{% include 'partials/navigation.html.twig' %}
</div>
</div>
diff --git a/templates/grid.html.twig b/templates/grid.html.twig
new file mode 100644
index 0000000..05c1122
--- /dev/null
+++ b/templates/grid.html.twig
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+{% do assets.addCss('theme://css/website.css', 100) %}
+<html lang="en">
+ <head>
+ <link rel="preconnect" href="https://fonts.googleapis.com">
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ {{ assets.css()|raw }}
+ {{ assets.js()|raw }}
+ <title>{{ header.title|e }} - {{site.title|e}}</title>
+ </head>
+ <body>
+ {% include 'partials/header.html.twig' %}
+ <div class="center">
+ <div class="content">
+ {{ page.content|raw }}
+ <ul>
+ {% for current_page in page.children %}
+ <li>
+ <a href="{{ current_page.url|e }}">
+ <div>
+ {{ page.media.images|first }}
+ {{ current_page.title|e }}
+ </div>
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+ {% include 'partials/navigation.html.twig' %}
+ </div>
+ </div>
+ <div class=footer>
+ <span title="Last Edited">{{ header.date|e }}</span>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/templates/partials/list.html.twig b/templates/partials/list.html.twig
deleted file mode 100644
index eb2f485..0000000
--- a/templates/partials/list.html.twig
+++ /dev/null
@@ -1,9 +0,0 @@
-<ul>
- {% for current_page in page.children %}
- <li>
- <a href="{{ current_page.url|e }}">
- {{ current_page.title|e }}
- </a>
- </li>
- {% endfor %}
-</ul>