jekyll-theme-chirpy 5.3.0 → 5.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/_data/assets/cross_origin.yml +3 -3
  4. data/_data/assets/self_host.yml +2 -2
  5. data/_data/locales/en.yml +10 -0
  6. data/_data/locales/hu-HU.yml +2 -2
  7. data/_data/locales/ko-KR.yml +7 -0
  8. data/_data/locales/pt-BR.yml +1 -1
  9. data/_data/locales/zh-CN.yml +8 -1
  10. data/_includes/comments/disqus.html +11 -11
  11. data/_includes/comments/giscus.html +1 -1
  12. data/_includes/datetime.html +2 -8
  13. data/_includes/footer.html +26 -26
  14. data/_includes/head.html +15 -21
  15. data/_includes/js-selector.html +1 -5
  16. data/_includes/mermaid.html +12 -10
  17. data/_includes/post-nav.html +4 -4
  18. data/_includes/post-sharing.html +3 -3
  19. data/_includes/read-time.html +3 -3
  20. data/_includes/refactor-content.html +10 -12
  21. data/_includes/related-posts.html +1 -1
  22. data/_includes/search-loader.html +1 -1
  23. data/_includes/sidebar.html +3 -3
  24. data/_includes/toc.html +1 -1
  25. data/_includes/topbar.html +9 -9
  26. data/_includes/trending-tags.html +1 -1
  27. data/_includes/update-list.html +1 -1
  28. data/_layouts/archives.html +2 -9
  29. data/_layouts/categories.html +12 -14
  30. data/_layouts/category.html +0 -2
  31. data/_layouts/default.html +6 -9
  32. data/_layouts/home.html +1 -3
  33. data/_layouts/page.html +4 -6
  34. data/_layouts/post.html +10 -12
  35. data/_layouts/tag.html +0 -2
  36. data/_sass/addon/commons.scss +134 -136
  37. data/_sass/addon/module.scss +5 -2
  38. data/_sass/addon/syntax.scss +14 -20
  39. data/_sass/addon/variables.scss +0 -4
  40. data/_sass/colors/dark-syntax.scss +17 -18
  41. data/_sass/colors/dark-typography.scss +22 -22
  42. data/_sass/colors/light-syntax.scss +2 -3
  43. data/_sass/colors/light-typography.scss +13 -14
  44. data/_sass/jekyll-theme-chirpy.scss +1 -1
  45. data/_sass/layout/archives.scss +4 -12
  46. data/_sass/layout/categories.scss +12 -13
  47. data/_sass/layout/category-tag.scss +4 -4
  48. data/_sass/layout/home.scss +19 -25
  49. data/_sass/layout/post.scss +132 -136
  50. data/_sass/layout/tags.scss +1 -1
  51. data/assets/404.html +1 -3
  52. data/assets/js/data/search.json +3 -1
  53. data/assets/js/data/swcache.js +35 -36
  54. data/assets/js/dist/categories.min.js +2 -2
  55. data/assets/js/dist/commons.min.js +2 -2
  56. data/assets/js/dist/home.min.js +2 -2
  57. data/assets/js/dist/misc.min.js +2 -2
  58. data/assets/js/dist/page.min.js +2 -2
  59. data/assets/js/dist/post.min.js +2 -2
  60. data/assets/js/dist/pvreport.min.js +2 -2
  61. data/assets/js/pwa/app.js +33 -33
  62. data/assets/js/pwa/sw.js +54 -53
  63. data/assets/js/pwa/unregister.js +5 -5
  64. metadata +2 -10
  65. data/_config.yml +0 -201
  66. data/_includes/lang.html +0 -8
  67. data/_plugins/posts-lastmod-hook.rb +0 -14
  68. data/_tabs/about.md +0 -8
  69. data/_tabs/archives.md +0 -6
  70. data/_tabs/categories.md +0 -5
  71. data/_tabs/tags.md +0 -5
  72. data/index.html +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0239149b41742d66e3b864c67ab2b1835965abd153d5ed201243cd104e34ae3b'
