about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-04-26 09:08:15 +0200
committerAlan Pearce2023-04-26 09:19:20 +0200
commit402d85094185554d6150d6dfd6e76683abf7b663 (patch)
tree2834c26b32cf34e809506c51e6f6ab53e7dc3c9b
parenta803508850bb890de5caabda9bbc1552666da6f2 (diff)
downloadzola-bearblog-402d85094185554d6150d6dfd6e76683abf7b663.tar.lz
zola-bearblog-402d85094185554d6150d6dfd6e76683abf7b663.tar.zst
zola-bearblog-402d85094185554d6150d6dfd6e76683abf7b663.zip
Move header/footer/main elements into child templates
The <content> tag is not meant for normal HTML, but rather the Shadow
DOM, therefore I replaced it with <main>

For consistency's sake I moved <header> and <footer> into the child
templates as well
-rw-r--r--templates/base.html12
-rw-r--r--templates/footer.html8
-rw-r--r--templates/header.html10
-rw-r--r--templates/index.html4
-rw-r--r--templates/page.html4
-rw-r--r--templates/section.html4
-rw-r--r--templates/style.html2
-rw-r--r--templates/taxonomy_list.html4
-rw-r--r--templates/taxonomy_single.html4
9 files changed, 25 insertions, 27 deletions
diff --git a/templates/base.html b/templates/base.html
index 70b7224..973abdd 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -16,15 +16,9 @@
   {% include "custom_head.html" ignore missing -%}
 </head>
 <body>
-  <header>
-    {% include "header.html" ignore missing -%}
-  </header>
-  <main>
-    {% block main %}{%- endblock -%}
-  </main>
-  <footer>
-    {% include "footer.html" ignore missing -%}
-  </footer>
+  {% include "header.html" ignore missing -%}
+  {% block main %}{%- endblock -%}
+  {% include "footer.html" ignore missing -%}
   {% include "custom_body.html" ignore missing -%}
 </body>
 </html>
diff --git a/templates/footer.html b/templates/footer.html
index d0db8c7..97b096b 100644
--- a/templates/footer.html
+++ b/templates/footer.html
@@ -1,3 +1,5 @@
-{% if not config.extra.hide_made_with_line %}
-  Made with <a href="https://codeberg.org/alanpearce/zola-bearblog">Zola ʕ•ᴥ•ʔ Bear</a>
-{% endif %}
+<footer>
+  {% if not config.extra.hide_made_with_line %}
+    Made with <a href="https://codeberg.org/alanpearce/zola-bearblog">Zola ʕ•ᴥ•ʔ Bear</a>
+  {% endif %}
+</footer>
diff --git a/templates/header.html b/templates/header.html
index 64c79f0..db5b921 100644
--- a/templates/header.html
+++ b/templates/header.html
@@ -1,4 +1,6 @@
-<a href="{{ config.base_url }}" class="title">
-  <h2>{{ config.title }}</h2>
-</a>
-<nav>{% include "nav.html" %}</nav>
+<header>
+  <a href="{{ config.base_url }}" class="title">
+    <h2>{{ config.title }}</h2>
+  </a>
+  <nav>{% include "nav.html" %}</nav>
+</header>
diff --git a/templates/index.html b/templates/index.html
index 519bf5f..6caf1d5 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,7 +1,7 @@
 {% extends "base.html" %}
 
 {% block main %}
-  <content>
+  <main>
     {{ section.content | safe }}
-  </content>
+  </main>
 {% endblock %}
diff --git a/templates/page.html b/templates/page.html
index 12f0603..baf6c09 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -17,9 +17,9 @@
       </p>
     {%- endif %}
   {%- endif %}
-  <content>
+  <main>
     {{ page.content | safe }}
-  </content>
+  </main>
   <p>
     {%- if page.taxonomies %}
       {%- for name, taxon in page.taxonomies %}
diff --git a/templates/section.html b/templates/section.html
index ed9fd77..e596ffb 100644
--- a/templates/section.html
+++ b/templates/section.html
@@ -1,7 +1,7 @@
 {% extends "base.html" %}
 
 {% block main %}
-  <content>
+  <main>
     {%- if taxonomy.term %}
       <h3 style="margin-bottom:0">Filtering for "{{ section.title }}"</h3>
       <small>
@@ -34,5 +34,5 @@
         {% endfor %}
       </div>
     </small>
-  </content>
+  </main>
 {% endblock %}
diff --git a/templates/style.html b/templates/style.html
index 1ccc971..61bbd42 100644
--- a/templates/style.html
+++ b/templates/style.html
@@ -49,7 +49,7 @@
     font-size: 16px;
   }
 
-  content {
+  main,article {
     line-height: 1.6;
   }
 
diff --git a/templates/taxonomy_list.html b/templates/taxonomy_list.html
index ef28c58..69d9fa2 100644
--- a/templates/taxonomy_list.html
+++ b/templates/taxonomy_list.html
@@ -1,7 +1,7 @@
 {% extends "base.html" %}
 
 {% block main %}
-  <content>
+  <main>
     <small>
       <div>
         {% set tags = get_taxonomy(kind="tags") %}
@@ -10,5 +10,5 @@
         {% endfor %}
       </div>
     </small>
-  </content>
+  </main>
 {% endblock %}
diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html
index 460679d..d5712b0 100644
--- a/templates/taxonomy_single.html
+++ b/templates/taxonomy_single.html
@@ -1,7 +1,7 @@
 {% extends "base.html" %}
 
 {% block main %}
-  <content>
+  <main>
     {%- if taxonomy.term %}
       <h3 style="margin-bottom:0">Filtering for "{{ term.name }}"</h3>
       <small>
@@ -26,5 +26,5 @@
         </li>
       {% endfor %}
     </ul>
-  </content>
+  </main>
 {% endblock %}