{% import "macros/list_posts.html" as macros_list_posts %}
{% import "macros/page_header.html" as macros_page_header %}
{% import "macros/page_desc.html" as macros_page_desc %}
{% import "macros/content.html" as macros_content %}
{% import "macros/cards_pages.html" as macros_cards_pages %}
{% import "macros/set_title.html" as macros_set_title %}
{% import "macros/paginate.html" as macros_paginate %}
{% import "macros/format_date.html" as macros_format_date %}
{% import "macros/add_comments.html" as macros_add_comments %}
{% import "macros/table_of_contents.html" as macros_toc %}
{% import "macros/create_history_url.html" as macros_create_history_url %}

<!DOCTYPE html>
<html lang="{{ lang }}" {% if config.extra.default_theme -%}
    data-theme="{{config.extra.default_theme}}"
{%- endif -%}>

{% include "partials/header.html" %}

<body>
    {% include "partials/nav.html" %}
    <div class="content">

        {# Post page is the default #}
        {% block main_content %}
            Nothing here?!
        {% endblock main_content %}
    </div>
    {% include "partials/footer.html" %}

    {# Add KaTeX functionality (loads CSS and JS) #}
    {%- if config.extra.katex and config.extra.katex == true or page.extra.katex and page.extra.katex == true -%}
        <link rel="stylesheet" href="{{ get_url(path='katex.min.css', trailing_slash=false) | safe }}">
        <script defer src="{{ get_url(path='js/katex.min.js', trailing_slash=false) | safe }}"></script>
    {%- endif -%}

    {# Add copy button to codeblocks #}
    {%- if config.extra.copy_button and config.extra.copy_button == true or page.extra.copy_button and page.extra.copy_button == true -%}
        <script defer src="{{ get_url(path='js/copyCodeToClipboard.min.js', trailing_slash=false) | safe }}"/></script>
    {%- endif -%}

    {# Add backlinks to footnotes #}
    {%- if config.extra.footnote_backlinks and config.extra.footnote_backlinks == true or page.extra.footnote_backlinks and page.extra.footnote_backlinks == true -%}
        <script defer src="{{ get_url(path='js/footnoteBacklinks.min.js', trailing_slash=false | safe )}}"/></script>
    {%- endif -%}
</body>

</html>
