about summary refs log tree commit diff stats
path: root/templates/page.html
blob: 336529adce92edb6595497fe8b9475a3a7929a76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{% import "macros.html" as macros %}
{% extends "base.html" %}

{% block title %}{{ 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 %}
  {%- if config.extra.table_of_contents.show and not page.extra.hide_table_of_contents and page.toc %}
    <details {% if config.extra.table_of_contents.visible_on_load %}open{% endif %}>
      <summary>{{ trans(key="table_of_contents", lang=lang) }}</summary>
      {{- macros::table_of_contents(toc=page.toc, max_level=config.extra.table_of_contents.max_level) | indent() | safe() }}
    </details>
  {%- endif %}
  <main>
    {{ page.content | safe }}
  </main>
  <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, lang=lang) }}">#{{ item }}</a>
        {%- endfor %}
      {%- endfor %}
    {%- endif %}
  </p>
{% endblock %}