<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{% block page_title %}{{ title }}{% endblock page_title %} — {{ site_title }}</title>
    <link rel="stylesheet" href="/static/css/theme.css">
    {{ favicon_tags | safe }}
    <link rel="alternate" type="application/atom+xml" title="{{ site_title }} - Atom" href="{{ feed_atom_url }}">
    <link rel="alternate" type="application/rss+xml" title="{{ site_title }} - RSS" href="{{ feed_rss_url }}">
</head>

<body>
    <nav class="site-nav">
        <a href="/" class="nav-brand">{{ site_title }}</a>
        <ul>
            <li><a href="/blog/">Blog</a></li>
            <li><a href="/wiki/">Wiki</a></li>
            {% for p in nav_pages %}
            <li><a href="{{ p.url | safe }}">{{ p.title }}</a></li>
            {% endfor %}
        </ul>
    </nav>

    <main class="content">
        {% block content %}{% endblock content %}
    </main>

    <footer class="site-footer">
        <p>Built with <a href="https://github.com/LHelge/aphid">aphid</a></p>
        <p><a href="{{ feed_atom_url }}">Atom</a> · <a href="{{ feed_rss_url }}">RSS</a></p>
        {% if socials | length > 0 %}
        <ul class="socials">
            {% for s in socials %}
            <li><a href="{{ s.url }}">{{ s.platform }}</a></li>
            {% endfor %}
        </ul>
        {% endif %}
    </footer>

    {% if contains_mermaid %}
    <script src="/static/js/mermaid.min.js"></script>
    <script>mermaid.initialize({ startOnLoad: true });</script>
    {% endif %}
</body>

</html>