Extract footer to a 'content' template
This commit is contained in:
parent
f2e8988825
commit
4a2275dfe6
5 changed files with 27 additions and 27 deletions
|
|
@ -2,6 +2,6 @@
|
|||
title = "Posts"
|
||||
sort_by = "date"
|
||||
template = "posts.html"
|
||||
page_template = "post-page.html"
|
||||
page_template = "content.html"
|
||||
generate_feeds = true
|
||||
+++
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
title = "Posts"
|
||||
sort_by = "date"
|
||||
template = "posts.html"
|
||||
page_template = "post-page.html"
|
||||
page_template = "content.html"
|
||||
generate_feeds = true
|
||||
+++
|
||||
|
|
|
|||
24
templates/content.html
Normal file
24
templates/content.html
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<article class="blog-post">
|
||||
<h1 id="post-title">{{ page.title }}</h1>
|
||||
<time class="post-date">{{ page.date -}}</time>
|
||||
{{ page.content | safe }}
|
||||
</article>
|
||||
{%- endblock content -%}
|
||||
|
||||
{%- block footer %}
|
||||
<hr/>
|
||||
<p class="footer-text">
|
||||
{%- if lang == "pt" %}feito por{% else %}made by{% endif %} <a href="https://jutty.dev">jutty</a>
|
||||
{% if lang == "pt" %}com{% else %}with{% endif %} <a href="https://www.getzola.org/">Zola</a>
|
||||
• {% if lang != "pt" %}BSD-licensed{% endif %}
|
||||
<a href="https://github.com/jultty/blog">{% if lang == "pt" %}código fonte{% else %}source code{% endif %}</a>
|
||||
{% if lang == "pt" %}sob a licença BSD{% endif %}
|
||||
• <a href="{{ get_url(path="acknowledgments") }}">{% if lang == "pt" %}créditos{% else %}acknowledgments{% endif %}</a>
|
||||
<br/>
|
||||
{% if lang == "pt" %}gerado em{% else %}built{% endif %} <time>{{ now(utc=true) | date(format="%Y-%m-%d %H:%M") }} UTC</time>,
|
||||
{{ now(timestamp=true) }}{% if lang == "pt" %}º segundo não-bissexto da Era Unix{% else %} non-leap seconds since the Unix Epoch{% endif %}
|
||||
</p>
|
||||
{% endblock footer -%}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "base.html" %}
|
||||
{% extends "content.html" %}
|
||||
|
||||
{%- block content %}
|
||||
<h1 id="post-title"><a href="{{ page.extra.url }}">{{ page.title }}</a></h1>
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<article class="blog-post">
|
||||
<h1 id="post-title">{{ page.title }}</h1>
|
||||
<time class="post-date">{{ page.date -}}</time>
|
||||
{{ page.content | safe }}
|
||||
</article>
|
||||
{%- endblock content -%}
|
||||
|
||||
{%- block footer %}
|
||||
<hr/>
|
||||
<p class="footer-text">
|
||||
{%- if lang == "pt" %}feito por{% else %}made by{% endif %} <a href="https://jutty.dev">jutty</a>
|
||||
{% if lang == "pt" %}com{% else %}with{% endif %} <a href="https://www.getzola.org/">Zola</a>
|
||||
• {% if lang != "pt" %}BSD-licensed{% endif %}
|
||||
<a href="https://github.com/jultty/blog">{% if lang == "pt" %}código fonte{% else %}source code{% endif %}</a>
|
||||
{% if lang == "pt" %}sob a licença BSD{% endif %}
|
||||
• <a href="{{ get_url(path="acknowledgments") }}">{% if lang == "pt" %}créditos{% else %}acknowledgments{% endif %}</a>
|
||||
<br/>
|
||||
{% if lang == "pt" %}gerado em{% else %}built{% endif %} <time>{{ now(utc=true) | date(format="%Y-%m-%d %H:%M") }} UTC</time>,
|
||||
{{ now(timestamp=true) }}{% if lang == "pt" %}º segundo não-bissexto da Era Unix{% else %} non-leap seconds since the Unix Epoch{% endif %}
|
||||
</p>
|
||||
{% endblock footer %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue