jekyll-theme-chirpy-customized-by-alazaroc 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +106 -0
  4. data/_data/assets/cross_origin.yml +62 -0
  5. data/_data/assets/self_host.yml +51 -0
  6. data/_data/authors.yml +17 -0
  7. data/_data/contact.yml +30 -0
  8. data/_data/locales/ar.yml +93 -0
  9. data/_data/locales/bg-BG.yml +83 -0
  10. data/_data/locales/cs-CZ.yml +91 -0
  11. data/_data/locales/de-DE.yml +82 -0
  12. data/_data/locales/en.yml +93 -0
  13. data/_data/locales/es-ES.yml +79 -0
  14. data/_data/locales/fi-FI.yml +92 -0
  15. data/_data/locales/fr-FR.yml +79 -0
  16. data/_data/locales/hu-HU.yml +81 -0
  17. data/_data/locales/id-ID.yml +79 -0
  18. data/_data/locales/it-IT.yml +93 -0
  19. data/_data/locales/ko-KR.yml +86 -0
  20. data/_data/locales/my-MM.yml +79 -0
  21. data/_data/locales/pt-BR.yml +79 -0
  22. data/_data/locales/ru-RU.yml +79 -0
  23. data/_data/locales/tr-TR.yml +79 -0
  24. data/_data/locales/uk-UA.yml +79 -0
  25. data/_data/locales/vi-VN.yml +77 -0
  26. data/_data/locales/zh-CN.yml +85 -0
  27. data/_data/share.yml +27 -0
  28. data/_includes/assets-origin.html +12 -0
  29. data/_includes/comments/disqus.html +54 -0
  30. data/_includes/comments/giscus.html +56 -0
  31. data/_includes/comments/utterances.html +51 -0
  32. data/_includes/comments.html +5 -0
  33. data/_includes/datetime.html +15 -0
  34. data/_includes/embed/twitch.html +4 -0
  35. data/_includes/embed/youtube.html +6 -0
  36. data/_includes/favicons.html +17 -0
  37. data/_includes/footer.html +36 -0
  38. data/_includes/google-analytics.html +14 -0
  39. data/_includes/head.html +115 -0
  40. data/_includes/js-selector.html +99 -0
  41. data/_includes/jsdelivr-combine.html +32 -0
  42. data/_includes/language-alias.html +70 -0
  43. data/_includes/mermaid.html +59 -0
  44. data/_includes/mode-toggle.html +129 -0
  45. data/_includes/no-linenos.html +10 -0
  46. data/_includes/post-nav.html +30 -0
  47. data/_includes/post-paginator.html +88 -0
  48. data/_includes/post-sharing.html +27 -0
  49. data/_includes/read-time.html +30 -0
  50. data/_includes/refactor-content.html +330 -0
  51. data/_includes/related-posts.html +103 -0
  52. data/_includes/search-loader.html +46 -0
  53. data/_includes/search-results.html +11 -0
  54. data/_includes/sidebar.html +103 -0
  55. data/_includes/toc.html +16 -0
  56. data/_includes/topbar.html +70 -0
  57. data/_includes/trending-tags.html +50 -0
  58. data/_includes/update-list.html +40 -0
  59. data/_layouts/archives.html +34 -0
  60. data/_layouts/categories.html +118 -0
  61. data/_layouts/category.html +22 -0
  62. data/_layouts/compress.html +10 -0
  63. data/_layouts/default.html +71 -0
  64. data/_layouts/home.html +94 -0
  65. data/_layouts/page.html +63 -0
  66. data/_layouts/post.html +141 -0
  67. data/_layouts/tag.html +21 -0
  68. data/_layouts/tags.html +23 -0
  69. data/_sass/addon/commons.scss +1740 -0
  70. data/_sass/addon/module.scss +163 -0
  71. data/_sass/addon/syntax.scss +275 -0
  72. data/_sass/addon/variables.scss +30 -0
  73. data/_sass/colors/dark-syntax.scss +87 -0
  74. data/_sass/colors/dark-typography.scss +170 -0
  75. data/_sass/colors/light-syntax.scss +83 -0
  76. data/_sass/colors/light-typography.scss +104 -0
  77. data/_sass/jekyll-theme-chirpy-customized-by-alazaroc.scss +24 -0
  78. data/_sass/layout/archives.scss +136 -0
  79. data/_sass/layout/categories.scss +66 -0
  80. data/_sass/layout/category-tag.scss +73 -0
  81. data/_sass/layout/home.scss +178 -0
  82. data/_sass/layout/post.scss +387 -0
  83. data/_sass/layout/tags.scss +19 -0
  84. data/_sass/variables-hook.scss +3 -0
  85. data/assets/404.html +14 -0
  86. data/assets/css/style.scss +12 -0
  87. data/assets/feed.xml +61 -0
  88. data/assets/img/favicons/android-chrome-192x192.png +0 -0
  89. data/assets/img/favicons/android-chrome-512x512.png +0 -0
  90. data/assets/img/favicons/apple-touch-icon.png +0 -0
  91. data/assets/img/favicons/browserconfig.xml +13 -0
  92. data/assets/img/favicons/favicon-16x16.png +0 -0
  93. data/assets/img/favicons/favicon-32x32.png +0 -0
  94. data/assets/img/favicons/favicon.ico +0 -0
  95. data/assets/img/favicons/mstile-150x150.png +0 -0
  96. data/assets/img/favicons/site.webmanifest +26 -0
  97. data/assets/js/data/search.json +20 -0
  98. data/assets/js/data/swcache.js +54 -0
  99. data/assets/js/dist/categories.min.js +6 -0
  100. data/assets/js/dist/commons.min.js +6 -0
  101. data/assets/js/dist/home.min.js +6 -0
  102. data/assets/js/dist/misc.min.js +6 -0
  103. data/assets/js/dist/page.min.js +6 -0
  104. data/assets/js/dist/post.min.js +6 -0
  105. data/assets/js/dist/pvreport.min.js +6 -0
  106. data/assets/js/pwa/app.js +47 -0
  107. data/assets/js/pwa/sw.js +90 -0
  108. data/assets/js/pwa/unregister.js +12 -0
  109. data/assets/robots.txt +10 -0
  110. metadata +242 -0
