otmp_site/templates/page.html

48 lines
No EOL
1.2 KiB
HTML

{% extends "base.html" %}
{% block header %}
<p><a href="..">..</a>/{{ page.slug }}</p>
<p class="post-meta"><time datetime="{{ page.date }}">{{ page.date }}</time></p>
<h1>{{ page.title }}</h1>
{% endblock header %}
{% block content %}
{% if page.toc and page.extra.add_toc %}
Table of contents
<ul>
{% for h1 in page.toc %}
<li>
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
<li>
<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{{ page.content | safe }}
{% endblock content %}
{% block footer %}
<p class="taxonomies">
{% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %}
<a href="/tags/{{ tag | slugify }}">#{{ tag }}</a>
{% endfor %}
{% for category in page.taxonomies.categories %}
<a href="/categories/{{ category | slugify }}">+{{ category }}</a>
{% endfor %}
{% for context in page.taxonomies.contexts %}
<a href="/contexts/{{ context | slugify }}">@{{ context }}</a>
{% endfor %}
{% endif %}
</p>
{% endblock footer %}