all repos — homestead @ 1e0b5b86c034d6205aa1ba1ff42bc40b9f60cf63

Code for my website

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

Alan Pearce
commit

1e0b5b86c034d6205aa1ba1ff42bc40b9f60cf63

parent

b95136c7d0647c1544ab9ff0408dfe2c9ac06845

M templates/base.htmltemplates/base.html
@@ -16,15 +16,9 @@ {% include "style.html" ignore missing -%}
{% 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>
M templates/footer.htmltemplates/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>
M templates/header.htmltemplates/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>
M templates/index.htmltemplates/index.html
@@ -1,7 +1,7 @@
{% extends "base.html" %} {% block main %} - <content> + <main> {{ section.content | safe }} - </content> + </main> {% endblock %}
M templates/page.htmltemplates/page.html
@@ -17,9 +17,9 @@ </i>
</p> {%- endif %} {%- endif %} - <content> + <main> {{ page.content | safe }} - </content> + </main> <p> {%- if page.taxonomies %} {%- for name, taxon in page.taxonomies %}
M templates/section.htmltemplates/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 @@ <a href="{{ post.permalink }}">#{{ post.name }}</a>&nbsp;
{% endfor %} </div> </small> - </content> + </main> {% endblock %}
M templates/style.htmltemplates/style.html
@@ -49,7 +49,7 @@ input {
font-size: 16px; } - content { + main,article { line-height: 1.6; }
M templates/taxonomy_list.htmltemplates/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 @@ <a href="{{ post.permalink }}">#{{ post.name }}</a>&nbsp;
{% endfor %} </div> </small> - </content> + </main> {% endblock %}
M templates/taxonomy_single.htmltemplates/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 @@ No posts yet
</li> {% endfor %} </ul> - </content> + </main> {% endblock %}