4
- data.tar.gz: 0f889d93017e60db13b017e7517baa51538298a3b5eae87913c8ce2fee7ae4d7
3
+ metadata.gz: e41cb04667d603c381a6aa8e231c57faf6bda11954062aa72af53c4b9f718d4c
4
+ data.tar.gz: 4fd7e8955a48fef7aad7419de3a0922eaf560b5e8cd352fe072da9c0992ffbc7
5
5
  SHA512:
6
- metadata.gz: 76d27c451fb2b452882bc639666403a59d0b091312e7269a2e67e8d1106494850f01312588261049aedb147864599e80910c3b5e5140d624c5a9a87551265569
7
- data.tar.gz: dc40b45641186e538e17a1e03ae560e582a08bcf3310d9c085534e85cec5e6ba61da41a66db1ba4708e8f83628d2ff1421bf8798d94332ebda532bd2c85f7031
6
+ metadata.gz: 2fceeed912b19646cb445f22db8b5e69b3c7e1e12f1441a9f10265e08c018d6d11ba7ec404df00479cc68bdc6df20d8958d88068c879bc43d0f04d18c030a27a
7
+ data.tar.gz: 951db9e3015c1d599c982388ba12adbdfa93ce763d93bd82e0994940efaa295a76fbc59c1eefa81ba9ea356b21a6a56910c8725a94a60d3939dcc6d44bc8289f
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  A minimal, responsive, and powerful Jekyll theme for presenting professional writing.
6
6
 
