jekyll-theme-chirpy-g 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +61 -0
  4. data/_data/locales/ar.yml +91 -0
  5. data/_data/locales/bg-BG.yml +81 -0
  6. data/_data/locales/cs-CZ.yml +89 -0
  7. data/_data/locales/de-DE.yml +87 -0
  8. data/_data/locales/el-GR.yml +91 -0
  9. data/_data/locales/en.yml +91 -0
  10. data/_data/locales/es-ES.yml +77 -0
  11. data/_data/locales/fa-IR.yaml +91 -0
  12. data/_data/locales/fi-FI.yml +90 -0
  13. data/_data/locales/fr-FR.yml +77 -0
  14. data/_data/locales/hu-HU.yml +92 -0
  15. data/_data/locales/id-ID.yml +77 -0
  16. data/_data/locales/it-IT.yml +90 -0
  17. data/_data/locales/ko-KR.yml +84 -0
  18. data/_data/locales/my-MM.yml +77 -0
  19. data/_data/locales/nl-NL.yml +90 -0
  20. data/_data/locales/pt-BR.yml +77 -0
  21. data/_data/locales/ru-RU.yml +87 -0
  22. data/_data/locales/sl-SI.yml +91 -0
  23. data/_data/locales/sv-SE.yml +91 -0
  24. data/_data/locales/th.yml +91 -0
  25. data/_data/locales/tr-TR.yml +77 -0
  26. data/_data/locales/uk-UA.yml +77 -0
  27. data/_data/locales/vi-VN.yml +76 -0
  28. data/_data/locales/zh-CN.yml +83 -0
  29. data/_data/locales/zh-TW.yml +83 -0
  30. data/_data/origin/basic.yml +39 -0
  31. data/_data/origin/cors.yml +54 -0
  32. data/_includes/analytics/cloudflare.html +6 -0
  33. data/_includes/analytics/fathom.html +6 -0
  34. data/_includes/analytics/goatcounter.html +6 -0
  35. data/_includes/analytics/google.html +13 -0
  36. data/_includes/analytics/matomo.html +13 -0
  37. data/_includes/analytics/umami.html +6 -0
  38. data/_includes/comment.html +5 -0
  39. data/_includes/comments/disqus.html +57 -0
  40. data/_includes/comments/giscus.html +55 -0
  41. data/_includes/comments/utterances.html +38 -0
  42. data/_includes/datetime.html +20 -0
  43. data/_includes/embed/audio.html +35 -0
  44. data/_includes/embed/bilibili.html +9 -0
  45. data/_includes/embed/twitch.html +8 -0
  46. data/_includes/embed/video.html +59 -0
  47. data/_includes/embed/youtube.html +9 -0
  48. data/_includes/favicons.html +19 -0
  49. data/_includes/footer.html +49 -0
  50. data/_includes/head.html +126 -0
  51. data/_includes/js-selector.html +86 -0
  52. data/_includes/jsdelivr-combine.html +26 -0
  53. data/_includes/lang.html +10 -0
  54. data/_includes/language-alias.html +70 -0
  55. data/_includes/media-url.html +37 -0
  56. data/_includes/metadata-hook.html +1 -0
  57. data/_includes/notification.html +24 -0
  58. data/_includes/origin-type.html +13 -0
  59. data/_includes/pageviews/goatcounter.html +21 -0
  60. data/_includes/post-description.html +25 -0
  61. data/_includes/post-nav.html +34 -0
  62. data/_includes/post-paginator.html +91 -0
  63. data/_includes/post-sharing.html +52 -0
  64. data/_includes/read-time.html +37 -0
  65. data/_includes/refactor-content.html +255 -0
  66. data/_includes/related-posts.html +94 -0
  67. data/_includes/search-loader.html +49 -0
  68. data/_includes/search-results.html +10 -0
  69. data/_includes/sidebar.html +97 -0
  70. data/_includes/toc-status.html +10 -0
  71. data/_includes/toc.html +9 -0
  72. data/_includes/topbar.html +77 -0
  73. data/_includes/trending-tags.html +46 -0
  74. data/_includes/update-list.html +40 -0
  75. data/_layouts/archives.html +35 -0
  76. data/_layouts/categories.html +138 -0
  77. data/_layouts/category.html +24 -0
  78. data/_layouts/compress.html +10 -0
  79. data/_layouts/default.html +86 -0
  80. data/_layouts/graph.html +8 -0
  81. data/_layouts/home.html +122 -0
  82. data/_layouts/page.html +20 -0
  83. data/_layouts/post.html +179 -0
  84. data/_layouts/tag.html +23 -0
  85. data/_layouts/tags.html +22 -0
  86. data/_sass/abstracts/_breakpoints.scss +73 -0
  87. data/_sass/abstracts/_index.scss +4 -0
  88. data/_sass/abstracts/_mixins.scss +80 -0
  89. data/_sass/abstracts/_placeholders.scss +160 -0
  90. data/_sass/abstracts/_variables.scss +30 -0
  91. data/_sass/base/_base.scss +476 -0
  92. data/_sass/base/_index.scss +4 -0
  93. data/_sass/base/_reset.scss +41 -0
  94. data/_sass/base/_syntax.scss +253 -0
  95. data/_sass/base/_typography.scss +266 -0
  96. data/_sass/components/_buttons.scss +51 -0
  97. data/_sass/components/_index.scss +2 -0
  98. data/_sass/components/_popups.scss +172 -0
  99. data/_sass/layout/_footer.scss +36 -0
  100. data/_sass/layout/_index.scss +4 -0
  101. data/_sass/layout/_panel.scss +70 -0
  102. data/_sass/layout/_sidebar.scss +258 -0
  103. data/_sass/layout/_topbar.scss +86 -0
  104. data/_sass/main.bundle.scss +2 -0
  105. data/_sass/main.scss +4 -0
  106. data/_sass/pages/_archives.scss +140 -0
  107. data/_sass/pages/_categories.scss +82 -0
  108. data/_sass/pages/_category-tag.scss +63 -0
  109. data/_sass/pages/_graph.scss +51 -0
  110. data/_sass/pages/_home.scss +173 -0
  111. data/_sass/pages/_index.scss +8 -0
  112. data/_sass/pages/_post.scss +498 -0
  113. data/_sass/pages/_search.scss +184 -0
  114. data/_sass/pages/_tags.scss +23 -0
  115. data/_sass/themes/_dark.scss +318 -0
  116. data/_sass/themes/_light.scss +330 -0
  117. data/assets/404.html +14 -0
  118. data/assets/css/jekyll-theme-chirpy-g.scss +10 -0
  119. data/assets/feed.xml +54 -0
  120. data/assets/img/favicons/android-chrome-192x192.png +0 -0
  121. data/assets/img/favicons/android-chrome-512x512.png +0 -0
  122. data/assets/img/favicons/apple-touch-icon.png +0 -0
  123. data/assets/img/favicons/browserconfig.xml +13 -0
  124. data/assets/img/favicons/favicon-16x16.png +0 -0
  125. data/assets/img/favicons/favicon-32x32.png +0 -0
  126. data/assets/img/favicons/favicon.ico +0 -0
  127. data/assets/img/favicons/mstile-150x150.png +0 -0
  128. data/assets/img/favicons/site.webmanifest +26 -0
  129. data/assets/js/data/graph.json +14 -0
  130. data/assets/js/data/mathjax.js +25 -0
  131. data/assets/js/data/search.json +20 -0
  132. data/assets/js/data/swconf.js +47 -0
  133. data/assets/js/dist/app.min.js +7 -0
  134. data/assets/js/dist/categories.min.js +4 -0
  135. data/assets/js/dist/commons.min.js +4 -0
  136. data/assets/js/dist/graph.min.js +4 -0
  137. data/assets/js/dist/home.min.js +4 -0
  138. data/assets/js/dist/misc.min.js +4 -0
  139. data/assets/js/dist/page.min.js +4 -0
  140. data/assets/js/dist/post.min.js +4 -0
  141. data/assets/js/dist/sw.min.js +7 -0
  142. data/assets/js/dist/theme.min.js +4 -0
  143. data/assets/robots.txt +10 -0
  144. metadata +286 -0
