-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.html
72 lines (61 loc) · 2.19 KB
/
page.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{% extends "index.html" %}
{% import "post_macros.html" as post_macros %}
{% block title %}{{config.title}} - {{page.title}}{% endblock title %}
{% block content %}
{% if page.toc %}
<div class="post-toc" id="post-toc">
<h2 class="post-toc-title">Contents</h2>
<div class="post-toc-content always-active">
<nav id="TableOfContents">
<ul>
{% for h1 in page.toc %}
<li>
<a href="{{h1.permalink | safe}}" class="toc-link">{{ h1.title }}</a>
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
<li>
<a href="{{h2.permalink | safe}}" class="toc-link">{{ h2.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
</div>
</div>
{% endif %}
<article class="post">
{{ post_macros::title(page=page) }}
<div class="post-content">
{{ page.content | safe }}
</div>
{% block page_before_footer %}
{% endblock page_before_footer %}
<div class="post-footer">
{% block page_footer %}
{% if page.taxonomies.tags %}
<div class="post-tags">
{% for tag in page.taxonomies.tags %}
<a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">#{{ tag }}</a>
{% endfor %}
</div>
{% endif %}
{% if page.lower or page.higher %}
<div class="post-nav">
{% if page.lower %}
<a class="previous" href="{{ page.lower.permalink }}">‹ {{ page.lower.title }}</a>
{% endif %}
{% if page.higher %}
<a class="next" href="{{ page.higher.permalink }}">{{ page.higher.title }} ›</a>
{% endif %}
</div>
{% endif %}
{% endblock page_footer %}
</div>
{% block page_after_footer %}
{% endblock page_after_footer %}
</article>
{% endblock content %}