7
7
  [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
8
- [![Build Status](https://github.com/cotes2020/jekyll-theme-chirpy/workflows/build/badge.svg?branch=master&event=push)](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush)
8
+ [![CI](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml/badge.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml)
9
9
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)](https://www.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade)
10
10
  [![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
11
11
  [![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
@@ -102,4 +102,4 @@ This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chi
102
102
  <!-- ReadMe links -->
103
103
 
104
104
  [jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
105
- [cn-donation]: https://cotes.gitee.io/alipay-wechat-donation/
105
+ [cn-donation]: https://sponsor.cotes.page/
@@ -27,13 +27,13 @@ bootstrap-toc:
27
27
  js: https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@1.0.1/dist/bootstrap-toc.min.js
28
28
 
29
29
  fontawesome:
30
- css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.11.2/css/all.min.css
30
+ css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css
31
31
 
32
32
  search:
33
33
  js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js
34
34
 
35
35
  mermaid:
36
- js: https://cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js
36
+ js: https://cdn.jsdelivr.net/npm/mermaid@9/dist/mermaid.min.js
37
37
 
38
38
  dayjs:
39
39
  js:
@@ -53,7 +53,7 @@ lozad:
53
53
  js: https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js
54
54
 
55
55
  clipboard:
56
- js: https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js
56
+ js: https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js
57
57
 
58
58
  polyfill:
59
59
  js: https://polyfill.io/v3/polyfill.min.js?features=es6
@@ -16,13 +16,13 @@ bootstrap-toc:
16
16
  js: /assets/lib/bootstrap-toc-1.0.1/bootstrap-toc.min.js
17
17
 
18
18
  fontawesome:
19
- css: /assets/lib/fontawesome-free-5.15.4/css/all.min.css
19
+ css: /assets/lib/fontawesome-free-6.2.1/css/all.min.css
20
20
 
21
21
  search:
22
22
  js: /assets/lib/simple-jekyll-search-1.10.0/simple-jekyll-search.min.js
23
23
 
24
24
  mermaid:
25
- js: /assets/lib/mermaid-8.13.10/mermaid.min.js
25
+ js: /assets/lib/mermaid-9.1.7/mermaid.min.js
26
26
 
27
27
  dayjs:
28
28
  js:
data/_data/locales/en.yml CHANGED
@@ -73,6 +73,16 @@ post:
73
73
  # pinned prompt of posts list on homepage
74
74
  pin_prompt: Pinned
75
75
 
76
+ # Date time format.
77
+ # See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
78
+ df:
79
+ post:
80
+ strftime: '%b %e, %Y'
81
+ dayjs: 'll'
82
+ archives:
83
+ strftime: '%b'
84
+ dayjs: 'MMM'
85
+
76
86
  # categories page
77
87
  categories:
78
88
  category_measure:
@@ -38,8 +38,8 @@ copyright:
38
38
  # Displayed in the footer
39
39
  brief: Néhány jog fenntartva.
40
40
  verbose: >-
41
- Az oldalon található tartalmak
42
- Creative Commons Attribution 4.0 International (CC BY 4.0) licenccel rendelkeznek,
41
+ Az oldalon található tartalmak
42
+ Creative Commons Attribution 4.0 International (CC BY 4.0) licenccel rendelkeznek,
43
43
  hacsak másképp nincs jelezve.
44
44
 
45
45
  meta: Készítve :PLATFORM motorral :THEME témával.
@@ -73,6 +73,13 @@ post:
73
73
  # pinned prompt of posts list on homepage
74
74
  pin_prompt: 핀
75
75
 
76
+ # Date time format.
77
+ # See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
78
+ df:
79
+ post:
80
+ strftime: '%Y/%m/%d'
81
+ dayjs: 'YYYY/MM/DD'
82
+
76
83
  # categories page
77
84
  categories:
78
85
  category_measure: 카테고리
@@ -37,7 +37,7 @@ copyright:
37
37
  # Displayed in the footer
38
38
  brief: Alguns direitos reservados.
39
39
  verbose: >-
40
- Exceto onde indicado de outra forma, as postagens do blog neste site são licenciadas sob a
40
+ Exceto onde indicado de outra forma, as postagens do blog neste site são licenciadas sob a
41
41
  Creative Commons Attribution 4.0 International (CC BY 4.0) License pelo autor.
42
42
 
43
43
  meta: Feito com :PLATFORM usando o tema :THEME.
@@ -67,11 +67,18 @@ post:
67
67
  copy_code:
68
68
  succeed: 已复制!
69
69
  share_link:
70
- title: 分享链接
70
+ title: 分享链接
71
71
  succeed: 链接已复制!
72
72
  # pinned prompt of posts list on homepage
73
73
  pin_prompt: 顶置
74
74
 
75
+ # Date time format.
76
+ # See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
77
+ df:
78
+ post:
79
+ strftime: '%Y/%m/%d'
80
+ dayjs: 'YYYY/MM/DD'
81
+
75
82
  # categories page
76
83
  categories:
77
84
  category_measure: 个分类
@@ -15,7 +15,6 @@
15
15
  };
16
16
 
17
17
  /* Lazy loading */
18
-
19
18
  var disqus_observer = new IntersectionObserver(function (entries) {
20
19
  if(entries[0].isIntersecting) {
21
20
  (function () {
@@ -32,23 +31,24 @@
32
31
  disqus_observer.observe(document.querySelector('#disqus_thread'));
33
32
 
34
33
  /* Auto switch theme */
35
-
36
34
  function reloadDisqus() {
37
- /* Disqus hasn't been loaded */
38
- if (typeof DISQUS === "undefined") {
39
- return;
40
- }
41
-
42
- if (document.readyState == 'complete') {
43
- DISQUS.reset({ reload: true, config: disqus_config });
35
+ if (event.source === window && event.data &&
36
+ event.data.direction === ModeToggle.ID) {
37
+ /* Disqus hasn't been loaded */
38
+ if (typeof DISQUS === "undefined") {
39
+ return;
40
+ }
41
+
42
+ if (document.readyState == 'complete') {
43
+ DISQUS.reset({ reload: true, config: disqus_config });
44
+ }
44
45
  }
45
46
  }
46
47
 
47
48
  const modeToggle = document.querySelector(".mode-toggle");
48
49
 
49
50
  if (typeof modeToggle !== "undefined") {
50
- /* modeToggle.addEventListener('click', reloadDisqus); // not pretty for 'color-scheme' */
51
- window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', reloadDisqus);
51
+ window.addEventListener("message", reloadDisqus);
52
52
  }
53
53
 
54
54
  </script>
@@ -20,7 +20,7 @@
20
20
  "data-category": "{{ site.comments.giscus.category }}",
21
21
  "data-category-id": "{{ site.comments.giscus.category_id }}",
22
22
  "data-mapping": "{{ site.comments.giscus.mapping | default: 'pathname' }}",
23
- "data-reactions-enabled": "1",
23
+ "data-reactions-enabled": "{{ site.comments.giscus.reactions_enabled | default: '1' }}",
24
24
  "data-emit-metadata": "0",
25
25
  "data-theme": initTheme,
26
26
  "data-input-position": "{{ site.comments.giscus.input_position | default: 'bottom' }}",
@@ -4,14 +4,8 @@
4
4
  -->
5
5
 
6
6
  {% assign wrap_elem = include.wrap | default: 'em' %}
7
-
8
- {% if site.prefer_datetime_locale == 'en' or lang == 'en' %}
9
- {% assign df_strftime = '%b %e, %Y' %}
10
- {% assign df_dayjs = 'll' %}
11
- {% else %}
12
- {% assign df_strftime = '%F' %}
13
- {% assign df_dayjs = 'YYYY-MM-DD' %}
14
- {% endif %}
7
+ {% assign df_strftime = site.data.locales[site.lang].df.post.strftime | default: '%d/%m/%Y' %}
8
+ {% assign df_dayjs = site.data.locales[site.lang].df.post.dayjs | default: 'DD/MM/YYYY' %}
15
9
 
16
10
  <{{ wrap_elem }} class="{% if include.class %}{{ include.class }}{% endif %}"
17
11
  data-ts="{{ include.date | date: '%s' }}"
@@ -1,36 +1,36 @@
1
1
  <!-- The Footer -->
2
2
 
3
- <footer class="row pl-3 pr-3">
4
- <div class="col-12 d-flex justify-content-between align-items-center text-muted pl-0 pr-0">
5
- <div class="footer-left">
6
- <p class="mb-0">
7
- © {{ 'now' | date: "%Y" }}
8
- <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
9
- {% if site.data.locales[lang].copyright.brief %}
10
- <span data-toggle="tooltip" data-placement="top"
11
- title="{{ site.data.locales[lang].copyright.verbose }}">{{ site.data.locales[lang].copyright.brief }}</span>
12
- {% endif %}
13
- </p>
14
- </div>
3
+ <footer>
4
+ <div class="container pl-lg-4 pr-lg-4">
5
+ <div class="d-flex justify-content-between align-items-center text-muted ml-md-3 mr-md-3">
6
+ <div class="footer-left">
7
+ <p class="mb-0">
8
+ © {{ 'now' | date: "%Y" }}
9
+ <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
10
+ {% if site.data.locales[site.lang].copyright.brief %}
11
+ <span data-toggle="tooltip" data-placement="top"
12
+ title="{{ site.data.locales[site.lang].copyright.verbose }}">{{ site.data.locales[site.lang].copyright.brief }}</span>
13
+ {% endif %}
14
+ </p>
15
+ </div>
16
+
17
+ <div class="footer-right">
18
+ <p class="mb-0">
15
19
 
16
- <div class="footer-right">
17
- <p class="mb-0">
18
- {% capture _platform %}
20
+ {% capture _platform %}
19
21
  <a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
20
- {% endcapture %}
22
+ {% endcapture %}
21
23
 
22
- {% capture _theme %}
24
+ {% capture _theme %}
23
25
  <a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a>
24
- {% endcapture %}
25
-
26
- {{ site.data.locales[lang].meta
27
- | default: 'Powered by :PLATFORM with :THEME theme.'
28
- | replace: ':PLATFORM', _platform | replace: ':THEME', _theme
29
- }}
26
+ {% endcapture %}
30
27
 
31
- </p>
28
+ {{ site.data.locales[site.lang].meta
29
+ | default: 'Powered by :PLATFORM with :THEME theme.'
30
+ | replace: ':PLATFORM', _platform | replace: ':THEME', _theme
31
+ }}
32
+ </p>
33
+ </div>
32
34
  </div>
33
-
34
35
  </div>
35
-
36
36
  </footer>
data/_includes/head.html CHANGED
@@ -6,11 +6,6 @@
6
6
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
8
8
 
9
- <!-- Allow having a localized datetime different from the appearance language -->
10
- {% if site.prefer_datetime_locale %}
11
- <meta name="prefer-datetime-locale" content="{{ site.prefer_datetime_locale }}">
12
- {% endif %}
13
-
14
9
  {% if page.layout == 'home' or page.layout == 'post' %}
15
10
 
16
11
  {% if site.google_analytics.pv.proxy_endpoint %}
@@ -27,23 +22,22 @@
27
22
  {% seo title=false %}
28
23
  {% endcapture %}
29
24
 
30
- {% if site.img_cdn and seo_tags contains 'og:image' %}
31
- {% assign properties = 'og:image,twitter:image' | split: ',' %}
32
-
33
- {% for prop in properties %}
34
- {% if site.img_cdn contains '//' %}
35
- <!-- `site.img_cdn` is a cross-origin URL -->
36
- {% capture target %}<meta property="{{ prop }}" content="{{ site.url }}{% endcapture %}
37
- {% capture replacement %}<meta property="{{ prop }}" content="{{ site.img_cdn }}{% endcapture %}
38
- {% else %}
39
- <!-- `site.img_cdn` is a local file path -->
40
- {% capture target %}<meta property="{{ prop }}" content="{{ site.url }}{{ site.baseurl }}{% endcapture %}
41
- {% assign replacement = target | append: site.img_cdn %}
42
- {% endif %}
43
-
44
- {% assign seo_tags = seo_tags | replace: target, replacement %}
25
+ {% if page.image %}
26
+ {% assign img = page.image.path | default: page.image %}
27
+ {% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %}
28
+ {% capture target %}"{{ img | absolute_url }}"{% endcapture %}
29
+
30
+ {% if site.img_cdn contains '//' %}
31
+ <!-- it's a cross-origin URL -->
32
+ {% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %}
33
+ {% else %}
34
+ <!-- it's a local file path -->
35
+ {%- capture replacement -%}
36
+ "{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}"
37
+ {%- endcapture -%}
38
+ {% endif %}
45
39
 
46
- {% endfor %}
40
+ {% assign seo_tags = seo_tags | replace: target, replacement %}
47
41
  {% endif %}
48
42
 
49
43
  {{ seo_tags }}
@@ -29,11 +29,7 @@
29
29
  or page.layout == 'category'
30
30
  or page.layout == 'tag' %}
31
31
 
32
- {% if site.prefer_datetime_locale %}
33
- {% assign locale = site.prefer_datetime_locale | downcase %}
34
- {% else %}
35
- {% assign locale = site.lang | split: '-' | first %}
36
- {% endif %}
32
+ {% assign locale = site.lang | split: '-' | first %}
37
33
 
38
34
  {% assign _urls = site.data.assets[origin].dayjs.js.common
39
35
  | append: ',' | append: site.data.assets[origin].dayjs.js.locale
@@ -5,10 +5,11 @@
5
5
  <script src="{{ site.data.assets[origin].mermaid.js | relative_url }}"></script>
6
6
 
7
7
  <script>
8
- $(function() {
8
+ (function () {
9
+
9
10
  function updateMermaid(event) {
10
11
  if (event.source === window && event.data &&
11
- event.data.direction === ModeToggle.ID) {
12
+ event.data.direction === ModeToggle.ID) {
12
13
 
13
14
  const mode = event.data.message;
14
15
 
@@ -16,11 +17,11 @@
16
17
  return;
17
18
  }
18
19
 
19
- let expectedTheme = (mode === ModeToggle.DARK_MODE? "dark" : "default");
20
- let config = { theme: expectedTheme };
20
+ let expectedTheme = (mode === ModeToggle.DARK_MODE ? "dark" : "default");
21
+ let config = {theme: expectedTheme};
21
22
 
22
23
  /* Re-render the SVG › <https://github.com/mermaid-js/mermaid/issues/311#issuecomment-332557344> */
23
- $(".mermaid").each(function() {
24
+ $(".mermaid").each(function () {
24
25
  let svgCode = $(this).prev().children().html();
25
26
  $(this).removeAttr("data-processed");
26
27
  $(this).html(svgCode);
@@ -35,7 +36,7 @@
35
36
 
36
37
  if ($("html[data-mode=dark]").length > 0
37
38
  || ($("html[data-mode]").length == 0
38
- && window.matchMedia("(prefers-color-scheme: dark)").matches ) ) {
39
+ && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
39
40
  initTheme = "dark";
40
41
  }
41
42
 
@@ -43,15 +44,16 @@
43
44
  theme: initTheme /* <default|dark|forest|neutral> */
44
45
  };
45
46
 
46
- /* Markdown converts to HTML */
47
- $("pre").has("code.language-mermaid").each(function() {
47
+ /* Create mermaid tag */
48
+ $("pre").has("code.language-mermaid").each(function () {
48
49
  let svgCode = $(this).children().html();
49
50
  $(this).addClass("unloaded");
50
- $(this).after(`<div class=\"mermaid\">${svgCode}</div>`);
51
+ $(this).after(`<pre class=\"mermaid\">${svgCode}</pre>`);
51
52
  });
52
53
 
53
54
  mermaid.initialize(mermaidConf);
54
55
 
55
56
  window.addEventListener("message", updateMermaid);
56
- });
57
+ })();
58
+
57
59
  </script>
@@ -5,24 +5,24 @@
5
5
  <div class="post-navigation d-flex justify-content-between">
6
6
  {% if page.previous.url %}
7
7
  <a href="{{ site.baseurl }}{{ page.previous.url }}" class="btn btn-outline-primary"
8
- prompt="{{ site.data.locales[lang].post.button.previous }}">
8
+ prompt="{{ site.data.locales[site.lang].post.button.previous }}">
9
9
  <p>{{ page.previous.title }}</p>
10
10
  </a>
11
11
  {% else %}
12
12
  <div class="btn btn-outline-primary disabled"
13
- prompt="{{ site.data.locales[lang].post.button.previous }}">
13
+ prompt="{{ site.data.locales[site.lang].post.button.previous }}">
14
14
  <p>-</p>
15
15
  </div>
16
16
  {% endif %}
17
17
 
18
18
  {% if page.next.url %}
19
19
  <a href="{{ site.baseurl }}{{page.next.url}}" class="btn btn-outline-primary"
20
- prompt="{{ site.data.locales[lang].post.button.next }}">
20
+ prompt="{{ site.data.locales[site.lang].post.button.next }}">
21
21
  <p>{{ page.next.title }}</p>
22
22
  </a>
23
23
  {% else %}
24
24
  <div class="btn btn-outline-primary disabled"
25
- prompt="{{ site.data.locales[lang].post.button.next }}">
25
+ prompt="{{ site.data.locales[site.lang].post.button.next }}">
26
26
  <p>-</p>
27
27
  </div>
28
28
  {% endif %}
@@ -3,7 +3,7 @@
3
3
  -->
4
4
 
5
5
  <div class="share-wrapper">
6
- <span class="share-label text-muted mr-1">{{ site.data.locales[lang].post.share }}</span>
6
+ <span class="share-label text-muted mr-1">{{ site.data.locales[site.lang].post.share }}</span>
7
7
  <span class="share-icons">
8
8
  {% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
9
9
  {% assign title = title | url_encode %}
@@ -19,8 +19,8 @@
19
19
 
20
20
  <i id="copy-link" class="fa-fw fas fa-link small"
21
21
  data-toggle="tooltip" data-placement="top"
22
- title="{{ site.data.locales[lang].post.button.share_link.title }}"
23
- data-title-succeed="{{ site.data.locales[lang].post.button.share_link.succeed }}">
22
+ title="{{ site.data.locales[site.lang].post.button.share_link.title }}"
23
+ data-title-succeed="{{ site.data.locales[site.lang].post.button.share_link.succeed }}">
24
24
  </i>
25
25
 
26
26
  </span>
@@ -16,13 +16,13 @@
16
16
  {% endunless %}
17
17
 
18
18
  {% capture read_prompt %}
19
- {{- site.data.locales[lang].post.read_time.prompt -}}
19
+ {{- site.data.locales[site.lang].post.read_time.prompt -}}
20
20
  {% endcapture %}
21
21
 
22
22
  <!-- return element -->
23
23
  <span class="readtime" data-toggle="tooltip" data-placement="bottom"
24
- title="{{ words }} {{ site.data.locales[lang].post.words }}">
25
- <em>{{- read_time -}}{{" "}}{{- site.data.locales[lang].post.read_time.unit -}}</em>
24
+ title="{{ words }} {{ site.data.locales[site.lang].post.words }}">
25
+ <em>{{- read_time -}}{{" "}}{{- site.data.locales[site.lang].post.read_time.unit -}}</em>
26
26
  {%- if include.prompt -%}
27
27
  {%- assign _prompt_words = read_prompt | number_of_words: 'auto' -%}
28
28
  {%- unless _prompt_words > 1 -%}{{ " " }}{%- endunless -%}{{ read_prompt }}
@@ -31,11 +31,15 @@
31
31
  %}
32
32
  {% endif %}
33
33
 
34
- <!-- Add attribute 'hide-bullet' to the checkbox list -->
35
-
36
- {% if _content contains '<li class="task-list-item"><' %}
34
+ <!-- Change the icon of checkbox -->
35
+ {% if _content contains '<input type="checkbox"' %}
37
36
  {% assign _content = _content
38
- | replace: '"task-list-item"><', '"task-list-item" hide-bullet><'
37
+ | replace:
38
+ '<input type="checkbox" class="task-list-item-checkbox" disabled="disabled" checked="checked" />',
39
+ '<i class="fas fa-check-circle fa-fw checked"></i>'
40
+ | replace:
41
+ '<input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />',
42
+ '<i class="far fa-circle fa-fw"></i>'
39
43
  %}
40
44
  {% endif %}
41
45
 
@@ -103,13 +107,7 @@
103
107
 
104
108
  <!-- Add image path -->
105
109
  {% if page.img_path %}
106
- {% assign _path = page.img_path %}
107
- {% assign last_char = _path | slice: -1 %}
108
-
109
- {% unless last_char == '/' %}
110
- {% assign _path = _path | append: '/' %}
111
- {% endunless %}
112
-
110
+ {% assign _path = page.img_path | append: '/' | replace: '//', '/' %}
113
111
  {% assign _src_prefix = _src_prefix | append: _path %}
114
112
  {% endif %}
115
113
 
@@ -177,7 +175,7 @@
177
175
  | append: '<div class="code-header">'
178
176
  | append: _label
179
177
  | append: '<button aria-label="copy" data-title-succeed="'
180
- | append: site.data.locales[lang].post.button.copy_code.succeed
178
+ | append: site.data.locales[site.lang].post.button.copy_code.succeed
181
179
  | append: '"><i class="far fa-clipboard"></i></button></div>'
182
180
  | append: '<div class="highlight"><code>'
183
181
  %}
@@ -78,7 +78,7 @@
78
78
  {% if index_list.size > 0 %}
79
79
  <div id="related-posts" class="mb-2 mb-sm-4">
80
80
  <h3 class="pt-2 mb-4 ml-1"
81
- data-toc-skip>{{ site.data.locales[lang].post.relate_posts }}</h3>
81
+ data-toc-skip>{{ site.data.locales[site.lang].post.relate_posts }}</h3>
82
82
  <div class="card-deck mb-4">
83
83
  {% for entry in index_list %}
84
84
  {% assign index = entry | plus: 0 %}
@@ -14,7 +14,7 @@
14
14
  </div>
15
15
  {% endcapture %}
16
16
 
17
- {% capture not_found %}<p class="mt-5">{{ site.data.locales[lang].search.no_results }}</p>{% endcapture %}
17
+ {% capture not_found %}<p class="mt-5">{{ site.data.locales[site.lang].search.no_results }}</p>{% endcapture %}
18
18
 
19
19
  <script src="{{ site.data.assets[origin].search.js | relative_url }}"></script>
20
20
 
@@ -21,7 +21,7 @@
21
21
  </a>
22
22
  </div>
23
23
 
24
- <div class="site-title mt-3">
24
+ <div class="site-title">
25
25
  <a href="{{ '/' | relative_url }}">{{ site.title }}</a>
26
26
  </div>
27
27
  <div class="site-subtitle font-italic">{{ site.tagline }}</div>
@@ -34,7 +34,7 @@
34
34
  <li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
35
35
  <a href="{{ '/' | relative_url }}" class="nav-link">
36
36
  <i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i>
37
- <span>{{ site.data.locales[lang].tabs.home | upcase }}</span>
37
+ <span>{{ site.data.locales[site.lang].tabs.home | upcase }}</span>
38
38
  </a>
39
39
  </li>
40
40
  <!-- the real tabs -->
@@ -44,7 +44,7 @@
44
44
  <i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
45
45
  {% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
46
46
 
47
- <span>{{ site.data.locales[lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
47
+ <span>{{ site.data.locales[site.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
48
48
  </a>
49
49
  </li> <!-- .nav-item -->
50
50
  {% endfor %}
data/_includes/toc.html CHANGED
@@ -10,7 +10,7 @@
10
10
  <script src="{{ site.data.assets[origin].bootstrap-toc.js | relative_url }}"></script>
11
11
 
12
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[lang].panel.toc -}}</div>
13
+ <div class="panel-heading pl-3 pt-2 mb-2">{{- site.data.locales[site.lang].panel.toc -}}</div>
14
14
  <nav id="toc" data-toggle="toc"></nav>
15
15
  </div>
16
16
  {% endif %}
@@ -10,7 +10,7 @@
10
10
 
11
11
  {% if paths.size == 0 or page.layout == 'home' %}
12
12
  <!-- index page -->
13
- <span>{{ site.data.locales[lang].tabs.home | capitalize }}</span>
13
+ <span>{{ site.data.locales[site.lang].tabs.home | capitalize }}</span>
14
14
 
15
15
  {% else %}
16
16
 
@@ -19,14 +19,14 @@
19
19
  {% if forloop.first %}
20
20
  <span>
21
21
  <a href="{{ '/' | relative_url }}">
22
- {{ site.data.locales[lang].tabs.home | capitalize }}
22
+ {{ site.data.locales[site.lang].tabs.home | capitalize }}
23
23
  </a>
24
24
  </span>
25
25
 
26
26
  {% elsif forloop.last %}
27
27
 
28
28
  {% if page.collection == 'tabs' %}
29
- <span>{{ site.data.locales[lang].tabs[item] | default: page.title }}</span>
29
+ <span>{{ site.data.locales[site.lang].tabs[item] | default: page.title }}</span>
30
30
  {% else %}
31
31
  <span>{{ page.title }}</span>
32
32
  {% endif %}
@@ -34,7 +34,7 @@
34
34
  {% elsif page.layout == 'category' or page.layout == 'tag' %}
35
35
  <span>
36
36
  <a href="{{ item | relative_url }}">
37
- {{ site.data.locales[lang].tabs[item] | default: page.title }}
37
+ {{ site.data.locales[site.lang].tabs[item] | default: page.title }}
38
38
  </a>
39
39
  </span>
40
40
  {% endif %}
@@ -49,12 +49,12 @@
49
49
 
50
50
  <div id="topbar-title">
51
51
  {% if page.layout == 'home' %}
52
- {{- site.data.locales[lang].title | default: site.title -}}
52
+ {{- site.data.locales[site.lang].title | default: site.title -}}
53
53
  {% elsif page.collection == 'tabs' or page.layout == 'page' %}
54
54
  {%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
55
- {{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
55
+ {{- site.data.locales[site.lang].tabs[tab_key] | default: page.title -}}
56
56
  {% else %}
57
- {{- site.data.locales[lang].layout[page.layout] | default: page.layout | capitalize -}}
57
+ {{- site.data.locales[site.lang].layout[page.layout] | default: page.layout | capitalize -}}
58
58
  {% endif %}
59
59
  </div>
60
60
 
@@ -62,9 +62,9 @@
62
62
  <span id="search-wrapper" class="align-items-center">
63
63
  <i class="fas fa-search fa-fw"></i>
64
64
  <input class="form-control" id="search-input" type="search"
65
- aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[lang].search.hint | capitalize }}...">
65
+ aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[site.lang].search.hint | capitalize }}...">
66
66
  </span>
67
- <span id="search-cancel" >{{ site.data.locales[lang].search.cancel }}</span>
67
+ <span id="search-cancel" >{{ site.data.locales[site.lang].search.cancel }}</span>
68
68
  </div>
69
69
 
70
70
  </div>