jekyll-theme-coo 6.3.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +29 -0
  3. data/README.md +24 -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/fi-FI.yml +90 -0
  12. data/_data/locales/fr-FR.yml +77 -0
  13. data/_data/locales/hu-HU.yml +79 -0
  14. data/_data/locales/id-ID.yml +77 -0
  15. data/_data/locales/it-IT.yml +90 -0
  16. data/_data/locales/ko-KR.yml +84 -0
  17. data/_data/locales/my-MM.yml +77 -0
  18. data/_data/locales/pt-BR.yml +77 -0
  19. data/_data/locales/ru-RU.yml +87 -0
  20. data/_data/locales/sl-SI.yml +91 -0
  21. data/_data/locales/sv-SE.yml +91 -0
  22. data/_data/locales/th.yml +91 -0
  23. data/_data/locales/tr-TR.yml +77 -0
  24. data/_data/locales/uk-UA.yml +77 -0
  25. data/_data/locales/vi-VN.yml +76 -0
  26. data/_data/locales/zh-CN.yml +83 -0
  27. data/_data/locales/zh-TW.yml +83 -0
  28. data/_data/origin/basic.yml +46 -0
  29. data/_data/origin/cors.yml +57 -0
  30. data/_includes/comments/disqus.html +50 -0
  31. data/_includes/comments/giscus.html +65 -0
  32. data/_includes/comments/utterances.html +50 -0
  33. data/_includes/comments.html +5 -0
  34. data/_includes/datetime.html +20 -0
  35. data/_includes/embed/twitch.html +8 -0
  36. data/_includes/embed/youtube.html +9 -0
  37. data/_includes/favicons.html +17 -0
  38. data/_includes/footer.html +36 -0
  39. data/_includes/google-analytics.html +14 -0
  40. data/_includes/head.html +99 -0
  41. data/_includes/js-selector.html +106 -0
  42. data/_includes/jsdelivr-combine.html +26 -0
  43. data/_includes/lang.html +8 -0
  44. data/_includes/language-alias.html +70 -0
  45. data/_includes/mermaid.html +58 -0
  46. data/_includes/metadata-hook.html +1 -0
  47. data/_includes/mode-toggle.html +143 -0
  48. data/_includes/no-linenos.html +10 -0
  49. data/_includes/notification.html +24 -0
  50. data/_includes/origin-type.html +13 -0
  51. data/_includes/post-nav.html +34 -0
  52. data/_includes/post-paginator.html +91 -0
  53. data/_includes/post-sharing.html +52 -0
  54. data/_includes/read-time.html +37 -0
  55. data/_includes/refactor-content.html +266 -0
  56. data/_includes/related-posts.html +96 -0
  57. data/_includes/search-loader.html +47 -0
  58. data/_includes/search-results.html +10 -0
  59. data/_includes/sidebar.html +106 -0
  60. data/_includes/toc.html +13 -0
  61. data/_includes/topbar.html +82 -0
  62. data/_includes/trending-tags.html +46 -0
  63. data/_includes/update-list.html +39 -0
  64. data/_layouts/archives.html +35 -0
  65. data/_layouts/categories.html +138 -0
  66. data/_layouts/category.html +24 -0
  67. data/_layouts/compress.html +10 -0
  68. data/_layouts/default.html +87 -0
  69. data/_layouts/home.html +16 -0
  70. data/_layouts/page.html +22 -0
  71. data/_layouts/post.html +24 -0
  72. data/_layouts/tag.html +23 -0
  73. data/_layouts/tags.html +22 -0
  74. data/_sass/addon/commons.scss +1537 -0
  75. data/_sass/addon/module.scss +200 -0
  76. data/_sass/addon/syntax.scss +292 -0
  77. data/_sass/addon/variables.scss +33 -0
  78. data/_sass/colors/syntax-dark.scss +164 -0
  79. data/_sass/colors/syntax-light.scss +214 -0
  80. data/_sass/colors/typography-dark.scss +151 -0
  81. data/_sass/colors/typography-light.scss +112 -0
  82. data/_sass/layout/archives.scss +144 -0
  83. data/_sass/layout/categories.scss +83 -0
  84. data/_sass/layout/category-tag.scss +72 -0
  85. data/_sass/layout/home.scss +189 -0
  86. data/_sass/layout/post.scss +357 -0
  87. data/_sass/layout/tags.scss +19 -0
  88. data/_sass/main.scss +13 -0
  89. data/_sass/variables-hook.scss +3 -0
  90. data/assets/404.html +14 -0
  91. data/assets/css/jekyll-theme-coo.scss +6 -0
  92. data/assets/feed.xml +61 -0
  93. data/assets/img/favicons/android-chrome-192x192.png +0 -0
  94. data/assets/img/favicons/android-chrome-512x512.png +0 -0
  95. data/assets/img/favicons/apple-touch-icon.png +0 -0
  96. data/assets/img/favicons/browserconfig.xml +13 -0
  97. data/assets/img/favicons/favicon-16x16.png +0 -0
  98. data/assets/img/favicons/favicon-32x32.png +0 -0
  99. data/assets/img/favicons/favicon.ico +0 -0
  100. data/assets/img/favicons/mstile-150x150.png +0 -0
  101. data/assets/img/favicons/site.webmanifest +26 -0
  102. data/assets/js/data/search.json +20 -0
  103. data/assets/js/data/swcache.js +49 -0
  104. data/assets/js/dist/categories.min.js +4 -0
  105. data/assets/js/dist/commons.min.js +4 -0
  106. data/assets/js/dist/home.min.js +4 -0
  107. data/assets/js/dist/misc.min.js +4 -0
  108. data/assets/js/dist/page.min.js +4 -0
  109. data/assets/js/dist/post.min.js +4 -0
  110. data/assets/js/pwa/app.js +47 -0
  111. data/assets/js/pwa/sw.js +89 -0
  112. data/assets/js/pwa/unregister.js +12 -0
  113. data/assets/robots.txt +10 -0
  114. metadata +261 -0
