jekyll-theme-chirpy 7.1.1 → 7.2.0

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/_data/locales/hu-HU.yml +20 -7
  3. data/_data/origin/cors.yml +4 -4
  4. data/_includes/analytics/cloudflare.html +0 -1
  5. data/_includes/analytics/fathom.html +2 -3
  6. data/_includes/analytics/google.html +1 -1
  7. data/_includes/analytics/matomo.html +6 -7
  8. data/_includes/comments/disqus.html +36 -29
  9. data/_includes/comments/giscus.html +14 -30
  10. data/_includes/comments/utterances.html +26 -37
  11. data/_includes/head.html +24 -3
  12. data/_includes/js-selector.html +3 -26
  13. data/_includes/jsdelivr-combine.html +4 -4
  14. data/_includes/search-loader.html +22 -20
  15. data/_includes/sidebar.html +1 -3
  16. data/_includes/toc-status.html +10 -0
  17. data/_includes/toc.html +4 -8
  18. data/_layouts/default.html +8 -4
  19. data/_layouts/home.html +26 -19
  20. data/_layouts/post.html +29 -2
  21. data/_sass/abstracts/_breakpoints.scss +73 -0
  22. data/_sass/abstracts/_index.scss +4 -0
  23. data/_sass/abstracts/_mixins.scss +80 -0
  24. data/_sass/{addon/module.scss → abstracts/_placeholders.scss} +22 -55
  25. data/_sass/{addon/variables.scss → abstracts/_variables.scss} +0 -4
  26. data/_sass/base/_base.scss +476 -0
  27. data/_sass/base/_index.scss +4 -0
  28. data/_sass/base/_reset.scss +41 -0
  29. data/_sass/{addon/syntax.scss → base/_syntax.scss} +46 -85
  30. data/_sass/base/_typography.scss +266 -0
  31. data/_sass/components/_buttons.scss +51 -0
  32. data/_sass/components/_index.scss +2 -0
  33. data/_sass/components/_popups.scss +172 -0
  34. data/_sass/layout/_footer.scss +36 -0
  35. data/_sass/layout/_index.scss +4 -0
  36. data/_sass/layout/_panel.scss +70 -0
  37. data/_sass/layout/_sidebar.scss +258 -0
  38. data/_sass/layout/_topbar.scss +86 -0
  39. data/_sass/main.bundle.scss +2 -2
  40. data/_sass/main.scss +4 -13
  41. data/_sass/{layout/archives.scss → pages/_archives.scss} +12 -16
  42. data/_sass/{layout/categories.scss → pages/_categories.scss} +5 -6
  43. data/_sass/{layout/category-tag.scss → pages/_category-tag.scss} +11 -20
  44. data/_sass/{layout/home.scss → pages/_home.scss} +54 -70
  45. data/_sass/pages/_index.scss +7 -0
  46. data/_sass/{layout/post.scss → pages/_post.scss} +183 -45
  47. data/_sass/pages/_search.scss +184 -0
  48. data/_sass/{layout/tags.scss → pages/_tags.scss} +7 -3
  49. data/_sass/{colors/typography-dark.scss → themes/_dark.scss} +163 -7
  50. data/_sass/themes/_light.scss +313 -0
  51. data/_sass/vendors/_bootstrap.scss +5 -0
  52. data/assets/css/jekyll-theme-chirpy.scss +1 -1
  53. data/assets/feed.xml +1 -1
  54. data/assets/js/dist/app.min.js +1 -1
  55. data/assets/js/dist/categories.min.js +2 -2
  56. data/assets/js/dist/commons.min.js +2 -2
  57. data/assets/js/dist/home.min.js +2 -2
  58. data/assets/js/dist/misc.min.js +2 -2
  59. data/assets/js/dist/page.min.js +2 -2
  60. data/assets/js/dist/post.min.js +2 -2
  61. data/assets/js/dist/sw.min.js +1 -1
  62. data/assets/js/dist/theme.min.js +4 -0
  63. metadata +35 -22
  64. data/_includes/mermaid.html +0 -62
  65. data/_includes/mode-toggle.html +0 -116
  66. data/_sass/addon/commons.scss +0 -1542
  67. data/_sass/colors/syntax-dark.scss +0 -164
  68. data/_sass/colors/syntax-light.scss +0 -210
  69. data/_sass/colors/typography-light.scss +0 -112
  70. data/_sass/dist/bootstrap.css +0 -5
  71. data/_sass/variables-hook.scss +0 -3
  72. /data/_includes/{comments.html → comment.html} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ca3679309fb3cc93a627b8134f8675bb87364a8a55ddb700f15589d59896f28
4
- data.tar.gz: 2f188368e1343ffb7c8a98ecbf5e756f543cb22ab928c9a2b4833d4eb53f2722
3
+ metadata.gz: 9c749c4a08f2636682588e8485511c640b72565c7c1c9216d1b991b88aea098b
4
+ data.tar.gz: 1c49935df9a20c9b2b2746b659f625eaa2d2623cacf267ef398b494b2f713f52
5
5
  SHA512:
6
- metadata.gz: efc05776c22e70a70b4f188f59cf056c474785caf1e8e86861d3c6d1cc10ae3748e19ed047d6b0468b4e7093d1277e7de4dcc30b5824f7e898052464b8079d5c
7
- data.tar.gz: 8bab314ceca166e27df988ae3f871c1784831fc4a60f8c521312558a285d2697337e68501bd780b5f17cd2efc06936ae7e950ac947841b97ab56aacc3dbf27c0
6
+ metadata.gz: 29a98ae874961852fc8b375815adbd9ac7cfb6a94e9083d5cc4353a6029b7b0af0e61b9e05274ef05e7b1471c2eba279dea538287d82b5fccd39582231b0ab8e
7
+ data.tar.gz: 30618a4727a026badb6884da95877ac67da3e5842ce92e28eb3203b5cb0d8351b115549859f9158c40df5d42b4606f7eadbb9b8311a17783c9103e9c7e540fca
@@ -14,24 +14,23 @@ tabs:
14
14
  categories: Kategóriák
15
15
  tags: Címkék
16
16
  archives: Archívum
17
- about: Rólam
17
+ about: Bemutatkozás
18
18
 
19
19
  # the text displayed in the search bar & search results
20
20
  search:
21
21
  hint: keresés
22
22
  cancel: Mégse
23
- no_results: Oops! Nincs találat a keresésre.
23
+ no_results: Hoppá! Nincs találat a keresésre.
24
24
 
25
25
  panel:
26
26
  lastmod: Legutóbb frissítve
27
27
  trending_tags: Népszerű Címkék
28
28
  toc: Tartalom
29
- links: Blog linkek
30
29
 
31
30
  copyright:
32
31
  # Shown at the bottom of the post
33
32
  license:
34
- template: A bejegyzés :LICENSE_NAME licenccel rendelkezik.
33
+ template: A bejegyzést a szerző :LICENSE_NAME licenc alatt engedélyezte.
35
34
  name: CC BY 4.0
36
35
  link: https://creativecommons.org/licenses/by/4.0/
37
36
 
@@ -42,7 +41,7 @@ copyright:
42
41
  Creative Commons Attribution 4.0 International (CC BY 4.0) licenccel rendelkeznek,
43
42
  hacsak másképp nincs jelezve.
44
43
 
45
- meta: Készítve :PLATFORM motorral :THEME témával
44
+ meta: Készítve :THEME témával a :PLATFORM platformra.
46
45
 
47
46
  not_found:
48
47
  statement: Sajnáljuk, az URL-t rosszul helyeztük el, vagy valami nem létezőre mutat.
@@ -73,7 +72,21 @@ post:
73
72
  title: Link másolása
74
73
  succeed: Link sikeresen másolva!
75
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. %B. %e."
80
+ dayjs: "YYYY. MMMM D."
81
+ archives:
82
+ strftime: "%B"
83
+ dayjs: "MMM"
84
+
76
85
  # categories page
77
86
  categories:
78
- category_measure: kategória
79
- post_measure: bejegyzés
87
+ category_measure:
88
+ singular: kategória
89
+ plural: kategória
90
+ post_measure:
91
+ singular: bejegyzés
92
+ plural: bejegyzés
@@ -20,17 +20,17 @@ webfonts: https://fonts.googleapis.com/css2?family=Lato:wght@300;400&family=Sour
20
20
  # Libraries
21
21
 
22
22
  toc:
23
- css: https://cdn.jsdelivr.net/npm/tocbot@4.29.0/dist/tocbot.min.css
24
- js: https://cdn.jsdelivr.net/npm/tocbot@4.29.0/dist/tocbot.min.js
23
+ css: https://cdn.jsdelivr.net/npm/tocbot@4.32.2/dist/tocbot.min.css
24
+ js: https://cdn.jsdelivr.net/npm/tocbot@4.32.2/dist/tocbot.min.js
25
25
 
26
26
  fontawesome:
27
- css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.6.0/css/all.min.css
27
+ css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.7.1/css/all.min.css
28
28
 
29
29
  search:
30
30
  js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js
31
31
 
32
32
  mermaid:
33
- js: https://cdn.jsdelivr.net/npm/mermaid@11.0.2/dist/mermaid.min.js
33
+ js: https://cdn.jsdelivr.net/npm/mermaid@11.4.0/dist/mermaid.min.js
34
34
 
35
35
  dayjs:
36
36
  js:
@@ -4,4 +4,3 @@
4
4
  src="https://static.cloudflareinsights.com/beacon.min.js"
5
5
  data-cf-beacon='{"token": "{{ site.analytics.cloudflare.id }}"}'
6
6
  ></script>
7
- <!-- End Cloudflare Web Analytics -->
@@ -2,6 +2,5 @@
2
2
  <script
3
3
  src="https://cdn.usefathom.com/script.js"
4
4
  data-site="{{ site.analytics.fathom.id }}"
5
- defer>
6
- </script>
7
- <!-- End Fathom Code -->
5
+ defer
6
+ ></script>
@@ -1,7 +1,7 @@
1
1
  <!-- Global site tag (gtag.js) - Google Analytics -->
2
2
  <script defer src="https://www.googletagmanager.com/gtag/js?id={{ site.analytics.google.id }}"></script>
3
3
  <script>
