mirror of
https://github.com/Dichgrem/Blog.git
synced 2026-02-04 17:11:57 -05:00
51 lines
1.8 KiB
HTML
51 lines
1.8 KiB
HTML
{% extends "index.html" %}
|
|
|
|
{%- block title -%}
|
|
{{ title_macros::title(page_title=page.title, main_title=config.title) }}
|
|
{%- endblock -%}
|
|
|
|
{% block content %}
|
|
<div class="post" data-pagefind-body>
|
|
{{ post_macros::header(page=page) }}
|
|
{{ post_macros::content(page=page, summary=false, show_only_description=false) }}
|
|
{{ post_macros::earlier_later(page=page) }}
|
|
</div>
|
|
{% if page.toc %}
|
|
<div class="toc-container">
|
|
<div class="toc">
|
|
<div class="toc-title">目录</div>
|
|
<ul>
|
|
{% for h in page.toc %}
|
|
<li class="toc-level-{{ h.level }}">
|
|
<a href="#{{ h.id | safe }}">{{ h.title }}</a>
|
|
{% if h.children %}
|
|
<ul>
|
|
{% for h2 in h.children %}
|
|
<li class="toc-level-{{ h2.level }}">
|
|
<a href="#{{ h2.id | safe }}">{{ h2.title }}</a>
|
|
{% if h2.children %}
|
|
<ul>
|
|
{% for h3 in h2.children %}
|
|
<li class="toc-level-{{ h3.level }}">
|
|
<a href="#{{ h3.id | safe }}">{{ h3.title }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock content %}
|
|
|
|
{% block extra_body %}
|
|
<script src="{{ get_url(path='copy.js', trailing_slash=false) | safe }}"></script>
|
|
{% endblock extra_body %}
|
|
|