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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
{# This Page Shows the Individual Blog Posts#}
{% extends "base.html" %}
{%- block seo %}
{{- super() }}
{%- set title_addition = "" %}
{%- if page.title and config.title %}
{%- set title = page.title %}
{%- set title_addition = title_separator ~ config.title %}
{%- elif page.title %}
{%- set title = page.title %}
{%- else %}
{%- set title = config.title %}
{%- endif %}
{%- if page.description %}
{%- set description = page.description %}
{%- else %}
{%- set description = config.description %}
{%- endif %}
{%- set created_time = page.date %}
{%- set updated_time = page.updated %}
{%- if current_section %}
{%- set page_section = current_section %}
{%- else %}
{%- set page_section = "" %}
{%- endif %}
{{- macros_head::seo(config=config, title=title, title_addition=title_addition, description=description, type="article", is_page=true, created_time=created_time, updated_time=updated_time, page_section=page_section) }}
{%- endblock seo %}
{%- block comments_init %}
{%- if config.extra.comments.hyvor %}
<script defer src="https://talk.hyvor.com/embed/embed.js" type="module"></script>
{%- endif %}
{%- endblock comments_init %}
{%- block content %}
<article>
{{- macros::title_post(page=page, config=config) }}
{%- if config.extra.meta_post.position %}
{%- if config.extra.meta_post.position == "top" or config.extra.meta_post.position == "both" %}
{{- macros::meta_post(page=page, config=config) }}
{%- endif %}{%- endif %}
{%- if page.extra.section %}
{%- set tag = get_taxonomy_term(kind="tags", term=page.extra.section, lang=lang) %}
{%- set page_num = tag.page_count | as_str %}
{%- if lang != config.default_language %}
{%- set parts_string = trans(key="Series_parts", lang=lang) | replace(from="$NUMBER_OF_PARTS", to=page_num) %}
{% else %}
{%- set parts_string = page_num ~ " part Series" %}
{% endif -%}
<div class="series-mobile series">
<a class="si" href="{{ tag.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}">{{ tag.name }} ({{ parts_string }})</a>
<ol>
{%- for inner in tag.pages | sort(attribute="year") %}
{%- if inner.content == page.content %}
<li><a href="{{ inner.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}"><b>{{ inner.title }}</b></a></li>
{% else %}
<li><a href="{{ inner.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}">{{ inner.title }}</a></li>
{%- endif %}
{%- endfor %}
</ol>
</div>
{%- endif %}
{{ page.content | safe }}
{%- if config.extra.meta_post.position %}
{%- if config.extra.meta_post.position == "bottom" or config.extra.meta_post.position == "both" %}
{{- macros::meta_post(page=page, config=config) }}
{%- endif %}{%- endif %}
{%- block page_footer %}
{{- macros::footer(page=page, config=config) }}
{%- endblock page_footer %}
{%- block comments_body %}
{%- if config.extra.comments.hyvor %}
<hyvor-talk-comments website-id={{ config.extra.comments.hyvor }} page-id={{ page.slug }}{%- if config.extra.comments.hyvorcolor %} colors="{{ config.extra.comments.hyvorcolor }}"{%- endif %}></hyvor-talk-comments>
{%- endif %}
{%- endblock comments_body %}
</article>
{%- block toc %}
{%- if page.extra.toc and config.extra.recent %}
{%- set toc = page.toc %}
{%- endif %}
{%- if toc %}
<div class="toc">
{%- if page.extra.section %}
<div class="series-toc series">
<a class="si" href="{{ tag.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}">{{ parts_string }}</a>
<ol>
{%- for inner in tag.pages | sort(attribute="year") %}
{%- if inner.content == page.content %}
<li><a href="{{ inner.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}"><b>{{ inner.title }}</b></a></li>
{% else %}
<li><a href="{{ inner.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}">{{ inner.title }}</a></li>
{%- endif %}
{%- endfor %}
</ol>
</div>
{%- endif %}
<div class="toc-sticky">
<a class="si" href="#">{%- if lang != config.default_language %}{{ trans(key="Index" | safe, lang=lang) }}{% else %}Index{% endif %}</a>
{%- for h in toc %}
<div class="toc-item">
<a class="subtext" href="#{{h.id | safe}}">{{ h.title }}</a>
</div>
{%- if h.children %}
{%- for h2 in h.children %}
<div class="toc-item-child">
<a class="subtext" href="#{{h2.id | safe}}"><small>- {{ h2.title }}</small></a>
</div>
{%- endfor %}
{%- endif %}
{%- endfor %}
</div>
</div>
{%- endif %}
{%- endblock toc %}
{%- endblock content %}
{%- block gotop %}
{%- if page.reading_time %}
{%- if page.reading_time > 2 %}
{%- set icon_top=config.extra.icon_top | default(value="svgs svgh angu") -%}
<span class="topout">
<span class="topleft"> </span><a href="#" class="top" title="Back to Top">{%- if icon_top %}<i class="{{ icon_top }}"></i>{%- else %}⋏{%- endif %}</a>
</span>
{%- endif %}
{%- endif %}
{%- endblock gotop %}
|