Skip to content

Commit 1008829

Browse files
committed
Gog Clarification Post
1 parent a1d62ec commit 1008829

35 files changed

+4946
-0
lines changed

_layouts/archives.html

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: page
3+
# The Archives of posts.
4+
---
5+
6+
{% include lang.html %}
7+
8+
{% assign df_strftime_m = site.data.locales[lang].df.archives.strftime | default: '/ %m' %}
9+
{% assign df_dayjs_m = site.data.locales[lang].df.archives.dayjs | default: '/ MM' %}
10+
11+
<div id="archives" class="pl-xl-3">
12+
{% for post in site.posts %}
13+
{% assign cur_year = post.date | date: '%Y' %}
14+
15+
{% if cur_year != last_year %}
16+
{% unless forloop.first %}</ul>{% endunless %}
17+
18+
<time class="year lead d-block">{{ cur_year }}</time>
19+
{{ '<ul class="list-unstyled">' }}
20+
21+
{% assign last_year = cur_year %}
22+
{% endif %}
23+
24+
<li>
25+
{% assign ts = post.date | date: '%s' %}
26+
<span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: '%d' }}</span>
27+
<span class="date month small text-muted ms-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
28+
{{ post.date | date: df_strftime_m }}
29+
</span>
30+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
31+
</li>
32+
33+
{% if forloop.last %}</ul>{% endif %}
34+
{% endfor %}
35+
</div>

_layouts/categories.html

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
layout: page
3+
# All the Categories of posts
4+
---
5+
6+
{% include lang.html %}
7+
8+
{% assign HEAD_PREFIX = 'h_' %}
9+
{% assign LIST_PREFIX = 'l_' %}
10+
11+
{% assign group_index = 0 %}
12+
13+
{% assign sort_categories = site.categories | sort %}
14+
15+
{% for category in sort_categories %}
16+
{% assign category_name = category | first %}
17+
{% assign posts_of_category = category | last %}
18+
{% assign first_post = posts_of_category | first %}
19+
20+
{% if category_name == first_post.categories[0] %}
21+
{% assign sub_categories = '' | split: '' %}
22+
23+
{% for post in posts_of_category %}
24+
{% assign second_category = post.categories[1] %}
25+
{% if second_category %}
26+
{% unless sub_categories contains second_category %}
27+
{% assign sub_categories = sub_categories | push: second_category %}
28+
{% endunless %}
29+
{% endif %}
30+
{% endfor %}
31+
32+
{% assign sub_categories = sub_categories | sort %}
33+
{% assign sub_categories_size = sub_categories | size %}
34+
35+
<div class="card categories">
36+
<!-- top-category -->
37+
<div
38+
id="{{ HEAD_PREFIX }}{{ group_index }}"
39+
class="card-header d-flex justify-content-between hide-border-bottom"
40+
>
41+
<span class="ms-2">
42+
<i class="far fa-folder{% if sub_categories_size > 0 %}-open{% endif %} fa-fw"></i>
43+
44+
{% capture _category_url %}/categories/{{ category_name | slugify | url_encode }}/{% endcapture %}
45+
<a href="{{ _category_url | relative_url }}" class="mx-2">{{ category_name }}</a>
46+
47+
<!-- content count -->
48+
{% assign top_posts_size = site.categories[category_name] | size %}
49+
<span class="text-muted small font-weight-light">
50+
{% if sub_categories_size > 0 %}
51+
{{ sub_categories_size }}
52+
{% if sub_categories_size > 1 %}
53+
{{
54+
site.data.locales[lang].categories.category_measure.plural
55+
| default: site.data.locales[lang].categories.category_measure
56+
}}
57+
{% else %}
58+
{{
59+
site.data.locales[lang].categories.category_measure.singular
60+
| default: site.data.locales[lang].categories.category_measure
61+
}}
62+
{% endif -%}
63+
,
64+
{% endif %}
65+
66+
{{ top_posts_size }}
67+
68+
{% if top_posts_size > 1 %}
69+
{{
70+
site.data.locales[lang].categories.post_measure.plural
71+
| default: site.data.locales[lang].categories.post_measure
72+
}}
73+
{% else %}
74+
{{
75+
site.data.locales[lang].categories.post_measure.singular
76+
| default: site.data.locales[lang].categories.post_measure
77+
}}
78+
{% endif %}
79+
</span>
80+
</span>
81+
82+
<!-- arrow -->
83+
{% if sub_categories_size > 0 %}
84+
<a
85+
href="#{{ LIST_PREFIX }}{{ group_index }}"
86+
data-bs-toggle="collapse"
87+
aria-expanded="true"
88+
aria-label="{{ HEAD_PREFIX }}{{ group_index }}-trigger"
89+
class="category-trigger hide-border-bottom"
90+
>
91+
<i class="fas fa-fw fa-angle-down"></i>
92+
</a>
93+
{% else %}
94+
<span data-bs-toggle="collapse" class="category-trigger hide-border-bottom disabled">
95+
<i class="fas fa-fw fa-angle-right"></i>
96+
</span>
97+
{% endif %}
98+
</div>
99+
<!-- .card-header -->
100+
101+
<!-- Sub-categories -->
102+
{% if sub_categories_size > 0 %}
103+
<div id="{{ LIST_PREFIX }}{{ group_index }}" class="collapse show" aria-expanded="true">
104+
<ul class="list-group">
105+
{% for sub_category in sub_categories %}
106+
<li class="list-group-item">
107+
<i class="far fa-folder fa-fw"></i>
108+
109+
{% capture _sub_ctg_url %}/categories/{{ sub_category | slugify | url_encode }}/{% endcapture %}
110+
<a href="{{ _sub_ctg_url | relative_url }}" class="mx-2">{{ sub_category }}</a>
111+
112+
{% assign posts_size = site.categories[sub_category] | size %}
113+
<span class="text-muted small font-weight-light">
114+
{{ posts_size }}
115+
116+
{% if posts_size > 1 %}
117+
{{
118+
site.data.locales[lang].categories.post_measure.plural
119+
| default: site.data.locales[lang].categories.post_measure
120+
}}
121+
{% else %}
122+
{{
123+
site.data.locales[lang].categories.post_measure.singular
124+
| default: site.data.locales[lang].categories.post_measure
125+
}}
126+
{% endif %}
127+
</span>
128+
</li>
129+
{% endfor %}
130+
</ul>
131+
</div>
132+
{% endif %}
133+
</div>
134+
<!-- .card -->
135+
136+
{% assign group_index = group_index | plus: 1 %}
137+
{% endif %}
138+
{% endfor %}