@@ -0,0 +1,103 @@
1
+ <!--
2
+ Recommend the other 3 posts according to the tags and categories of the current post,
3
+ if the number is not enough, use the other latest posts to supplement.
4
+ -->
5
+
6
+ <!-- The total size of related posts -->
7
+ {% assign TOTAL_SIZE = 3 %}
8
+
9
+ <!-- An random integer that bigger than 0 -->
10
+ {% assign TAG_SCORE = 1 %}
11
+
12
+ <!-- Equals to TAG_SCORE / {max_categories_hierarchy} -->
13
+ {% assign CATEGORY_SCORE = 0.5 %}
14
+
15
+ {% assign SEPARATOR = ":" %}
16
+
17
+ {% assign score_list = "" | split: "" %}
18
+ {% assign last_index = site.posts.size | minus: 1 %}
19
+
20
+ {% for i in (0..last_index) %}
21
+ {% assign post = site.posts[i] %}
22
+
23
+ {% if post.url == page.url %}
24
+ {% continue %}
25
+ {% endif %}
26
+
27
+ {% assign score = 0 %}
28
+
29
+ {% for tag in post.tags %}
30
+ {% if page.tags contains tag %}
31
+ {% assign score = score | plus: TAG_SCORE %}
32
+ {% endif %}
33
+ {% endfor %}
34
+
35
+ {% for category in post.categories %}
36
+ {% if page.categories contains category %}
37
+ {% assign score = score | plus: CATEGORY_SCORE %}
38
+ {% endif %}
39
+ {% endfor %}
40
+
41
+ {% if score > 0 %}
42
+ {% capture score_item %}{{ score }}{{ SEPARATOR }}{{ i }}{% endcapture %}
43
+ {% assign score_list = score_list | push: score_item %}
44
+ {% endif %}
45
+
46
+ {% endfor %}
47
+
48
+
49
+ {% assign index_list = "" | split: "" %}
50
+
51
+ {% if score_list.size > 0 %}
52
+ {% assign score_list = score_list | sort | reverse %}
53
+ {% for entry in score_list limit: TOTAL_SIZE %}
54
+ {% assign index = entry | split: SEPARATOR | last %}
55
+ {% assign index_list = index_list | push: index %}
56
+ {% endfor %}
57
+ {% endif %}
58
+
59
+ <!-- Fill with the other newlest posts -->
60
+ {% assign less = TOTAL_SIZE | minus: index_list.size %}
61
+
62
+ {% if less > 0 %}
63
+ {% for i in (0..last_index) %}
64
+ {% assign post = site.posts[i] %}
65
+ {% if post.url != page.url %}
66
+ {% capture cur_index %}{{ i }}{% endcapture %}
67
+ {% unless index_list contains cur_index %}
68
+ {% assign index_list = index_list | push: cur_index %}
69
+ {% assign less = less | minus: 1 %}
70
+ {% if less <= 0 %}
71
+ {% break %}
72
+ {% endif %}
73
+ {% endunless %}
74
+ {% endif %}
75
+ {% endfor %}
76
+ {% endif %}
77
+
78
+ {% if index_list.size > 0 %}
79
+ <div id="related-posts" class="mb-2 mb-sm-4">
80
+ <h3 class="pt-2 mb-4 ml-1"
81
+ data-toc-skip>{{ site.data.locales[site.lang].post.relate_posts }}</h3>
82
+ <div class="card-deck mb-4">
83
+ {% for entry in index_list %}
84
+ {% assign index = entry | plus: 0 %}
85
+ {% assign post = site.posts[index] %}
86
+ <div class="card">
87
+ <a href="{{ post.url | relative_url }}">
88
+ <div class="card-body">
89
+ {% include datetime.html date=post.date class="small" %}
90
+ <h3 class="pt-0 mt-1 mb-3" data-toc-skip>{{ post.title }}</h3>
91
+ <div class="text-muted small">
92
+ <p>
93
+ {% include no-linenos.html content=post.content %}
94
+ {{ content | markdownify | strip_html | truncate: 200 | escape }}
95
+ </p>
96
+ </div>
97
+ </div>
98
+ </a>
99
+ </div>
100
+ {% endfor %}
101
+ </div> <!-- .card-deck -->
102
+ </div> <!-- #related-posts -->
103
+ {% endif %}
@@ -0,0 +1,46 @@
1
+ <!--
2
+ Jekyll Simple Search loader
3
+ See: <https://github.com/christian-fei/Simple-Jekyll-Search>
4
+ -->
5
+
6
+ {% capture result_elem %}
7
+ <div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-lg-4 pr-lg-4 pl-xl-0 pr-xl-0">
8
+ <a href="{url}">{title}</a>
9
+ <div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
10
+ {categories}
11
+ {tags}
12
+ </div>
13
+ <p>{snippet}</p>
14
+ </div>
15
+ {% endcapture %}
16
+
17
+ {% capture not_found %}<p class="mt-5">{{ site.data.locales[site.lang].search.no_results }}</p>{% endcapture %}
18
+
19
+ <script src="{{ site.data.assets[origin].search.js | relative_url }}"></script>
20
+
21
+ <script>
22
+ SimpleJekyllSearch({
23
+ searchInput: document.getElementById('search-input'),
24
+ resultsContainer: document.getElementById('search-results'),
25
+ json: '{{ '/assets/js/data/search.json' | relative_url }}',
26
+ searchResultTemplate: '{{ result_elem | strip_newlines }}',
27
+ noResultsText: '{{ not_found }}',
28
+ templateMiddleware: function(prop, value, template) {
29
+ if (prop === 'categories') {
30
+ if (value === '') {
31
+ return `${value}`;
32
+ } else {
33
+ return `<div class="mr-sm-4"><i class="far fa-folder fa-fw"></i>${value}</div>`;
34
+ }
35
+ }
36
+
37
+ if (prop === 'tags') {
38
+ if (value === '') {
39
+ return `${value}`;
40
+ } else {
41
+ return `<div><i class="fa fa-tag fa-fw"></i>${value}</div>`;
42
+ }
43
+ }
44
+ }
45
+ });
46
+ </script>
@@ -0,0 +1,11 @@
1
+ <!--
2
+ The Search results
3
+ -->
4
+ <div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
5
+ <div class="col-12 col-sm-11 post-content">
6
+ <div id="search-hints">
7
+ {% include trending-tags.html %}
8
+ </div>
9
+ <div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div>
10
+ </div>
11
+ </div>
@@ -0,0 +1,103 @@
1
+ <!--
2
+ The Side Bar
3
+ -->
4
+
5
+ <div id="sidebar" class="d-flex flex-column align-items-end">
6
+ <div class="profile-wrapper text-center">
7
+ <div id="avatar">
8
+ <a href="{{ '/' | relative_url }}" class="mx-auto">
9
+ {% if site.avatar != empty and site.avatar %}
10
+ {% capture avatar_url %}
11
+ {% if site.avatar contains '://' %}
12
+ {{ site.avatar }}
13
+ {% elsif site.img_cdn != empty and site.img_cdn %}
14
+ {{ site.avatar | prepend: site.img_cdn }}
15
+ {% else %}
16
+ {{ site.avatar | relative_url }}
17
+ {% endif %}
18
+ {% endcapture %}
19
+ <img src="{{ avatar_url | strip }}" alt="avatar" onerror="this.style.display='none'">
20
+ {% endif %}
21
+ </a>
22
+ </div>
23
+
24
+ <div class="site-title">
25
+ <a href="{{ '/' | relative_url }}">{{ site.title }}</a>
26
+ </div>
27
+ <div class="site-subtitle font-italic">{{ site.tagline }}</div>
28
+
29
+ </div><!-- .profile-wrapper -->
30
+
31
+ <ul class="w-100">
32
+
33
+ <!-- home -->
34
+ <li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
35
+ <a href="{{ '/' | relative_url }}" class="nav-link">
36
+ <i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i>
37
+ <span>{{ site.data.locales[site.lang].tabs.home | upcase }}</span>
38
+ </a>
39
+ </li>
40
+ <!-- the real tabs -->
41
+ {% for tab in site.tabs %}
42
+ <li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
43
+ <a href="{{ tab.url | relative_url }}" class="nav-link">
44
+ <i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
45
+ {% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
46
+
47
+ <span>{{ site.data.locales[site.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
48
+ </a>
49
+ </li> <!-- .nav-item -->
50
+ {% endfor %}
51
+
52
+ </ul> <!-- ul.nav.flex-column -->
53
+
54
+ <div class="sidebar-bottom mt-auto d-flex flex-wrap justify-content-center align-items-center">
55
+
56
+ {% unless site.theme_mode %}
57
+ <button class="mode-toggle btn" aria-label="Switch Mode">
58
+ <i class="fas fa-adjust"></i>
59
+ </button>
60
+
61
+ {% if site.data.contact.size > 0 %}
62
+ <span class="icon-border"></span>
63
+ {% endif %}
64
+ {% endunless %}
65
+
66
+ {% for entry in site.data.contact %}
67
+ {% capture url %}
68
+ {%- if entry.type == 'github' -%}
69
+ https://github.com/{{ site.github.username }}
70
+ {%- elsif entry.type == 'twitter' -%}
71
+ https://twitter.com/{{ site.twitter.username }}
72
+ {%- elsif entry.type == 'email' -%}
73
+ {% assign email = site.social.email | split: '@' %}
74
+ javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
75
+ {%- elsif entry.type == 'rss' -%}
76
+ {{ "/feed.xml" | relative_url }}
77
+ {%- else -%}
78
+ {{ entry.url }}
79
+ {%- endif -%}
80
+ {% endcapture %}
81
+
82
+ {% if url %}
83
+ <a href="{{ url }}" aria-label="{{ entry.type }}"
84
+ {% assign link_types = nil %}
85
+ {% unless entry.noblank %}
86
+ {% assign link_types = link_types | append: " noopener" %}
87
+ target="_blank"
88
+ {% endunless %}
89
+
90
+ {% if entry.type == 'mastodon' %}
91
+ {% assign link_types = link_types | append: " me" %}
92
+ {% endif %}
93
+
94
+ {% if link_types %}rel="{{ link_types | lstrip }}"{% endif %}>
95
+ <i class="{{ entry.icon }}"></i>
96
+ </a>
97
+ {% endif %}
98
+
99
+ {% endfor %}
100
+
101
+ </div> <!-- .sidebar-bottom -->
102
+
103
+ </div><!-- #sidebar -->
@@ -0,0 +1,16 @@
1
+ {% assign enable_toc = false %}
2
+ {% if site.toc and page.toc %}
3
+ {% if page.content contains '<h2' or page.content contains '<h3' %}
4
+ {% assign enable_toc = true %}
5
+ {% endif %}
6
+ {% endif %}
7
+
8
+ {% if enable_toc %}
9
+ <!-- BS-toc.js will be loaded at medium priority -->
10
+ <script src="{{ site.data.assets[origin].bootstrap-toc.js | relative_url }}"></script>
11
+
12
+ <div id="toc-wrapper" class="pl-0 pr-4 mb-5">
13
+ <div class="panel-heading pl-3 pt-2 mb-2">{{- site.data.locales[site.lang].panel.toc -}}</div>
14
+ <nav id="toc" data-toggle="toc"></nav>
15
+ </div>
16
+ {% endif %}
@@ -0,0 +1,70 @@
1
+ <!--
2
+ The Top Bar
3
+ -->
4
+
5
+ <div id="topbar-wrapper">
6
+ <div id="topbar" class="container d-flex align-items-center justify-content-between h-100 pl-3 pr-3 pl-md-4 pr-md-4">
7
+ <span id="breadcrumb">
8
+
9
+ {% assign paths = page.url | split: '/' %}
10
+
11
+ {% if paths.size == 0 or page.layout == 'home' %}
12
+ <!-- index page -->
13
+ <span>{{ site.data.locales[site.lang].tabs.home | capitalize }}</span>
14
+
15
+ {% else %}
16
+
17
+ {% for item in paths %}
18
+
19
+ {% if forloop.first %}
20
+ <span>
21
+ <a href="{{ '/' | relative_url }}">
22
+ {{ site.data.locales[site.lang].tabs.home | capitalize }}
23
+ </a>
24
+ </span>
25
+
26
+ {% elsif forloop.last %}
27
+
28
+ {% if page.collection == 'tabs' %}
29
+ <span>{{ site.data.locales[site.lang].tabs[item] | default: page.title }}</span>
30
+ {% else %}
31
+ <span>{{ page.title }}</span>
32
+ {% endif %}
33
+
34
+ {% elsif page.layout == 'category' or page.layout == 'tag' %}
35
+ <span>
36
+ <a href="{{ item | relative_url }}">
37
+ {{ site.data.locales[site.lang].tabs[item] | default: page.title }}
38
+ </a>
39
+ </span>
40
+ {% endif %}
41
+
42
+ {% endfor %}
43
+
44
+ {% endif %}
45
+
46
+ </span><!-- endof #breadcrumb -->
47
+
48
+ <i id="sidebar-trigger" class="fas fa-bars fa-fw"></i>
49
+
50
+ <div id="topbar-title">
51
+ {% if page.layout == 'home' %}
52
+ {{- site.data.locales[site.lang].title | default: site.title -}}
53
+ {% elsif page.collection == 'tabs' or page.layout == 'page' %}
54
+ {%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
55
+ {{- site.data.locales[site.lang].tabs[tab_key] | default: page.title -}}
56
+ {% else %}
57
+ {{- site.data.locales[site.lang].layout[page.layout] | default: page.layout | capitalize -}}
58
+ {% endif %}
59
+ </div>
60
+
61
+ <i id="search-trigger" class="fas fa-search fa-fw"></i>
62
+ <span id="search-wrapper" class="align-items-center">
63
+ <i class="fas fa-search fa-fw"></i>
64
+ <input class="form-control" id="search-input" type="search"
65
+ aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[site.lang].search.hint | capitalize }}...">
66
+ </span>
67
+ <span id="search-cancel" >{{ site.data.locales[site.lang].search.cancel }}</span>
68
+ </div>
69
+
70
+ </div>
@@ -0,0 +1,50 @@
1
+ {% comment %}
2
+ The trending tags list
3
+ {% endcomment %}
4
+
5
+ {% assign MAX = 10 %}
6
+
7
+ {% assign size_list = "" | split: "" %}
8
+ {% assign tag_list = "" | split: "" %}
9
+
10
+ {% for tag in site.tags %}
11
+ {% assign size = tag | last | size %}
12
+ {% assign size_list = size_list | push: size %}
13
+
14
+ {% assign tag_str = tag | first | append: "::" | append: size %}
15
+ {% assign tag_list = tag_list | push: tag_str %}
16
+ {% endfor %}
17
+
18
+ {% assign size_list = size_list | sort | reverse %}
19
+
20
+ {% assign tag_list = tag_list | sort_natural %}
21
+
22
+ {% assign trending_tags = "" | split: "" %}
23
+
24
+ {% for size in size_list limit: MAX %}
25
+ {% for tag_str in tag_list %}
26
+ {% assign tag = tag_str | split: "::" %}
27
+ {% assign tag_name = tag | first %}
28
+ {% assign tag_size = tag | last | plus: 0 %}
29
+ {% if tag_size == size %}
30
+ {% unless trending_tags contains tag_name %}
31
+ {% assign trending_tags = trending_tags | push: tag_name %}
32
+ {% break %}
33
+ {% endunless %}
34
+ {% endif %}
35
+ {% endfor %}
36
+ {% endfor %}
37
+
38
+ {% if trending_tags.size > 0 %}
39
+ <div id="access-tags">
40
+ <div class="panel-heading">{{- site.data.locales[site.lang].panel.trending_tags -}}</div>
41
+ <div class="d-flex flex-wrap mt-3 mb-1 mr-3">
42
+
43
+ {% for tag_name in trending_tags %}
44
+ {% assign url = tag_name | slugify | url_encode | prepend: "/tags/" | append: "/" %}
45
+ <a class="post-tag" href="{{ url | relative_url }}">{{ tag_name }}</a>
46
+ {% endfor %}
47
+
48
+ </div>
49
+ </div>
50
+ {% endif %}
@@ -0,0 +1,40 @@
1
+ {% comment %}
2
+ Get the last 5 posts from lastmod list.
3
+ {% endcomment %}
4
+
5
+ {% assign MAX_SIZE = 5 %}
6
+
7
+ {% assign all_list = "" | split: "" %}
8
+
9
+ {% for post in site.posts %}
10
+ {% if post.last_modified_at %}
11
+ {% capture elem %}
12
+ {{- post.last_modified_at | date: "%Y%m%d%H%M%S" -}}::{{- forloop.index0 -}}
13
+ {% endcapture %}
14
+ {% assign all_list = all_list | push: elem %}
15
+ {% endif %}
16
+ {% endfor %}
17
+
18
+ {% assign all_list = all_list | sort | reverse %}
19
+
20
+ {% assign update_list = "" | split: "" %}
21
+
22
+ {% for entry in all_list limit:MAX_SIZE %}
23
+ {% assign update_list = update_list | push: entry %}
24
+ {% endfor %}
25
+
26
+ {% if update_list.size > 0 %}
27
+
28
+ <div id="access-lastmod" class="post">
29
+ <div class="panel-heading">{{- site.data.locales[site.lang].panel.lastmod -}}</div>
30
+ <ul class="post-content pl-0 pb-1 ml-1 mt-2">
31
+ {% for item in update_list %}
32
+ {% assign index = item | split: "::" | last | plus: 0 %}
33
+ {% assign post = site.posts[index] %}
34
+ {% assign url = post.url | relative_url %}
35
+ <li><a href="{{ url }}">{{ post.title }}</a></li>
36
+ {% endfor %}
37
+ </ul>
38
+ </div> <!-- #access-lastmod -->
39
+
40
+ {% endif %}
@@ -0,0 +1,34 @@
1
+ ---
2
+ layout: page
3
+ # The Archives of posts.
4
+ ---
5
+
6
+ {% assign df_strftime_m = site.data.locales[site.lang].df.archives.strftime | default: '/ %m' %}
7
+ {% assign df_dayjs_m = site.data.locales[site.lang].df.archives.dayjs | default: '/ MM' %}
8
+
9
+ <div id="archives" class="pl-xl-3">
10
+
11
+ {% for post in site.posts %}
12
+ {% capture cur_year %}{{ post.date | date: "%Y" }}{% endcapture %}
13
+
14
+ {% if cur_year != last_year %}
15
+ {% unless forloop.first %}</ul>{% endunless %}
16
+ <div class="year lead">{{ cur_year }}</div>
17
+ <ul class="list-unstyled">
18
+ {% assign last_year = cur_year %}
19
+ {% endif %}
20
+
21
+ <li>
22
+ {% assign ts = post.date | date: '%s' %}
23
+ <span class="date day" data-ts="{{ ts }}" data-df="DD">{{ post.date | date: "%d" }}</span>
24
+ <span class="date month small text-muted ml-1" data-ts="{{ ts }}" data-df="{{ df_dayjs_m }}">
25
+ {{ post.date | date: df_strftime_m }}
26
+ </span>
27
+ <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
28
+ </li>
29
+
30
+ {% if forloop.last %}</ul>{% endif %}
31
+
32
+ {% endfor %}
33
+
34
+ </div>
@@ -0,0 +1,118 @@
1
+ ---
2
+ layout: page
3
+ # All the Categories of posts
4
+ ---
5
+
6
+ {% assign HEAD_PREFIX = "h_" %}
7
+ {% assign LIST_PREFIX = "l_" %}
8
+
9
+ {% assign group_index = 0 %}
10
+
11
+ {% assign sort_categories = site.categories | sort %}
12
+
13
+ {% for category in sort_categories %}
14
+ {% assign category_name = category | first %}
15
+ {% assign posts_of_category = category | last %}
16
+ {% assign first_post = posts_of_category | first %}
17
+
18
+ {% if category_name == first_post.categories[0] %}
19
+ {% assign sub_categories = "" | split: "" %}
20
+
21
+ {% for post in posts_of_category %}
22
+ {% assign second_category = post.categories[1] %}
23
+ {% if second_category %}
24
+ {% unless sub_categories contains second_category %}
25
+ {% assign sub_categories = sub_categories | push: second_category %}
26
+ {% endunless %}
27
+ {% endif %}
28
+ {% endfor %}
29
+
30
+ {% assign sub_categories = sub_categories | sort %}
31
+ {% assign sub_categories_size = sub_categories | size %}
32
+
33
+ <div class="card categories">
34
+ <!-- top-category -->
35
+ <div id="{{ HEAD_PREFIX }}{{ group_index }}"
36
+ class="card-header d-flex justify-content-between hide-border-bottom">
37
+ <span>
38
+ <i class="far fa-folder{% if sub_categories_size > 0 %}-open{% endif %} fa-fw"></i>
39
+
40
+ {% capture _category_url %}/categories/{{ category_name | slugify | url_encode }}/{% endcapture %}
41
+ <a href="{{ _category_url | relative_url }}" class="ml-1 mr-2">{{ category_name }}</a>
42
+
43
+ <!-- content count -->
44
+ {% assign top_posts_size = site.categories[category_name] | size %}
45
+ <span class="text-muted small font-weight-light">
46
+ {% if sub_categories_size > 0 %}
47
+ {{ sub_categories_size }}
48
+ {% if sub_categories_size > 1 %}
49
+ {{ site.data.locales[site.lang].categories.category_measure.plural
50
+ | default: site.data.locales[site.lang].categories.category_measure }}
51
+ {% else %}
52
+ {{ site.data.locales[site.lang].categories.category_measure.singular
53
+ | default: site.data.locales[site.lang].categories.category_measure }}
54
+ {% endif %},
55
+ {% endif %}
56
+
57
+ {{ top_posts_size }}
58
+
59
+ {% if top_posts_size > 1 %}
60
+ {{ site.data.locales[site.lang].categories.post_measure.plural
61
+ | default: site.data.locales[site.lang].categories.post_measure }}
62
+ {% else %}
63
+ {{ site.data.locales[site.lang].categories.post_measure.singular
64
+ | default: site.data.locales[site.lang].categories.post_measure }}
65
+ {% endif %}
66
+ </span>
67
+ </span>
68
+
69
+ <!-- arrow -->
70
+ {% if sub_categories_size > 0%}
71
+ <a href="#{{ LIST_PREFIX }}{{ group_index }}" data-toggle="collapse"
72
+ aria-expanded="true" aria-label="{{ HEAD_PREFIX }}{{ group_index }}-trigger"
73
+ class="category-trigger hide-border-bottom">
74
+ <i class="fas fa-fw fa-angle-down"></i>
75
+ </a>
76
+ {% else %}
77
+ <span data-toggle="collapse" class="category-trigger hide-border-bottom disabled">
78
+ <i class="fas fa-fw fa-angle-right"></i>
79
+ </span>
80
+ {% endif %}
81
+
82
+ </div> <!-- .card-header -->
83
+
84
+ <!-- Sub-categories -->
85
+ {% if sub_categories_size > 0 %}
86
+ <div id="{{ LIST_PREFIX }}{{ group_index }}" class="collapse show" aria-expanded="true">
87
+ <ul class="list-group">
88
+ {% for sub_category in sub_categories %}
89
+ <li class="list-group-item">
90
+ <i class="far fa-folder fa-fw"></i>
91
+
92
+ {% capture _sub_ctg_url %}/categories/{{ sub_category | slugify | url_encode }}/{% endcapture %}
93
+ <a href="{{ _sub_ctg_url | relative_url }}" class="ml-1 mr-2">{{ sub_category }}</a>
94
+
95
+ {% assign posts_size = site.categories[sub_category] | size %}
96
+ <span class="text-muted small font-weight-light">
97
+ {{ posts_size }}
98
+
99
+ {% if posts_size > 1 %}
100
+ {{ site.data.locales[site.lang].categories.post_measure.plural
101
+ | default: site.data.locales[site.lang].categories.post_measure }}
102
+ {% else %}
103
+ {{ site.data.locales[site.lang].categories.post_measure.singular
104
+ | default: site.data.locales[site.lang].categories.post_measure }}
105
+ {% endif %}
106
+ </span>
107
+ </li>
108
+ {% endfor %}
109
+ </ul>
110
+ </div>
111
+ {% endif %}
112
+
113
+ </div> <!-- .card -->
114
+
115
+ {% assign group_index = group_index | plus: 1 %}
116
+
117
+ {% endif %}
118
+ {% endfor %}
@@ -0,0 +1,22 @@
1
+ ---
2
+ layout: page
3
+ # The Category layout
4
+ ---
5
+
6
+ <div id="page-category">
7
+ <h1 class="pl-lg-2">
8
+ <i class="far fa-folder-open fa-fw text-muted"></i>
9
+ {{ page.title }}
10
+ <span class="lead text-muted pl-2">{{ page.posts | size }}</span>
11
+ </h1>
12
+
13
+ <ul class="post-content pl-0">
14
+ {% for post in page.posts %}
15
+ <li class="d-flex justify-content-between pl-md-3 pr-md-3">
16
+ <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
17
+ <span class="dash flex-grow-1"></span>
18
+ {% include datetime.html date=post.date wrap='span' class='text-muted small' %}
19
+ </li>
20
+ {% endfor %}
21
+ </ul>
22
+ </div>
@@ -0,0 +1,10 @@
1
+ ---
2
+ # Jekyll layout that compresses HTML
3
+ # v3.1.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" %}{{ 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 %}