summaryrefslogtreecommitdiffstats
path: root/templates/index.html
blob: 21302781aad77477a89727395b6ac38b3b12a7d5 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{% import "macros.html" as macros -%}
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="robots" content="noindex" />
    <title>
      {% if this.title %}{{ this.title }} -{% endif %}
      {{ config.title }}
    </title>
    <link rel="icon" type="image/png" href="/avatar.png" />
    <meta name="description"
          content="{{ section.description | default(value=config.description) }}" />
    <meta name="keywords" content="blog" />
    <link rel="alternate"
          type="application/rss+xml"
          title="RSS"
          href="{{ get_url(path="rss.xml") | safe }}" />
    <link rel="stylesheet" type="text/css" href="/style.css" />
    <link rel="stylesheet"
          type="text/css"
          href="/syntax-theme-dark.css"
          media="(prefers-color-scheme: dark)" />
    <link rel="stylesheet"
          type="text/css"
          href="/syntax-theme-light.css"
          media="(prefers-color-scheme: light)" />
  </head>
  <body>
    <header class="banner">
      <nav>
        <h1>{{ macros::nav_item(name=config.title, url=config.base_url) }}</h1>
        <ul>
          {% set root = get_section(path="_index.md") %}
          {% set pages = root.pages | sort(attribute="title") %}
          {% for p in pages %}
            <li>{{ macros::nav_item(name=p.title,url=p.permalink) }}</li>
          {%- endfor -%}
          {% set subsections = root.subsections | sort %}
          {% for p in subsections %}
            {%- set s = get_section(path=p) %}
            <li>{{ macros::nav_item(name=s.title,url=s.permalink) }}</li>
          {% endfor %}
        </ul>
      </nav>
    </header>
    <main>
      {% block content %}
        <header>
          <h1>{{ section.title | safe }}</h1>
          <h3>{{ section.description | markdown(inline=true) | safe }}</h3>
        </header>
        {{ section.content | safe }}
      {% endblock content %}
    </main>
    <footer>
      This site was was built using <a href="https://www.getzola.org/">Zola</a>.
      The <a href="{{ config.extra.repository }}">code</a> is licensed under
      <a href="https://opensource.org/licenses/{{ config.extra.license }}">{{ config.extra.license }}</a>.
    </footer>
  </body>
</html>