all repos — zola-bearblog @ c78a3f2301caa3dc4c03d3b2a75f4f003e5863d0

Port of bear blog theme to zola

Reformat templates

Alan Pearce
commit

c78a3f2301caa3dc4c03d3b2a75f4f003e5863d0

parent

4df500c33f3d3ba7b9387a2bc0447850a04d15c8

M templates/404.htmltemplates/404.html
@@ -3,6 +3,6 @@
{% block title %}404{% endblock %} {% block main %} -<h1>404</h1> -<h2>ʕノ•ᴥ•ʔノ ︵ ┻━┻</h2> + <h1>404</h1> + <h2>ʕノ•ᴥ•ʔノ ︵ ┻━┻</h2> {% endblock %}
M templates/base.htmltemplates/base.html
@@ -11,7 +11,7 @@ <meta name="referrer" content="no-referrer-when-downgrade" />
{%- if config.generate_feed %} {% block rss -%} <link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="{{ get_url(path=config.feed_filename) | safe }}"> - {% endblock -%} + {%- endblock -%} {%- endif %} {% include "style.html" ignore missing -%} {% include "custom_head.html" ignore missing -%}
M templates/favicon.htmltemplates/favicon.html
@@ -1,3 +1,3 @@
{% if config.extra.favicon %} <link rel="shortcut icon" href="{{ config.extra.favicon }}" /> -{%- endif %} +{%- endif -%}
M templates/footer.htmltemplates/footer.html
@@ -1,3 +1,3 @@
{% if not config.extra.hide_made_with_line %} -Made with <a href="https://codeberg.org/alanpearce/zola-bearblog">Zola ʕ•ᴥ•ʔ Bear</a> + Made with <a href="https://codeberg.org/alanpearce/zola-bearblog">Zola ʕ•ᴥ•ʔ Bear</a> {% endif %}
M templates/index.htmltemplates/index.html
@@ -1,7 +1,7 @@
{% extends "base.html" %} {% block main %} -<content> - {{ section.content | safe }} -</content> + <content> + {{ section.content | safe }} + </content> {% endblock %}
M templates/nav.htmltemplates/nav.html
@@ -1,10 +1,10 @@
<a href="{{ config.base_url }}">Home</a> {%- if config.extra.main_menu %} -{%- for item in config.extra.main_menu %} -{%- if item.url is matching("https?://") %} -<a href="{{ item.url }}">{{ item.name }}</a> -{%- else %} -<a href="{{ get_url(path=item.url )}}">{{ item.name }}</a> -{%- endif %} -{%- endfor %} + {%- for item in config.extra.main_menu %} + {%- if item.url is matching("https?://") %} + <a href="{{ item.url }}">{{ item.name }}</a> + {%- else %} + <a href="{{ get_url(path=item.url )}}">{{ item.name }}</a> + {%- endif %} + {%- endfor %} {%- endif %}
M templates/page.htmltemplates/page.html
@@ -5,29 +5,29 @@ {{ page.title }} | {{ super() }}
{% endblock %} {% block main %} -{%- if not page.extra.menu %} -<h1>{{ page.title }}</h1> -{%- if page.date %} -<p> - <i> - <time datetime='{{ page.date | date(format='%+') }}' pubdate> - {{ page.date | date(format=config.extra.date_format) }} - </time> - </i> -</p> -{%- endif %} -{%- endif %} -<content> - {{ page.content | safe }} -</content> -<p> - {%- if page.taxonomies %} - {%- for name, taxon in page.taxonomies %} - {{ name | capitalize }}: - {%- for item in taxon %} - <a href="{{ get_taxonomy_url(kind=name, name=item) }}">#{{ item }}</a> - {%- endfor %} - {%- endfor %} + {%- if not page.extra.menu %} + <h1>{{ page.title }}</h1> + {%- if page.date %} + <p> + <i> + <time datetime='{{ page.date | date(format='%+') }}' pubdate> + {{ page.date | date(format=config.extra.date_format) }} + </time> + </i> + </p> + {%- endif %} {%- endif %} -</p> + <content> + {{ page.content | safe }} + </content> + <p> + {%- if page.taxonomies %} + {%- for name, taxon in page.taxonomies %} + {{ name | capitalize }}: + {%- for item in taxon %} + <a href="{{ get_taxonomy_url(kind=name, name=item) }}">#{{ item }}</a> + {%- endfor %} + {%- endfor %} + {%- endif %} + </p> {% endblock %}
M templates/section.htmltemplates/section.html
@@ -1,38 +1,38 @@
{% extends "base.html" %} {% block main %} -<content> - {%- if taxonomy.term %} - <h3 style="margin-bottom:0">Filtering for "{{ section.title }}"</h3> - <small> - <a href="{{ get_url(path="@/blog/_index.md") }}">Remove filter</a> - </small> - {%- endif %} - <ul class="blog-posts"> - {% for page in section.pages %} - <li> - <span> - <i> - <time datetime='{{ page.date | date(format='%+') }}' pubdate> - {{ page.date | date(format=config.extra.date_format) }} - </time> - </i> - </span> - <a href="{{ page.permalink }}">{{ page.title }}</a> - </li> - {% else %} - <li> - No posts yet - </li> - {% endfor %} - </ul> - <small> - <div> - {% set tags = get_taxonomy(kind="tags") %} - {% for post in tags.items %} - <a href="{{ post.permalink }}">#{{ post.name }}</a>&nbsp; + <content> + {%- if taxonomy.term %} + <h3 style="margin-bottom:0">Filtering for "{{ section.title }}"</h3> + <small> + <a href="{{ get_url(path="@/blog/_index.md") }}">Remove filter</a> + </small> + {%- endif %} + <ul class="blog-posts"> + {% for page in section.pages %} + <li> + <span> + <i> + <time datetime='{{ page.date | date(format='%+') }}' pubdate> + {{ page.date | date(format=config.extra.date_format) }} + </time> + </i> + </span> + <a href="{{ page.permalink }}">{{ page.title }}</a> + </li> + {% else %} + <li> + No posts yet + </li> {% endfor %} - </div> - </small> -</content> + </ul> + <small> + <div> + {% set tags = get_taxonomy(kind="tags") %} + {% for post in tags.items %} + <a href="{{ post.permalink }}">#{{ post.name }}</a>&nbsp; + {% endfor %} + </div> + </small> + </content> {% endblock %}
M templates/taxonomy_list.htmltemplates/taxonomy_list.html
@@ -1,14 +1,14 @@
{% extends "base.html" %} {% block main %} -<content> - <small> - <div> - {% set tags = get_taxonomy(kind="tags") %} - {% for post in tags.items %} - <a href="{{ post.permalink }}">#{{ post.name }}</a>&nbsp; - {% endfor %} - </div> - </small> -</content> + <content> + <small> + <div> + {% set tags = get_taxonomy(kind="tags") %} + {% for post in tags.items %} + <a href="{{ post.permalink }}">#{{ post.name }}</a>&nbsp; + {% endfor %} + </div> + </small> + </content> {% endblock %}
M templates/taxonomy_single.htmltemplates/taxonomy_single.html
@@ -1,30 +1,30 @@
{% extends "base.html" %} {% block main %} -<content> - {%- if taxonomy.term %} - <h3 style="margin-bottom:0">Filtering for "{{ term.name }}"</h3> - <small> - <a href="{{ get_url(path="@/blog/_index.md") }}">Remove filter</a> - </small> - {%- endif %} - <ul class="blog-posts"> - {% for page in term.pages %} - <li> - <span> - <i> - <time datetime='{{ page.date | date(format='%+') }}' pubdate> - {{ page.date | date(format=config.extra.date_format) }} - </time> - </i> - </span> - <a href="{{ page.permalink }}">{{ page.title }}</a> - </li> - {% else %} - <li> - No posts yet - </li> - {% endfor %} - </ul> -</content> + <content> + {%- if taxonomy.term %} + <h3 style="margin-bottom:0">Filtering for "{{ term.name }}"</h3> + <small> + <a href="{{ get_url(path="@/blog/_index.md") }}">Remove filter</a> + </small> + {%- endif %} + <ul class="blog-posts"> + {% for page in term.pages %} + <li> + <span> + <i> + <time datetime='{{ page.date | date(format='%+') }}' pubdate> + {{ page.date | date(format=config.extra.date_format) }} + </time> + </i> + </span> + <a href="{{ page.permalink }}">{{ page.title }}</a> + </li> + {% else %} + <li> + No posts yet + </li> + {% endfor %} + </ul> + </content> {% endblock %}