4
- document.addEventListener('DOMContentLoaded', function (event) {
4
+ document.addEventListener('DOMContentLoaded', () => {
5
5
  window.dataLayer = window.dataLayer || [];
6
6
  function gtag() {
7
7
  dataLayer.push(arguments);
@@ -1,14 +1,13 @@
1
1
  <!-- Matomo -->
2
- <script type="text/javascript">
3
- var _paq = window._paq = window._paq || [];
4
- _paq.push(['trackPageView']);
5
- _paq.push(['enableLinkTracking']);
6
- (function() {
2
+ <script>
3
+ document.addEventListener('DOMContentLoaded', () => {
4
+ var _paq = (window._paq = window._paq || []);
5
+ _paq.push(['trackPageView']);
6
+ _paq.push(['enableLinkTracking']);
7
7
  var u="//{{ site.analytics.matomo.domain }}/";
8
8
  _paq.push(['setTrackerUrl', u+'matomo.php']);
9
9
  _paq.push(['setSiteId', {{ site.analytics.matomo.id }}]);
10
10
  var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
11
11
  g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
12
- })();
12
+ });
13
13
  </script>
14
- <!-- End Matomo Code -->
@@ -1,38 +1,25 @@
1
- <!-- The Disqus lazy loading. -->
2
-
3
- <div id="disqus_thread">
4
- <p class="text-center text-muted small">Comments powered by <a href="https://disqus.com/">Disqus</a>.</p>
5
- </div>
6
-
7
- <script type="text/javascript">
1
+ <script>
8
2
  var disqus_config = function () {
9
3
  this.page.url = '{{ page.url | absolute_url }}';
10
4
  this.page.identifier = '{{ page.url }}';
11
5
  };
12
6
 
13
- {%- comment -%} Lazy loading {%- endcomment -%}
14
- var disqus_observer = new IntersectionObserver(
15
- function (entries) {
16
- if (entries[0].isIntersecting) {
17
- (function () {
18
- var d = document,
19
- s = d.createElement('script');
20
- s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
21
- s.setAttribute('data-timestamp', +new Date());
22
- (d.head || d.body).appendChild(s);
23
- })();
24
-
25
- disqus_observer.disconnect();
26
- }
27
- },
28
- { threshold: [0] }
29
- );
7
+ function addDisqus() {
8
+ let disqusThread = document.createElement('div');
9
+ let paragraph = document.createElement('p');
30
10
 
31
- disqus_observer.observe(document.getElementById('disqus_thread'));
11
+ disqusThread.id = 'disqus_thread';
12
+ paragraph.className = 'text-center text-muted small';
13
+ paragraph.innerHTML = 'Comments powered by <a href="https://disqus.com/">Disqus</a>.';
14
+ disqusThread.appendChild(paragraph);
15
+
16
+ const footer = document.querySelector('footer');
17
+ footer.insertAdjacentElement("beforebegin", disqusThread);
18
+ }
32
19
 
33
20
  {%- comment -%} Auto switch theme {%- endcomment -%}
34
- function reloadDisqus() {
35
- if (event.source === window && event.data && event.data.direction === ModeToggle.ID) {
21
+ function reloadDisqus(event) {
22
+ if (event.source === window && event.data && event.data.id === Theme.ID) {
36
23
  {%- comment -%} Disqus hasn't been loaded {%- endcomment -%}
37
24
  if (typeof DISQUS === 'undefined') {
38
25
  return;
@@ -44,7 +31,27 @@
44
31
  }
45
32
  }
46
33
 
47
- if (document.getElementById('mode-toggle')) {
48
- window.addEventListener('message', reloadDisqus);
34
+ addDisqus();
35
+
36
+ if (Theme.switchable) {
37
+ addEventListener('message', reloadDisqus);
49
38
  }
39
+
40
+ {%- comment -%} Lazy loading {%- endcomment -%}
41
+ var disqusObserver = new IntersectionObserver(
42
+ function (entries) {
43
+ if (entries[0].isIntersecting) {
44
+ var d = document,
45
+ s = d.createElement('script');
46
+ s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
47
+ s.setAttribute('data-timestamp', +new Date());
48
+ (d.head || d.body).appendChild(s);
49
+
50
+ disqusObserver.disconnect();
51
+ }
52
+ },
53
+ { threshold: [0] }
54
+ );
55
+
56
+ disqusObserver.observe(document.getElementById('disqus_thread'));
50
57
  </script>
@@ -1,21 +1,8 @@
1
1
  <!-- https://giscus.app/ -->
2
- <script type="text/javascript">
2
+ <script>
3
3
  (function () {
4
- const origin = 'https://giscus.app';
5
- const lightTheme = 'light';
6
- const darkTheme = 'dark_dimmed';
7
-
8
- let initTheme = lightTheme;
9
- const html = document.documentElement;
10
-
11
- if (
12
- (html.hasAttribute('data-mode') &&
13
- html.getAttribute('data-mode') === 'dark') ||
14
- (!html.hasAttribute('data-mode') &&
15
- window.matchMedia('(prefers-color-scheme: dark)').matches)
16
- ) {
17
- initTheme = darkTheme;
18
- }
4
+ const themeMapper = Theme.getThemeMapper('light', 'dark_dimmed');
5
+ const initTheme = themeMapper[Theme.visualState];
19
6
 
20
7
  let lang = '{{ site.comments.giscus.lang | default: lang }}';
21
8
  {%- comment -%} https://github.com/giscus/giscus/tree/main/locales {%- endcomment -%}
@@ -41,30 +28,27 @@
41
28
  async: ''
42
29
  };
43
30
 
44
- let giscusScript = document.createElement('script');
31
+ let giscusNode = document.createElement('script');
45
32
  Object.entries(giscusAttributes).forEach(([key, value]) =>
46
- giscusScript.setAttribute(key, value)
33
+ giscusNode.setAttribute(key, value)
47
34
  );
48
- document.getElementById('tail-wrapper').appendChild(giscusScript);
35
+
36
+ const $footer = document.querySelector('footer');
37
+ $footer.insertAdjacentElement("beforebegin", giscusNode);
49
38
 
50
39
  addEventListener('message', (event) => {
51
- if (
52
- event.source === window &&
53
- event.data &&
54
- event.data.direction === ModeToggle.ID
55
- ) {
56
- {%- comment -%} global theme mode changed {%- endcomment -%}
57
- const mode = event.data.message;
58
- const theme = mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme;
40
+ if (event.source === window && event.data && event.data.id === Theme.ID) {
41
+ const newTheme = themeMapper[Theme.visualState];
59
42
 
60
43
  const message = {
61
44
  setConfig: {
62
- theme: theme
45
+ theme: newTheme
63
46
  }
64
47
  };
65
48
 
66
- const giscus = document.getElementsByClassName('giscus-frame')[0].contentWindow;
67
- giscus.postMessage({ giscus: message }, origin);
49
+ const giscus =
50
+ document.getElementsByClassName('giscus-frame')[0].contentWindow;
51
+ giscus.postMessage({ giscus: message }, 'https://giscus.app');
68
52
  }
69
53
  });
70
54
  })();
@@ -1,49 +1,38 @@
1
1
  <!-- https://utteranc.es/ -->
2
- <script
3
- src="https://utteranc.es/client.js"
4
- repo="{{ site.comments.utterances.repo }}"
5
- issue-term="{{ site.comments.utterances.issue_term }}"
6
- crossorigin="anonymous"
7
- async
8
- ></script>
9
-
10
- <script type="text/javascript">
2
+ <script>
11
3
  (function () {
12
4
  const origin = 'https://utteranc.es';
13
- const lightTheme = 'github-light';
14
- const darkTheme = 'github-dark';
15
- let initTheme = lightTheme;
16
- const html = document.documentElement;
5
+ const themeMapper = Theme.getThemeMapper('github-light', 'github-dark');
6
+ const initTheme = themeMapper[Theme.visualState];
7
+
8
+ let script = document.createElement('script');
9
+ script.src = 'https://utteranc.es/client.js';
10
+ script.setAttribute('repo', '{{ site.comments.utterances.repo }}');
11
+ script.setAttribute('issue-term', '{{ site.comments.utterances.issue_term }}');
12
+ script.setAttribute('theme', initTheme);
13
+ script.crossOrigin = 'anonymous';
14
+ script.async = true;
17
15
 
18
- if (
19
- (html.hasAttribute('data-mode') && html.getAttribute('data-mode') === 'dark') ||
20
- (!html.hasAttribute('data-mode') && window.matchMedia('(prefers-color-scheme: dark)').matches)
21
- ) {
22
- initTheme = darkTheme;
23
- }
16
+ const $footer = document.querySelector('footer');
17
+ $footer.insertAdjacentElement('beforebegin', script);
24
18
 
25
19
  addEventListener('message', (event) => {
26
- let theme;
20
+ let newTheme;
27
21
 
28
- {%- comment -%} credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347> {%- endcomment -%}
29
- if (event.origin === origin) {
30
- {%- comment -%} page initial {%- endcomment -%}
31
- theme = initTheme;
32
- } else if (event.source === window && event.data && event.data.direction === ModeToggle.ID) {
33
- {%- comment -%} global theme mode changed {%- endcomment -%}
34
- const mode = event.data.message;
35
- theme = mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme;
36
- } else {
37
- return;
38
- }
22
+ {%- comment -%}
23
+ Credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347>
24
+ {%- endcomment -%}
25
+ if (event.source === window && event.data && event.data.id === Theme.ID) {
26
+ newTheme = themeMapper[Theme.visualState];
39
27
 
40
- const message = {
41
- type: 'set-theme',
42
- theme: theme
43
- };
28
+ const message = {
29
+ type: 'set-theme',
30
+ theme: newTheme
31
+ };
44
32
 
45
- const utterances = document.getElementsByClassName('utterances-frame')[0].contentWindow;
46
- utterances.postMessage(message, origin);
33
+ const utterances = document.querySelector('.utterances-frame').contentWindow;
34
+ utterances.postMessage(message, origin);
35
+ }
47
36
  });
48
37
  })();
49
38
  </script>
data/_includes/head.html CHANGED
@@ -70,7 +70,7 @@
70
70
 
71
71
  <!-- Bootstrap -->
72
72
  {% unless jekyll.environment == 'production' %}
73
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
73
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
74
74
  {% endunless %}
75
75
 
76
76
  <!-- Theme style -->
@@ -97,11 +97,32 @@
97
97
  <link rel="stylesheet" href="{{ site.data.origin[type].glightbox.css | relative_url }}">
98
98
  {% endif %}
99
99
 
100
- <!-- JavaScript -->
100
+ <!-- Scripts -->
101
101
 
102
102
  {% unless site.theme_mode %}
103
- {% include mode-toggle.html %}
103
+ <script src="{{ '/assets/js/dist/theme.min.js' | relative_url }}"></script>
104
104
  {% endunless %}
105
105
 
106
+ {% include js-selector.html lang=lang %}
107
+
108
+ {% if jekyll.environment == 'production' %}
109
+ <!-- PWA -->
110
+ {% if site.pwa.enabled %}
111
+ <script
112
+ defer
113
+ src="{{ '/app.min.js' | relative_url }}?baseurl={{ site.baseurl | default: '' }}&register={{ site.pwa.cache.enabled }}"
114
+ ></script>
115
+ {% endif %}
116
+
117
+ <!-- Web Analytics -->
118
+ {% for analytics in site.analytics %}
119
+ {% capture str %}{{ analytics }}{% endcapture %}
120
+ {% assign platform = str | split: '{' | first %}
121
+ {% if site.analytics[platform].id and site.analytics[platform].id != empty %}
122
+ {% include analytics/{{ platform }}.html %}
123
+ {% endif %}
124
+ {% endfor %}
125
+ {% endif %}
126
+
106
127
  {% include metadata-hook.html %}
107
128
  </head>
@@ -62,12 +62,12 @@
62
62
 
63
63
  {% capture script %}/assets/js/dist/{{ js }}.min.js{% endcapture %}
64
64
 
65
- <script src="{{ script | relative_url }}"></script>
65
+ <script defer src="{{ script | relative_url }}"></script>
66
66
 
67
67
  {% if page.math %}
68
68
  <!-- MathJax -->
69
- <script src="{{ '/assets/js/data/mathjax.js' | relative_url }}"></script>
70
- <script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
69
+ <script async src="{{ '/assets/js/data/mathjax.js' | relative_url }}"></script>
70
+ <script async src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
71
71
  <script id="MathJax-script" async src="{{ site.data.origin[type].mathjax.js | relative_url }}"></script>
72
72
  {% endif %}
73
73
 
@@ -84,26 +84,3 @@
84
84
  {% endcase %}
85
85
  {% endif %}
86
86
  {% endif %}
87
-
88
- {% if page.mermaid %}
89
- {% include mermaid.html %}
90
- {% endif %}
91
-
92
- {% if jekyll.environment == 'production' %}
93
- <!-- PWA -->
94
- {% if site.pwa.enabled %}
95
- <script
96
- defer
97
- src="{{ 'app.min.js' | relative_url }}?baseurl={{ site.baseurl | default: '' }}&register={{ site.pwa.cache.enabled }}"
98
- ></script>
99
- {% endif %}
100
-
101
- <!-- Web Analytics -->
102
- {% for analytics in site.analytics %}
103
- {% capture str %}{{ analytics }}{% endcapture %}
104
- {% assign type = str | split: '{' | first %}
105
- {% if site.analytics[type].id and site.analytics[type].id != empty %}
106
- {% include analytics/{{ type }}.html %}
107
- {% endif %}
108
- {% endfor %}
109
- {% endif %}
@@ -1,6 +1,6 @@
1
1
  {% assign urls = include.urls | split: ',' %}
2
2
 
3
- {% assign combined_urls = nil %}
3
+ {% assign combined_urls = null %}
4
4
 
5
5
  {% assign domain = 'https://cdn.jsdelivr.net/' %}
6
6
 
@@ -15,12 +15,12 @@
15
15
  {% endif %}
16
16
 
17
17
  {% elsif url contains '//' %}
18
- <script src="{{ url }}"></script>
18
+ <script defer src="{{ url }}"></script>
19
19
  {% else %}
20
- <script src="{{ url | relative_url }}"></script>
20
+ <script defer src="{{ url | relative_url }}"></script>
21
21
  {% endif %}
22
22
  {% endfor %}
23
23
 
24
24
  {% if combined_urls %}
25
- <script src="{{ combined_urls }}"></script>
25
+ <script defer src="{{ combined_urls }}"></script>
26
26
  {% endif %}
@@ -19,29 +19,31 @@
19
19
  {% capture not_found %}<p class="mt-5">{{ site.data.locales[include.lang].search.no_results }}</p>{% endcapture %}
20
20
 
21
21
  <script>
22
- {%- comment -%} Note: dependent library will be loaded in `js-selector.html` {%- endcomment -%}
23
- SimpleJekyllSearch({
24
- searchInput: document.getElementById('search-input'),
25
- resultsContainer: document.getElementById('search-results'),
26
- json: '{{ '/assets/js/data/search.json' | relative_url }}',
27
- searchResultTemplate: '{{ result_elem | strip_newlines }}',
28
- noResultsText: '{{ not_found }}',
29
- templateMiddleware: function(prop, value, template) {
30
- if (prop === 'categories') {
31
- if (value === '') {
32
- return `${value}`;
33
- } else {
34
- return `<div class="me-sm-4"><i class="far fa-folder fa-fw"></i>${value}</div>`;
22
+ {% comment %} Note: dependent library will be loaded in `js-selector.html` {% endcomment %}
23
+ document.addEventListener('DOMContentLoaded', () => {
24
+ SimpleJekyllSearch({
25
+ searchInput: document.getElementById('search-input'),
26
+ resultsContainer: document.getElementById('search-results'),
27
+ json: '{{ '/assets/js/data/search.json' | relative_url }}',
28
+ searchResultTemplate: '{{ result_elem | strip_newlines }}',
29
+ noResultsText: '{{ not_found }}',
30
+ templateMiddleware: function(prop, value, template) {
31
+ if (prop === 'categories') {
32
+ if (value === '') {
33
+ return `${value}`;
34
+ } else {
35
+ return `<div class="me-sm-4"><i class="far fa-folder fa-fw"></i>${value}</div>`;
36
+ }
35
37
  }
36
- }
37
38
 
38
- if (prop === 'tags') {
39
- if (value === '') {
40
- return `${value}`;
41
- } else {
42
- return `<div><i class="fa fa-tag fa-fw"></i>${value}</div>`;
39
+ if (prop === 'tags') {
40
+ if (value === '') {
41
+ return `${value}`;
42
+ } else {
43
+ return `<div><i class="fa fa-tag fa-fw"></i>${value}</div>`;
44
+ }
43
45
  }
44
46
  }
45
- }
47
+ });
46
48
  });
47
49
  </script>
@@ -11,9 +11,7 @@
11
11
  {%- endif -%}
12
12
  </a>
13
13
 
14
- <h1 class="site-title">
15
- <a href="{{ '/' | relative_url }}">{{ site.title }}</a>
16
- </h1>
14
+ <a class="site-title d-block" href="{{ '/' | relative_url }}">{{ site.title }}</a>
17
15
  <p class="site-subtitle fst-italic mb-0">{{ site.tagline }}</p>
18
16
  </header>
19
17
  <!-- .profile-wrapper -->
@@ -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 %}
data/_includes/toc.html CHANGED
@@ -1,13 +1,9 @@
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 %}
1
+ {% include toc-status.html %}
7
2
 
8
3
  {% if enable_toc %}
9
- <section id="toc-wrapper" class="d-none ps-0 pe-4">
10
- <h2 class="panel-heading ps-3 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</h2>
4
+ <div class="toc-border-cover z-3"></div>
5
+ <section id="toc-wrapper" class="position-sticky ps-0 pe-4">
6
+ <h2 class="panel-heading ps-3 pb-2 mb-0">{{- site.data.locales[include.lang].panel.toc -}}</h2>
11
7
  <nav id="toc"></nav>
12
8
  </section>
13
9
  {% endif %}
@@ -33,7 +33,7 @@ layout: compress
33
33
  </main>
34
34
 
35
35
  <!-- panel -->
36
- <aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 mb-5 text-muted">
36
+ <aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 text-muted">
37
37
  <div class="access">
38
38
  {% include_cached update-list.html lang=lang %}
39
39
  {% include_cached trending-tags.html lang=lang %}
@@ -68,14 +68,18 @@ layout: compress
68
68
  </aside>
69
69
  </div>
70
70
 
71
- <div id="mask"></div>
71
+ <div id="mask" class="d-none position-fixed w-100 h-100 z-1"></div>
72
72
 
73
73
  {% if site.pwa.enabled %}
74
74
  {% include_cached notification.html lang=lang %}
75
75
  {% endif %}
76
76
 
77
- <!-- JavaScripts -->
78
- {% include js-selector.html lang=lang %}
77
+ <!-- Embedded scripts -->
78
+
79
+ {% for _include in layout.script_includes %}
80
+ {% assign _include_path = _include | append: '.html' %}
81
+ {% include {{ _include_path }} %}
82
+ {% endfor %}
79
83
 
80
84
  {% include_cached search-loader.html lang=lang %}
81
85
  </body>