@@ -0,0 +1,10 @@
1
+ {% comment %}
2
+ Determine TOC state and return it through variable "enable_toc"
3
+ {% endcomment %}
4
+
5
+ {% assign enable_toc = false %}
6
+ {% if site.toc and page.toc %}
7
+ {% if page.content contains '<h2' or page.content contains '<h3' %}
8
+ {% assign enable_toc = true %}
9
+ {% endif %}
10
+ {% endif %}
@@ -0,0 +1,9 @@
1
+ {% include toc-status.html %}
2
+
3
+ {% if enable_toc %}
4
+ <div class="toc-border-cover z-3"></div>
5
+ <section id="toc-wrapper" class="invisible position-sticky ps-0 pe-4 pb-4">
6
+ <h2 class="panel-heading ps-3 pb-2 mb-0">{{- site.data.locales[include.lang].panel.toc -}}</h2>
7
+ <nav id="toc"></nav>
8
+ </section>
9
+ {% endif %}
@@ -0,0 +1,77 @@
1
+ <!-- The Top Bar -->
2
+
3
+ <header id="topbar-wrapper" aria-label="Top Bar">
4
+ <div
5
+ id="topbar"
6
+ class="d-flex align-items-center justify-content-between px-lg-3 h-100"
7
+ >
8
+ <nav id="breadcrumb" aria-label="Breadcrumb">
9
+ {% assign paths = page.url | split: '/' %}
10
+
11
+ {% if paths.size == 0 or page.layout == 'home' %}
12
+ <!-- index page -->
13
+ <span>{{ site.data.locales[include.lang].tabs.home | capitalize }}</span>
14
+
15
+ {% else %}
16
+ {% for item in paths %}
17
+ {% if forloop.first %}
18
+ <span>
19
+ <a href="{{ '/' | relative_url }}">
20
+ {{- site.data.locales[include.lang].tabs.home | capitalize -}}
21
+ </a>
22
+ </span>
23
+
24
+ {% elsif forloop.last %}
25
+ {% if page.collection == 'tabs' %}
26
+ <span>{{ site.data.locales[include.lang].tabs[item] | default: page.title }}</span>
27
+ {% else %}
28
+ <span>{{ page.title }}</span>
29
+ {% endif %}
30
+
31
+ {% elsif page.layout == 'category' or page.layout == 'tag' %}
32
+ <span>
33
+ <a href="{{ item | append: '/' | relative_url }}">
34
+ {{- site.data.locales[include.lang].tabs[item] | default: page.title -}}
35
+ </a>
36
+ </span>
37
+ {% endif %}
38
+ {% endfor %}
39
+ {% endif %}
40
+ </nav>
41
+ <!-- endof #breadcrumb -->
42
+
43
+ <button type="button" id="sidebar-trigger" class="btn btn-link" aria-label="Sidebar">
44
+ <i class="fas fa-bars fa-fw"></i>
45
+ </button>
46
+
47
+ <div id="topbar-title">
48
+ {% if page.layout == 'home' %}
49
+ {{- site.data.locales[include.lang].title | default: site.title -}}
50
+ {% elsif page.collection == 'tabs' or page.layout == 'page' %}
51
+ {%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
52
+ {{- site.data.locales[include.lang].tabs[tab_key] | default: page.title -}}
53
+ {% else %}
54
+ {{- site.data.locales[include.lang].layout[page.layout] | default: page.layout | capitalize -}}
55
+ {% endif %}
56
+ </div>
57
+
58
+ <button type="button" id="search-trigger" class="btn btn-link" aria-label="Search">
59
+ <i class="fas fa-search fa-fw"></i>
60
+ </button>
61
+
62
+ <search id="search" class="align-items-center ms-3 ms-lg-0">
63
+ <i class="fas fa-search fa-fw"></i>
64
+ <input
65
+ class="form-control"
66
+ id="search-input"
67
+ type="search"
68
+ aria-label="search"
69
+ autocomplete="off"
70
+ placeholder="{{ site.data.locales[include.lang].search.hint | capitalize }}..."
71
+ >
72
+ </search>
73
+ <button type="button" class="btn btn-link text-decoration-none" id="search-cancel">
74
+ {{- site.data.locales[include.lang].search.cancel -}}
75
+ </button>
76
+ </div>
77
+ </header>
@@ -0,0 +1,46 @@
1
+ <!-- The trending tags list -->
2
+
3
+ {% assign MAX = 10 %}
4
+
5
+ {% assign size_list = '' | split: '' %}
6
+ {% assign tag_list = '' | split: '' %}
7
+
8
+ {% for tag in site.tags %}
9
+ {% assign size = tag | last | size %}
10
+ {% assign size_list = size_list | push: size %}
11
+
12
+ {% assign tag_str = tag | first | append: '::' | append: size %}
13
+ {% assign tag_list = tag_list | push: tag_str %}
14
+ {% endfor %}
15
+
16
+ {% assign size_list = size_list | sort | reverse %}
17
+
18
+ {% assign tag_list = tag_list | sort_natural %}
19
+
20
+ {% assign trending_tags = '' | split: '' %}
21
+
22
+ {% for size in size_list limit: MAX %}
23
+ {% for tag_str in tag_list %}
24
+ {% assign tag = tag_str | split: '::' %}
25
+ {% assign tag_name = tag | first %}
26
+ {% assign tag_size = tag | last | plus: 0 %}
27
+ {% if tag_size == size %}
28
+ {% unless trending_tags contains tag_name %}
29
+ {% assign trending_tags = trending_tags | push: tag_name %}
30
+ {% break %}
31
+ {% endunless %}
32
+ {% endif %}
33
+ {% endfor %}
34
+ {% endfor %}
35
+
36
+ {% if trending_tags.size > 0 %}
37
+ <section>
38
+ <h2 class="panel-heading">{{- site.data.locales[include.lang].panel.trending_tags -}}</h2>
39
+ <div class="d-flex flex-wrap mt-3 mb-1 me-3">
40
+ {% for tag_name in trending_tags %}
41
+ {% assign url = tag_name | slugify | url_encode | prepend: '/tags/' | append: '/' %}
42
+ <a class="post-tag btn btn-outline-primary" href="{{ url | relative_url }}">{{ tag_name }}</a>
43
+ {% endfor %}
44
+ </div>
45
+ </section>
46
+ {% endif %}
@@ -0,0 +1,40 @@
1
+ <!-- Get 5 last posted/updated posts -->
2
+
3
+ {% assign MAX_SIZE = 5 %}
4
+
5
+ {% assign all_list = '' | split: '' %}
6
+
7
+ {% for post in site.posts %}
8
+ {% assign datetime = post.last_modified_at | default: post.date %}
9
+
10
+ {% capture elem %}
11
+ {{- datetime | date: "%Y%m%d%H%M%S" -}}::{{- forloop.index0 -}}
12
+ {% endcapture %}
13
+
14
+ {% assign all_list = all_list | push: elem %}
15
+ {% endfor %}
16
+
17
+ {% assign all_list = all_list | sort | reverse %}
18
+
19
+ {% assign update_list = '' | split: '' %}
20
+
21
+ {% for entry in all_list limit: MAX_SIZE %}
22
+ {% assign update_list = update_list | push: entry %}
23
+ {% endfor %}
24
+
25
+ {% if update_list.size > 0 %}
26
+ <section id="access-lastmod">
27
+ <h2 class="panel-heading">{{- site.data.locales[include.lang].panel.lastmod -}}</h2>
28
+ <ul class="content list-unstyled ps-0 pb-1 ms-1 mt-2">
29
+ {% for item in update_list %}
30
+ {% assign index = item | split: '::' | last | plus: 0 %}
31
+ {% assign post = site.posts[index] %}
32
+ {% assign url = post.url | relative_url %}
33
+ <li class="text-truncate lh-lg">
34
+ <a href="{{ url }}">{{ post.title }}</a>
35
+ </li>
36
+ {% endfor %}
37
+ </ul>
38
+ </section>
39
+ <!-- #access-lastmod -->
40
+ {% endif %}
@@ -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>
@@ -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 %}
@@ -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>
@@ -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 %}
@@ -0,0 +1,86 @@
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 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" class="d-none position-fixed w-100 h-100 z-1"></div>
72
+
73
+ {% if site.pwa.enabled %}
74
+ {% include_cached notification.html lang=lang %}
75
+ {% endif %}
76
+
77
+ <!-- Embedded scripts -->
78
+
79
+ {% for _include in layout.script_includes %}
80
+ {% assign _include_path = _include | append: '.html' %}
81
+ {% include {{ _include_path }} %}
82
+ {% endfor %}
83
+
84
+ {% include_cached search-loader.html lang=lang %}
85
+ </body>
86
+ </html>
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: page
3
+ # A graph of posts and tags
4
+ ---
5
+
6
+ <div class="graph-container d-flex flex-wrap mx-xl-2">
7
+ <svg id="graph-svg" style="width: 100%; height: 100%;"></svg>
8
+ </div>
@@ -0,0 +1,122 @@
1
+ ---
2
+ layout: default
3
+ refactor: true
4
+ ---
5
+
6
+ {% include lang.html %}
7
+
8
+ {% assign all_pinned = site.posts | where: 'pin', 'true' %}
9
+ {% assign all_normal = site.posts | where_exp: 'item', 'item.pin != true and item.hidden != true' %}
10
+
11
+ {% assign posts = '' | split: '' %}
12
+
13
+ <!-- Get pinned posts on current page -->
14
+
15
+ {% assign visible_start = paginator.page | minus: 1 | times: paginator.per_page %}
16
+ {% assign visible_end = visible_start | plus: paginator.per_page %}
17
+
18
+ {% if all_pinned.size > visible_start %}
19
+ {% if all_pinned.size > visible_end %}
20
+ {% assign pinned_size = paginator.per_page %}
21
+ {% else %}
22
+ {% assign pinned_size = all_pinned.size | minus: visible_start %}
23
+ {% endif %}
24
+
25
+ {% for i in (visible_start..all_pinned.size) limit: pinned_size %}
26
+ {% assign posts = posts | push: all_pinned[i] %}
27
+ {% endfor %}
28
+ {% else %}
29
+ {% assign pinned_size = 0 %}
30
+ {% endif %}
31
+
32
+ <!-- Get normal posts on current page -->
33
+
34
+ {% assign normal_size = paginator.posts | size | minus: pinned_size %}
35
+
36
+ {% if normal_size > 0 %}
37
+ {% if pinned_size > 0 %}
38
+ {% assign normal_start = 0 %}
39
+ {% else %}
40
+ {% assign normal_start = visible_start | minus: all_pinned.size %}
41
+ {% endif %}
42
+
43
+ {% assign normal_end = normal_start | plus: normal_size | minus: 1 %}
44
+
45
+ {% for i in (normal_start..normal_end) %}
46
+ {% assign posts = posts | push: all_normal[i] %}
47
+ {% endfor %}
48
+ {% endif %}
49
+
50
+ <div id="post-list" class="flex-grow-1 px-xl-1">
51
+ {% for post in posts %}
52
+ <article class="card-wrapper card">
53
+ <a href="{{ post.url | relative_url }}" class="post-preview row g-0 flex-md-row-reverse">
54
+ {% assign card_body_col = '12' %}
55
+
56
+ {% if post.image %}
57
+ {% assign src = post.image.path | default: post.image %}
58
+ {% unless src contains '//' %}
59
+ {% assign src = post.media_subpath | append: '/' | append: src | replace: '//', '/' %}
60
+ {% endunless %}
61
+
62
+ {% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
63
+
64
+ {% assign lqip = null %}
65
+
66
+ {% if post.image.lqip %}
67
+ {% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
68
+ {% endif %}
69
+
70
+ <div class="col-md-5">
71
+ <img src="{{ src }}" alt="{{ alt }}" {{ lqip }}>
72
+ </div>
73
+
74
+ {% assign card_body_col = '7' %}
75
+ {% endif %}
76
+
77
+ <div class="col-md-{{ card_body_col }}">
78
+ <div class="card-body d-flex flex-column">
79
+ <h1 class="card-title my-2 mt-md-0">{{ post.title }}</h1>
80
+
81
+ <div class="card-text content mt-0 mb-3">
82
+ <p>{% include post-description.html %}</p>
83
+ </div>
84
+
85
+ <div class="post-meta flex-grow-1 d-flex align-items-end">
86
+ <div class="me-auto">
87
+ <!-- posted date -->
88
+ <i class="far fa-calendar fa-fw me-1"></i>
89
+ {% include datetime.html date=post.date lang=lang %}
90
+
91
+ <!-- categories -->
92
+ {% if post.categories.size > 0 %}
93
+ <i class="far fa-folder-open fa-fw me-1"></i>
94
+ <span class="categories">
95
+ {% for category in post.categories %}
96
+ {{ category }}
97
+ {%- unless forloop.last -%},{%- endunless -%}
98
+ {% endfor %}
99
+ </span>
100
+ {% endif %}
101
+ </div>
102
+
103
+ {% if post.pin %}
104
+ <div class="pin ms-1">
105
+ <i class="fas fa-thumbtack fa-fw"></i>
106
+ <span>{{ site.data.locales[lang].post.pin_prompt }}</span>
107
+ </div>
108
+ {% endif %}
109
+ </div>
110
+ <!-- .post-meta -->
111
+ </div>
112
+ <!-- .card-body -->
113
+ </div>
114
+ </a>
115
+ </article>
116
+ {% endfor %}
117
+ </div>
118
+ <!-- #post-list -->
119
+
120
+ {% if paginator.total_pages > 1 %}
121
+ {% include post-paginator.html %}
122
+ {% endif %}
@@ -0,0 +1,20 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% include lang.html %}
6
+
7
+ <article class="px-1">
8
+ {% if page.layout == 'page' or page.collection == 'tabs' %}
9
+ {% assign tab_key = page.title | downcase %}
10
+ {% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
11
+ <h1 class="dynamic-title">
12
+ {{ title }}
13
+ </h1>
14
+ <div class="content">
15
+ {{ content }}
16
+ </div>
17
+ {% else %}
18
+ {{ content }}
19
+ {% endif %}
20
+ </article>