@@ -0,0 +1,83 @@
1
+ # The layout text of site
2
+
3
+ # ----- Commons label -----
4
+
5
+ layout:
6
+ post: 文章
7
+ category: 分類
8
+ tag: 標籤
9
+
10
+ # The tabs of sidebar
11
+ tabs:
12
+ # format: <filename_without_extension>: <value>
13
+ home: 首頁
14
+ categories: 分類
15
+ tags: 標籤
16
+ archives: 封存
17
+ about: 關於
18
+
19
+ # the text displayed in the search bar & search results
20
+ search:
21
+ hint: 搜尋
22
+ cancel: 取消
23
+ no_results: 沒有搜尋結果
24
+
25
+ panel:
26
+ lastmod: 最近更新
27
+ trending_tags: 熱門標籤
28
+ toc: 文章摘要
29
+
30
+ copyright:
31
+ # Shown at the bottom of the post
32
+ license:
33
+ template: 本文章以 :LICENSE_NAME 授權
34
+ name: CC BY 4.0
35
+ link: https://creativecommons.org/licenses/by/4.0/
36
+
37
+ # Displayed in the footer
38
+ brief: 保留部份權利。
39
+ verbose: >-
40
+ 除非另有說明,否則本網誌的文章均由作者按照姓名標示 4.0 國際 (CC BY 4.0) 授權條款進行授權。
41
+
42
+ meta: 本網站使用 :PLATFORM 產生,採用 :THEME 主題
43
+
44
+ not_found:
45
+ statment: 抱歉,您可能正在存取一個已被移動的 URL,或者它從未存在。
46
+
47
+ notification:
48
+ update_found: 發現新版本更新。
49
+ update: 更新
50
+
51
+ # ----- Posts related labels -----
52
+
53
+ post:
54
+ written_by: 作者
55
+ posted: 發布於
56
+ updated: 更新於
57
+ words: 字
58
+ pageview_measure: 次瀏覽
59
+ read_time:
60
+ unit: 分鐘
61
+ prompt: 閱讀
62
+ relate_posts: 相關文章
63
+ share: 分享
64
+ button:
65
+ next: 下一篇
66
+ previous: 上一篇
67
+ copy_code:
68
+ succeed: 已複製!
69
+ share_link:
70
+ title: 分享連結
71
+ succeed: 已複製連結!
72
+
73
+ # Date time format.
74
+ # See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
75
+ df:
76
+ post:
77
+ strftime: "%Y/%m/%d"
78
+ dayjs: "YYYY/MM/DD"
79
+
80
+ # categories page
81
+ categories:
82
+ category_measure: 個分類
83
+ post_measure: 篇文章
@@ -0,0 +1,46 @@
1
+ # fonts
2
+
3
+ webfonts: /assets/lib/fonts/main.css
4
+
5
+ # Libraries
6
+
7
+ jquery:
8
+ js: /assets/lib/jquery/jquery.min.js
9
+
10
+ bootstrap:
11
+ css: /assets/lib/bootstrap/bootstrap.min.css
12
+ js: /assets/lib/bootstrap/bootstrap.bundle.min.js
13
+
14
+ toc:
15
+ css: /assets/lib/tocbot/tocbot.min.css
16
+ js: /assets/lib/tocbot/tocbot.min.js
17
+
18
+ fontawesome:
19
+ css: /assets/lib/fontawesome-free/css/all.min.css
20
+
21
+ search:
22
+ js: /assets/lib/simple-jekyll-search/simple-jekyll-search.min.js
23
+
24
+ mermaid:
25
+ js: /assets/lib/mermaid/mermaid.min.js
26
+
27
+ dayjs:
28
+ js:
29
+ common: /assets/lib/dayjs/dayjs.min.js
30
+ locale: /assets/lib/dayjs/locale/en.min.js
31
+ relativeTime: /assets/lib/dayjs/plugin/relativeTime.min.js
32
+ localizedFormat: /assets/lib/dayjs/plugin/localizedFormat.min.js
33
+
34
+ magnific-popup:
35
+ css: /assets/lib/magnific-popup/magnific-popup.css
36
+ js: /assets/lib/magnific-popup/jquery.magnific-popup.min.js
37
+
38
+ lazy-polyfill:
39
+ css: /assets/lib/loading-attribute-polyfill/loading-attribute-polyfill.min.css
40
+ js: /assets/lib/loading-attribute-polyfill/loading-attribute-polyfill.umd.min.js
41
+
42
+ clipboard:
43
+ js: /assets/lib/clipboard/clipboard.min.js
44
+
45
+ mathjax:
46
+ js: /assets/lib/mathjax/tex-chtml.js
@@ -0,0 +1,57 @@
1
+ # CDNs
2
+
3
+ cdns:
4
+ # Google Fonts
5
+ - url: https://fonts.googleapis.com
6
+ - url: https://fonts.gstatic.com
7
+ args: crossorigin
8
+ - url: https://fonts.googleapis.com
9
+ # jsDelivr CDN
10
+ - url: https://cdn.jsdelivr.net
11
+
12
+ # fonts
13
+
14
+ webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:wght@400;600;700;900&display=swap
15
+
16
+ # Libraries
17
+
18
+ jquery:
19
+ js: https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js
20
+
21
+ bootstrap:
22
+ css: https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css
23
+ js: https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js
24
+
25
+ toc:
26
+ css: https://cdn.jsdelivr.net/npm/tocbot@4.21.3/dist/tocbot.min.css
27
+ js: https://cdn.jsdelivr.net/npm/tocbot@4.21.3/dist/tocbot.min.js
28
+
29
+ fontawesome:
30
+ css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css
31
+
32
+ search:
33
+ js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js
34
+
35
+ mermaid:
36
+ js: https://cdn.jsdelivr.net/npm/mermaid@10.6.0/dist/mermaid.min.js
37
+
38
+ dayjs:
39
+ js:
40
+ common: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/dayjs.min.js
41
+ locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/locale/:LOCALE.min.js
42
+ relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/plugin/relativeTime.min.js
43
+ localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/plugin/localizedFormat.min.js
44
+
45
+ magnific-popup:
46
+ css: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/magnific-popup.min.css
47
+ js: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/jquery.magnific-popup.min.js
48
+
49
+ lazy-polyfill:
50
+ css: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2.1.1/dist/loading-attribute-polyfill.min.css
51
+ js: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2.1.1/dist/loading-attribute-polyfill.umd.min.js
52
+
53
+ clipboard:
54
+ js: https://cdn.jsdelivr.net/npm/clipboard@2.0.11/dist/clipboard.min.js
55
+
56
+ mathjax:
57
+ js: https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-chtml.js
@@ -0,0 +1,50 @@
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">
8
+ var disqus_config = function () {
9
+ this.page.url = '{{ page.url | absolute_url }}';
10
+ this.page.identifier = '{{ page.url }}';
11
+ };
12
+
13
+ /* Lazy loading */
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
+ );
30
+
31
+ disqus_observer.observe(document.querySelector('#disqus_thread'));
32
+
33
+ /* Auto switch theme */
34
+ function reloadDisqus() {
35
+ if (event.source === window && event.data && event.data.direction === ModeToggle.ID) {
36
+ /* Disqus hasn't been loaded */
37
+ if (typeof DISQUS === 'undefined') {
38
+ return;
39
+ }
40
+
41
+ if (document.readyState == 'complete') {
42
+ DISQUS.reset({ reload: true, config: disqus_config });
43
+ }
44
+ }
45
+ }
46
+
47
+ if (document.querySelector('.mode-toggle')) {
48
+ window.addEventListener('message', reloadDisqus);
49
+ }
50
+ </script>
@@ -0,0 +1,65 @@
1
+ <!-- https://giscus.app/ -->
2
+ <script type="text/javascript">
3
+ (function () {
4
+ const origin = 'https://giscus.app';
5
+ const iframe = 'iframe.giscus-frame';
6
+ const lightTheme = 'light';
7
+ const darkTheme = 'dark_dimmed';
8
+
9
+ let initTheme = lightTheme;
10
+ const html = document.documentElement;
11
+
12
+ if (
13
+ (html.hasAttribute('data-mode') &&
14
+ html.getAttribute('data-mode') === 'dark') ||
15
+ (!html.hasAttribute('data-mode') &&
16
+ window.matchMedia('(prefers-color-scheme: dark)').matches)
17
+ ) {
18
+ initTheme = darkTheme;
19
+ }
20
+
21
+ let giscusAttributes = {
22
+ src: 'https://giscus.app/client.js',
23
+ 'data-repo': '{{ site.comments.giscus.repo}}',
24
+ 'data-repo-id': '{{ site.comments.giscus.repo_id }}',
25
+ 'data-category': '{{ site.comments.giscus.category }}',
26
+ 'data-category-id': '{{ site.comments.giscus.category_id }}',
27
+ 'data-mapping': '{{ site.comments.giscus.mapping | default: 'pathname' }}',
28
+ 'data-reactions-enabled': '{{ site.comments.giscus.reactions_enabled | default: '1' }}',
29
+ 'data-emit-metadata': '0',
30
+ 'data-theme': initTheme,
31
+ 'data-input-position': '{{ site.comments.giscus.input_position | default: 'bottom' }}',
32
+ 'data-lang': '{{ site.comments.giscus.lang | default: lang }}',
33
+ 'data-loading': 'lazy',
34
+ crossorigin: 'anonymous',
35
+ async: ''
36
+ };
37
+
38
+ let giscusScript = document.createElement('script');
39
+ Object.entries(giscusAttributes).forEach(([key, value]) =>
40
+ giscusScript.setAttribute(key, value)
41
+ );
42
+ document.getElementById('tail-wrapper').appendChild(giscusScript);
43
+
44
+ addEventListener('message', (event) => {
45
+ if (
46
+ event.source === window &&
47
+ event.data &&
48
+ event.data.direction === ModeToggle.ID
49
+ ) {
50
+ /* global theme mode changed */
51
+ const mode = event.data.message;
52
+ const theme = mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme;
53
+
54
+ const message = {
55
+ setConfig: {
56
+ theme: theme
57
+ }
58
+ };
59
+
60
+ const giscus = document.querySelector(iframe).contentWindow;
61
+ giscus.postMessage({ giscus: message }, origin);
62
+ }
63
+ });
64
+ })();
65
+ </script>
@@ -0,0 +1,50 @@
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">
11
+ (function () {
12
+ const origin = 'https://utteranc.es';
13
+ const iframe = 'iframe.utterances-frame';
14
+ const lightTheme = 'github-light';
15
+ const darkTheme = 'github-dark';
16
+ let initTheme = lightTheme;
17
+ const html = document.documentElement;
18
+
19
+ if (
20
+ (html.hasAttribute('data-mode') && html.getAttribute('data-mode') === 'dark') ||
21
+ (!html.hasAttribute('data-mode') && window.matchMedia('(prefers-color-scheme: dark)').matches)
22
+ ) {
23
+ initTheme = darkTheme;
24
+ }
25
+
26
+ addEventListener('message', (event) => {
27
+ let theme;
28
+
29
+ /* credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347> */
30
+ if (event.origin === origin) {
31
+ /* page initial */
32
+ theme = initTheme;
33
+ } else if (event.source === window && event.data && event.data.direction === ModeToggle.ID) {
34
+ /* global theme mode changed */
35
+ const mode = event.data.message;
36
+ theme = mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme;
37
+ } else {
38
+ return;
39
+ }
40
+
41
+ const message = {
42
+ type: 'set-theme',
43
+ theme: theme
44
+ };
45
+
46
+ const utterances = document.querySelector(iframe).contentWindow;
47
+ utterances.postMessage(message, origin);
48
+ });
49
+ })();
50
+ </script>
@@ -0,0 +1,5 @@
1
+ <!-- The comments switcher -->
2
+ {% if page.comments and site.comments.active %}
3
+ {% capture path %}comments/{{ site.comments.active }}.html{% endcapture %}
4
+ {% include {{ path }} %}
5
+ {% endif %}
@@ -0,0 +1,20 @@
1
+ <!--
2
+ Date format snippet
3
+ See: ${JS_ROOT}/utils/locale-dateime.js
4
+ -->
5
+
6
+ {% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %}
7
+ {% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %}
8
+
9
+ <time
10
+ {% if include.class %}
11
+ class="{{ include.class }}"
12
+ {% endif %}
13
+ data-ts="{{ include.date | date: '%s' }}"
14
+ data-df="{{ df_dayjs }}"
15
+ {% if include.tooltip %}
16
+ data-bs-toggle="tooltip" data-bs-placement="bottom"
17
+ {% endif %}
18
+ >
19
+ {{ include.date | date: df_strftime }}
20
+ </time>
@@ -0,0 +1,8 @@
1
+ <iframe
2
+ class="embed-video twitch"
3
+ loading="lazy"
4
+ src="https://player.twitch.tv/?video={{ include.id }}&parent={{ site.url | split: '://' | last | remove: '/' }}"
5
+ frameborder="0"
6
+ allowfullscreen="true"
7
+ scrolling="no"
8
+ ></iframe>
@@ -0,0 +1,9 @@
1
+ <iframe
2
+ class="embed-video youtube"
3
+ loading="lazy"
4
+ src="https://www.youtube.com/embed/{{ include.id }}"
5
+ title="YouTube video player"
6
+ frameborder="0"
7
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
8
+ allowfullscreen
9
+ ></iframe>
@@ -0,0 +1,17 @@
1
+ <!--
2
+ The Favicons for Web, Android, Microsoft, and iOS (iPhone and iPad) Apps
3
+ Generated by: https://realfavicongenerator.net/
4
+ -->
5
+
6
+ {% capture favicon_path %}{{ '/assets/img/favicons' | relative_url }}{% endcapture %}
7
+
8
+ <link rel="apple-touch-icon" sizes="180x180" href="{{ favicon_path }}/apple-touch-icon.png">
9
+ <link rel="icon" type="image/png" sizes="32x32" href="{{ favicon_path }}/favicon-32x32.png">
10
+ <link rel="icon" type="image/png" sizes="16x16" href="{{ favicon_path }}/favicon-16x16.png">
11
+ <link rel="manifest" href="{{ favicon_path }}/site.webmanifest">
12
+ <link rel="shortcut icon" href="{{ favicon_path }}/favicon.ico">
13
+ <meta name="apple-mobile-web-app-title" content="{{ site.title }}">
14
+ <meta name="application-name" content="{{ site.title }}">
15
+ <meta name="msapplication-TileColor" content="#da532c">
16
+ <meta name="msapplication-config" content="{{ favicon_path }}/browserconfig.xml">
17
+ <meta name="theme-color" content="#ffffff">
@@ -0,0 +1,36 @@
1
+ <!-- The Footer -->
2
+
3
+ <footer
4
+ aria-label="Site Info"
5
+ class="
6
+ d-flex flex-column justify-content-center text-muted
7
+ flex-lg-row justify-content-lg-between align-items-lg-center pb-lg-3
8
+ "
9
+ >
10
+ <p>
11
+ {{ '©' }}
12
+ <time>{{ 'now' | date: '%Y' }}</time>
13
+ <a href="{{ site.social.links[0] }}" target="_blank" rel="noopener">{{ site.social.name }}</a>.
14
+ {% if site.copyright.brief %}
15
+ <span
16
+ data-bs-toggle="tooltip"
17
+ data-bs-placement="top"
18
+ title="{{ site.copyright.verbose }}"
19
+ >
20
+ {{- site.copyright.brief -}}
21
+ </span>
22
+ {% endif %}
23
+ </p>
24
+
25
+ <p>
26
+ {%- capture _platform -%}
27
+ <a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
28
+ {%- endcapture -%}
29
+
30
+ {%- capture _theme -%}
31
+ <a href="https://github.com/quacksouls/jekyll-theme-coo" target="_blank" rel="noopener">Coo</a>
32
+ {%- endcapture -%}
33
+
34
+ {{ site.data.locales[include.lang].meta | replace: ':PLATFORM', _platform | replace: ':THEME', _theme }}
35
+ </p>
36
+ </footer>
@@ -0,0 +1,14 @@
1
+ <!--
2
+ The GA snippet
3
+ -->
4
+ <!-- Global site tag (gtag.js) - Google Analytics -->
5
+ <script defer src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics.id }}"></script>
6
+ <script>
7
+ document.addEventListener("DOMContentLoaded", function(event) {
8
+ window.dataLayer = window.dataLayer || [];
9
+ function gtag(){dataLayer.push(arguments);}
10
+
11
+ gtag('js', new Date());
12
+ gtag('config', '{{ site.google_analytics.id }}');
13
+ });
14
+ </script>
@@ -0,0 +1,99 @@
1
+ <!-- The Head -->
2
+
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+ <meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7">
6
+ <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e">
7
+ <meta name="apple-mobile-web-app-capable" content="yes">
8
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
9
+ <meta
10
+ name="viewport"
11
+ content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
12
+ >
13
+
14
+ {% capture seo_tags %}
15
+ {% seo title=false %}
16
+ {% endcapture %}
17
+
18
+ {% if page.image %}
19
+ {% assign img = page.image.path | default: page.image %}
20
+
21
+ {% unless img contains '://' %}
22
+ {% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %}
23
+ {% capture target %}"{{ img | absolute_url }}"{% endcapture %}
24
+
25
+ {% if site.img_cdn contains '//' %}
26
+ <!-- it's a cross-origin URL -->
27
+ {% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %}
28
+ {% else %}
29
+ <!-- it's a local file path -->
30
+ {%- capture replacement -%}
31
+ "{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}"
32
+ {%- endcapture -%}
33
+ {% endif %}
34
+
35
+ {% assign seo_tags = seo_tags | replace: target, replacement %}
36
+ {% endunless %}
37
+ {% endif %}
38
+
39
+ {{ seo_tags }}
40
+
41
+ <title>
42
+ {%- unless page.layout == 'home' -%}
43
+ {{ page.title | append: ' | ' }}
44
+ {%- endunless -%}
45
+ {{ site.title }}
46
+ </title>
47
+
48
+ {% include_cached favicons.html %}
49
+
50
+ {% if site.resources.ignore_env != jekyll.environment and site.resources.self_hosted %}
51
+ <link href="{{ site.data.origin[type].webfonts | relative_url }}" rel="stylesheet">
52
+
53
+ {% else %}
54
+ {% for cdn in site.data.origin[type].cdns %}
55
+ <link rel="preconnect" href="{{ cdn.url }}" {{ cdn.args }}>
56
+ <link rel="dns-prefetch" href="{{ cdn.url }}" {{ cdn.args }}>
57
+ {% endfor %}
58
+
59
+ <link rel="stylesheet" href="{{ site.data.origin[type].webfonts | relative_url }}">
60
+ {% endif %}
61
+
62
+ <!-- GA -->
63
+ {% if jekyll.environment == 'production' and site.google_analytics.id != empty and site.google_analytics.id %}
64
+ <link rel="preconnect" href="https://www.google-analytics.com" crossorigin="use-credentials">
65
+ <link rel="dns-prefetch" href="https://www.google-analytics.com">
66
+
67
+ <link rel="preconnect" href="https://www.googletagmanager.com" crossorigin="anonymous">
68
+ <link rel="dns-prefetch" href="https://www.googletagmanager.com">
69
+ {% endif %}
70
+
71
+ <!-- Bootstrap -->
72
+ <link rel="stylesheet" href="{{ site.data.origin[type].bootstrap.css | relative_url}}">
73
+
74
+ <!-- Font Awesome -->
75
+ <link rel="stylesheet" href="{{ site.data.origin[type].fontawesome.css | relative_url }}">
76
+
77
+ <link rel="stylesheet" href="{{ '/assets/css/:THEME.css' | replace: ':THEME', site.theme | relative_url }}">
78
+
79
+ {% if site.toc and page.toc %}
80
+ <link rel="stylesheet" href="{{ site.data.origin[type].toc.css | relative_url }}">
81
+ {% endif %}
82
+
83
+ {% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
84
+ <link rel="stylesheet" href="{{ site.data.origin[type]['lazy-polyfill'].css | relative_url }}">
85
+ {% endif %}
86
+
87
+ {% if page.layout == 'page' or page.layout == 'post' %}
88
+ <!-- Manific Popup -->
89
+ <link rel="stylesheet" href="{{ site.data.origin[type].magnific-popup.css | relative_url }}">
90
+ {% endif %}
91
+
92
+ <!-- JavaScript -->
93
+
94
+ {% unless site.theme_mode %}
95
+ {% include mode-toggle.html %}
96
+ {% endunless %}
97
+
98
+ {% include metadata-hook.html %}
99
+ </head>
@@ -0,0 +1,106 @@
1
+ <!-- JS selector for site. -->
2
+
3
+ <!-- commons -->
4
+
5
+ {% assign urls = site.data.origin[type].jquery.js
6
+ | append: ','
7
+ | append: site.data.origin[type].bootstrap.js
8
+ | append: ','
9
+ | append: site.data.origin[type].search.js
10
+ %}
11
+
12
+ <!-- layout specified -->
13
+
14
+ {% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
15
+ {% assign urls = urls | append: ',' | append: site.data.origin[type]['lazy-polyfill'].js %}
16
+
17
+ {% unless page.layout == 'home' %}
18
+ <!-- image lazy-loading & popup & clipboard -->
19
+ {% assign urls = urls
20
+ | append: ','
21
+ | append: site.data.origin[type]['magnific-popup'].js
22
+ | append: ','
23
+ | append: site.data.origin[type].clipboard.js
24
+ %}
25
+ {% endunless %}
26
+ {% endif %}
27
+
28
+ {% if page.layout == 'home'
29
+ or page.layout == 'post'
30
+ or page.layout == 'archives'
31
+ or page.layout == 'category'
32
+ or page.layout == 'tag'
33
+ %}
34
+ {% assign locale = site.lang | split: '-' | first %}
35
+
36
+ {% assign urls = urls
37
+ | append: ','
38
+ | append: site.data.origin[type].dayjs.js.common
39
+ | append: ','
40
+ | append: site.data.origin[type].dayjs.js.locale
41
+ | replace: ':LOCALE', locale
42
+ | append: ','
43
+ | append: site.data.origin[type].dayjs.js.relativeTime
44
+ | append: ','
45
+ | append: site.data.origin[type].dayjs.js.localizedFormat
46
+ %}
47
+ {% endif %}
48
+
49
+ {% if page.content contains '<h2' or page.content contains '<h3' and site.toc and page.toc %}
50
+ {% assign urls = urls | append: ',' | append: site.data.origin[type].toc.js %}
51
+ {% endif %}
52
+
53
+ {% if page.mermaid %}
54
+ {% assign urls = urls | append: ',' | append: site.data.origin[type].mermaid.js %}
55
+ {% endif %}
56
+
57
+ {% include jsdelivr-combine.html urls=urls %}
58
+
59
+ {% case page.layout %}
60
+ {% when 'home', 'categories', 'post', 'page' %}
61
+ {% assign js = page.layout %}
62
+ {% when 'archives', 'category', 'tag' %}
63
+ {% assign js = 'misc' %}
64
+ {% else %}
65
+ {% assign js = 'commons' %}
66
+ {% endcase %}
67
+
68
+ {% capture script %}/assets/js/dist/{{ js }}.min.js{% endcapture %}
69
+ <script defer src="{{ script | relative_url }}"></script>
70
+
71
+ {% if page.math %}
72
+ <!-- MathJax -->
73
+ <script>
74
+ /* see: <https://docs.mathjax.org/en/latest/options/input/tex.html#tex-options> */
75
+ MathJax = {
76
+ tex: {
77
+ /* start/end delimiter pairs for in-line math */
78
+ inlineMath: [
79
+ ['$', '$'],
80
+ ['\\(', '\\)']
81
+ ],
82
+ /* start/end delimiter pairs for display math */
83
+ displayMath: [
84
+ ['$$', '$$'],
85
+ ['\\[', '\\]']
86
+ ]
87
+ }
88
+ };
89
+ </script>
90
+ <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
91
+ <script id="MathJax-script" async src="{{ site.data.origin[type].mathjax.js | relative_url }}"></script>
92
+ {% endif %}
93
+
94
+ {% if jekyll.environment == 'production' %}
95
+ <!-- PWA -->
96
+ {% if site.pwa.enabled %}
97
+ <script defer src="{{ '/app.js' | relative_url }}"></script>
98
+ {% else %}
99
+ <script defer src="{{ '/unregister.js' | relative_url }}"></script>
100
+ {% endif %}
101
+
102
+ <!-- GA -->
103
+ {% if site.google_analytics.id != empty and site.google_analytics.id %}
104
+ {% include google-analytics.html %}
105
+ {% endif %}
106
+ {% endif %}