<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>{{ book.title }}</title>
        <link rel="stylesheet" href="style.css" type="text/css" media="all" />
        <link rel="shortcut icon" href="favicon.ico" />
        <meta property="og:title" content="{{ book.title }}" />
        <meta property="og:site_name" content="{{ book.title }}" />
        <meta property="og:type" content="book" />
        <meta property="og:url" content="{{ book.url|safe }}" />
        <meta property="og:description" content="{{ book_description }}" />
        <meta property="book:author" content="{{ book.author }}" />
        <meta property="book:release_date" content="{{ book.pubdate|rfc3339_utc }}" />
        {% if include_katex_css %}<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">{% endif %}
    </head>
    <body class="toc">
        <header>
            <h1>{{ book.title }}</h1>
            <h2>by {{ book.author }}</h2>
            <time datetime="{{ book.pubdate|rfc3339_utc }}">{{ book.pubdate|human_date }}</time>
        </header>
        <article>
            {{ book_description|safe }}
        </article>
        <nav>
            <h1>Table of Contents</h1>
            <ol>
                {% for chapter in chapters %}
                <li>
                    <a href="{{ chapter.front.url|safe }}">{{ chapter.front.title }}</a>
                    {% if chapter.sections.len() > 0 %}
                    <ol>
                        {% for section in chapter.sections %}
                        <li><a href="{{ section.front.url|safe }}">{{ section.front.title }}</a></li>
                        {% endfor %}
                    </ol>
                    {% endif %}
                </li>
                {% endfor %}
            </ol>
        </nav>
        <footer><p>&copy; {{ book.pubdate|year }} {{ book.author }}</p></footer>
        {% if include_reload_script %}
        {% include "reload.html" %}
        {% endif %}
    </body>
</html>