{% extends "base.html" %}
{% block content %}
<nav class="breadcrumb">
    <a href="{{ root_path }}/blog.html">{% if config.language == "zh" %}返回博客{% else %}Back to blog{% endif %}</a>
</nav>
<article class="essay">
    <header class="essay-header">
        {% if current_page.meta.title %}
        <h1 class="title">{{ current_page.meta.title }}</h1>
        {% endif %}
        <div class="meta">
            {% if current_page.meta.date %}{{ current_page.meta.date }}{% endif %}
            {% if current_page.meta.date %} · {% endif %}
            {% if config.language == "zh" %}{{ current_page.reading_time }} 分钟阅读{% else %}{{ current_page.reading_time }} min read{% endif %}
        </div>
    </header>
    <div class="content">{{ content | safe }}</div>
</article>
{% endblock %}
{% block margin %}
{% if current_page.toc | length > 0 %}
<details class="toc-card immersive-light">
    <summary>{% if config.language == "zh" %}目录{% else %}Contents{% endif %}</summary>
    <nav class="toc-links">
        {% for item in current_page.toc %}
        <a class="toc-level-{{ item.level }}" href="#{{ item.id }}">{{ item.title }}</a>
        {% endfor %}
    </nav>
</details>
{% endif %}
{% endblock %}