_layouts/category.html

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
layout: page
3+
# The Category layout
4+
---
5+
6+
{% include lang.html %}
7+
8+
<div id="page-category">
9+
<h1 class="ps-lg-2">
10+
<i class="far fa-folder-open fa-fw text-muted"></i>
11+
{{ page.title }}
12+
<span class="lead text-muted ps-2">{{ page.posts | size }}</span>
13+
</h1>
14+
15+
<ul class="content ps-0">
16+
{% for post in page.posts %}
17+
<li class="d-flex justify-content-between px-md-3">
18+
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
19+
<span class="dash flex-grow-1"></span>
20+
{% include datetime.html date=post.date class='text-muted small text-nowrap' lang=lang %}
21+
</li>
22+
{% endfor %}
23+
</ul>
24+
</div>

_layouts/compress.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Jekyll layout that compresses HTML
3+
# v3.2.0
4+
# http://jch.penibelst.de/
5+
# © 2014–2015 Anatol Broder
6+
# MIT License
7+
---
8+
9+
{% capture _LINE_FEED %}
10+
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" or page.compress_html == false %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}

_layouts/default.html

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
layout: compress
3+
---
4+
5+
<!doctype html>
6+
7+
{% include origin-type.html %}
8+
9+
{% include lang.html %}
10+
11+
{% if site.theme_mode %}
12+
{% capture prefer_mode %}data-mode="{{ site.theme_mode }}"{% endcapture %}
13+
{% endif %}
14+
15+
<!-- `site.alt_lang` can specify a language different from the UI -->
16+
<html lang="{{ page.lang | default: site.alt_lang | default: site.lang }}" {{ prefer_mode }}>
17+
{% include head.html %}
18+
19+
<body>
20+
{% include sidebar.html lang=lang %}
21+
22+
<div id="main-wrapper" class="d-flex justify-content-center">
23+
<div class="container d-flex flex-column px-xxl-5">
24+
{% include topbar.html lang=lang %}
25+
26+
<div class="row flex-grow-1">
27+
<main aria-label="Main Content" class="col-12 col-lg-11 col-xl-9 px-md-4">
28+
{% if layout.refactor or layout.layout == 'default' %}
29+
{% include refactor-content.html content=content lang=lang %}
30+
{% else %}
31+
{{ content }}
32+
{% endif %}
33+
</main>
34+
35+
<!-- panel -->
36+
<aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 mb-5 text-muted">
37+
<div class="access">
38+
{% include_cached update-list.html lang=lang %}
39+
{% include_cached trending-tags.html lang=lang %}
40+
</div>
41+
42+
{% for _include in layout.panel_includes %}
43+
{% assign _include_path = _include | append: '.html' %}
44+
{% include {{ _include_path }} lang=lang %}
45+
{% endfor %}
46+
</aside>
47+
</div>
48+
49+
<div class="row">
50+
<!-- tail -->
51+
<div id="tail-wrapper" class="col-12 col-lg-11 col-xl-9 px-md-4">
52+
{% for _include in layout.tail_includes %}
53+
{% assign _include_path = _include | append: '.html' %}
54+
{% include {{ _include_path }} lang=lang %}
55+
{% endfor %}
56+
57+
{% include_cached footer.html lang=lang %}
58+
</div>
59+
</div>
60+
61+
{% include_cached search-results.html lang=lang %}
62+
</div>
63+
64+
<aside aria-label="Scroll to Top">
65+
<button id="back-to-top" type="button" class="btn btn-lg btn-box-shadow">
66+
<i class="fas fa-angle-up"></i>
67+
</button>
68+
</aside>
69+
</div>
70+
71+
<div id="mask"></div>
72+
73+
{% if site.pwa.enabled %}
74+
{% include_cached notification.html lang=lang %}
75+
{% endif %}
76+
77+
<!-- JavaScripts -->
78+
{% include js-selector.html lang=lang %}
79+
80+
{% include_cached search-loader.html lang=lang %}
81+
</body>
82+
</html>

0 commit comments

Comments
 (0)