doc-theme 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +50 -0
- data/_data/locales/ar.yml +91 -0
- data/_data/locales/bg-BG.yml +81 -0
- data/_data/locales/cs-CZ.yml +89 -0
- data/_data/locales/de-DE.yml +87 -0
- data/_data/locales/el-GR.yml +91 -0
- data/_data/locales/en.yml +91 -0
- data/_data/locales/es-ES.yml +77 -0
- data/_data/locales/fi-FI.yml +90 -0
- data/_data/locales/fr-FR.yml +77 -0
- data/_data/locales/hu-HU.yml +79 -0
- data/_data/locales/id-ID.yml +77 -0
- data/_data/locales/it-IT.yml +90 -0
- data/_data/locales/ko-KR.yml +84 -0
- data/_data/locales/my-MM.yml +77 -0
- data/_data/locales/pt-BR.yml +77 -0
- data/_data/locales/ru-RU.yml +87 -0
- data/_data/locales/sl-SI.yml +91 -0
- data/_data/locales/sv-SE.yml +91 -0
- data/_data/locales/th.yml +91 -0
- data/_data/locales/tr-TR.yml +77 -0
- data/_data/locales/uk-UA.yml +77 -0
- data/_data/locales/vi-VN.yml +76 -0
- data/_data/locales/zh-CN.yml +83 -0
- data/_data/locales/zh-TW.yml +83 -0
- data/_data/origin/basic.yml +46 -0
- data/_data/origin/cors.yml +59 -0
- data/_includes/.DS_Store +0 -0
- data/_includes/analytics/goatcounter.html +6 -0
- data/_includes/analytics/google.html +13 -0
- data/_includes/comments/disqus.html +50 -0
- data/_includes/comments/giscus.html +65 -0
- data/_includes/comments/utterances.html +50 -0
- data/_includes/comments.html +5 -0
- data/_includes/datetime.html +20 -0
- data/_includes/embed/bilibili.html +9 -0
- data/_includes/embed/twitch.html +8 -0
- data/_includes/embed/video.html +38 -0
- data/_includes/embed/youtube.html +9 -0
- data/_includes/favicons.html +19 -0
- data/_includes/footer.html +42 -0
- data/_includes/head.html +111 -0
- data/_includes/img-url.html +39 -0
- data/_includes/js-selector.html +126 -0
- data/_includes/jsdelivr-combine.html +26 -0
- data/_includes/lang.html +10 -0
- data/_includes/language-alias.html +70 -0
- data/_includes/mermaid.html +58 -0
- data/_includes/metadata-hook.html +1 -0
- data/_includes/mode-toggle.html +143 -0
- data/_includes/no-linenos.html +10 -0
- data/_includes/notification.html +24 -0
- data/_includes/origin-type.html +13 -0
- data/_includes/pageviews/goatcounter.html +18 -0
- data/_includes/post-nav.html +34 -0
- data/_includes/post-paginator.html +91 -0
- data/_includes/post-sharing.html +52 -0
- data/_includes/read-time.html +37 -0
- data/_includes/refactor-content.html +255 -0
- data/_includes/related-posts.html +96 -0
- data/_includes/search-loader.html +47 -0
- data/_includes/search-results.html +10 -0
- data/_includes/sidebar.html +99 -0
- data/_includes/toc.html +13 -0
- data/_includes/topbar.html +77 -0
- data/_includes/trending-tags.html +46 -0
- data/_includes/update-list.html +40 -0
- data/_layouts/archives.html +35 -0
- data/_layouts/categories.html +138 -0
- data/_layouts/category.html +24 -0
- data/_layouts/compress.html +10 -0
- data/_layouts/default.html +87 -0
- data/_layouts/home.html +118 -0
- data/_layouts/page.html +20 -0
- data/_layouts/post.html +149 -0
- data/_layouts/tag.html +23 -0
- data/_layouts/tags.html +22 -0
- data/_sass/.DS_Store +0 -0
- data/_sass/addon/commons.scss +1553 -0
- data/_sass/addon/module.scss +200 -0
- data/_sass/addon/syntax.scss +292 -0
- data/_sass/addon/variables.scss +33 -0
- data/_sass/colors/syntax-dark.scss +164 -0
- data/_sass/colors/syntax-light.scss +214 -0
- data/_sass/colors/typography-dark.scss +147 -0
- data/_sass/colors/typography-light.scss +112 -0
- data/_sass/layout/archives.scss +144 -0
- data/_sass/layout/categories.scss +83 -0
- data/_sass/layout/category-tag.scss +72 -0
- data/_sass/layout/home.scss +189 -0
- data/_sass/layout/post.scss +357 -0
- data/_sass/layout/tags.scss +19 -0
- data/_sass/main.scss +13 -0
- data/_sass/variables-hook.scss +3 -0
- data/assets/.DS_Store +0 -0
- data/assets/404.html +14 -0
- data/assets/css/doc-theme.scss +6 -0
- data/assets/feed.xml +61 -0
- data/assets/img/favicons/android-chrome-192x192.png +0 -0
- data/assets/img/favicons/android-chrome-512x512.png +0 -0
- data/assets/img/favicons/apple-touch-icon.png +0 -0
- data/assets/img/favicons/browserconfig.xml +13 -0
- data/assets/img/favicons/favicon-16x16.png +0 -0
- data/assets/img/favicons/favicon-32x32.png +0 -0
- data/assets/img/favicons/favicon.ico +0 -0
- data/assets/img/favicons/mstile-150x150.png +0 -0
- data/assets/img/favicons/site.webmanifest +26 -0
- data/assets/js/data/search.json +20 -0
- data/assets/js/data/swconf.js +51 -0
- data/assets/js/pwa/app.js +54 -0
- data/assets/js/pwa/sw.js +101 -0
- data/assets/robots.txt +10 -0
- metadata +260 -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,59 @@
|
|
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
|
+
# polyfill.io for math (cdnjs.cloudflare.com/polyfill)
|
12
|
+
- url: https://cdnjs.cloudflare.com
|
13
|
+
|
14
|
+
# fonts
|
15
|
+
|
16
|
+
webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:wght@400;600;700;900&display=swap
|
17
|
+
|
18
|
+
# Libraries
|
19
|
+
|
20
|
+
jquery:
|
21
|
+
js: https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js
|
22
|
+
|
23
|
+
bootstrap:
|
24
|
+
css: https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css
|
25
|
+
js: https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js
|
26
|
+
|
27
|
+
toc:
|
28
|
+
css: https://cdn.jsdelivr.net/npm/tocbot@4.25.0/dist/tocbot.min.css
|
29
|
+
js: https://cdn.jsdelivr.net/npm/tocbot@4.25.0/dist/tocbot.min.js
|
30
|
+
|
31
|
+
fontawesome:
|
32
|
+
css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css
|
33
|
+
|
34
|
+
search:
|
35
|
+
js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js
|
36
|
+
|
37
|
+
mermaid:
|
38
|
+
js: https://cdn.jsdelivr.net/npm/mermaid@10.8.0/dist/mermaid.min.js
|
39
|
+
|
40
|
+
dayjs:
|
41
|
+
js:
|
42
|
+
common: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/dayjs.min.js
|
43
|
+
locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/locale/:LOCALE.min.js
|
44
|
+
relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/plugin/relativeTime.min.js
|
45
|
+
localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.10/plugin/localizedFormat.min.js
|
46
|
+
|
47
|
+
magnific-popup:
|
48
|
+
css: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/magnific-popup.min.css
|
49
|
+
js: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/jquery.magnific-popup.min.js
|
50
|
+
|
51
|
+
lazy-polyfill:
|
52
|
+
css: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2.1.1/dist/loading-attribute-polyfill.min.css
|
53
|
+
js: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2.1.1/dist/loading-attribute-polyfill.umd.min.js
|
54
|
+
|
55
|
+
clipboard:
|
56
|
+
js: https://cdn.jsdelivr.net/npm/clipboard@2.0.11/dist/clipboard.min.js
|
57
|
+
|
58
|
+
mathjax:
|
59
|
+
js: https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-chtml.js
|
data/_includes/.DS_Store
ADDED
Binary file
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Global site tag (gtag.js) - Google Analytics -->
|
2
|
+
<script defer src="https://www.googletagmanager.com/gtag/js?id={{ site.analytics.google.id }}"></script>
|
3
|
+
<script>
|
4
|
+
document.addEventListener('DOMContentLoaded', function (event) {
|
5
|
+
window.dataLayer = window.dataLayer || [];
|
6
|
+
function gtag() {
|
7
|
+
dataLayer.push(arguments);
|
8
|
+
}
|
9
|
+
|
10
|
+
gtag('js', new Date());
|
11
|
+
gtag('config', '{{ site.analytics.google.id }}');
|
12
|
+
});
|
13
|
+
</script>
|
@@ -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,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,38 @@
|
|
1
|
+
{% assign video_url = include.src %}
|
2
|
+
{% assign poster_url = include.poster %}
|
3
|
+
|
4
|
+
{% unless video_url contains '://' %}
|
5
|
+
{%- capture video_url -%}
|
6
|
+
{% include img-url.html src=video_url img_path=page.img_path %}
|
7
|
+
{%- endcapture -%}
|
8
|
+
{% endunless %}
|
9
|
+
|
10
|
+
{% if poster_url %}
|
11
|
+
{% unless poster_url contains '://' %}
|
12
|
+
{%- capture poster_url -%}
|
13
|
+
{% include img-url.html src=poster_url img_path=page.img_path %}
|
14
|
+
{%- endcapture -%}
|
15
|
+
{% endunless %}
|
16
|
+
{% assign poster = 'poster="' | append: poster_url | append: '"' %}
|
17
|
+
{% endif %}
|
18
|
+
|
19
|
+
{% assign attributes = 'controls' %}
|
20
|
+
|
21
|
+
{% if include.autoplay %}
|
22
|
+
{% assign attributes = attributes | append: ' ' | append: 'autoplay' %}
|
23
|
+
{% endif %}
|
24
|
+
|
25
|
+
{% if include.loop %}
|
26
|
+
{% assign attributes = attributes | append: ' ' | append: 'loop' %}
|
27
|
+
{% endif %}
|
28
|
+
|
29
|
+
{% if include.muted %}
|
30
|
+
{% assign attributes = attributes | append: ' ' | append: 'muted' %}
|
31
|
+
{% endif %}
|
32
|
+
|
33
|
+
<p>
|
34
|
+
<video class="embed-video file" src="{{ video_url }}" {{ poster }} {{ attributes }}>
|
35
|
+
Your browser doesn't support HTML video. Here is a <a href="{{ video_url }}">link to the video</a> instead.
|
36
|
+
</video>
|
37
|
+
<em>{{ include.title }}</em>
|
38
|
+
</p>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<iframe
|
2
|
+
class="embed-video"
|
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,19 @@
|
|
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
|
+
{% if site.pwa.enabled %}
|
12
|
+
<link rel="manifest" href="{{ favicon_path }}/site.webmanifest">
|
13
|
+
{% endif %}
|
14
|
+
<link rel="shortcut icon" href="{{ favicon_path }}/favicon.ico">
|
15
|
+
<meta name="apple-mobile-web-app-title" content="{{ site.title }}">
|
16
|
+
<meta name="application-name" content="{{ site.title }}">
|
17
|
+
<meta name="msapplication-TileColor" content="#da532c">
|
18
|
+
<meta name="msapplication-config" content="{{ favicon_path }}/browserconfig.xml">
|
19
|
+
<meta name="theme-color" content="#ffffff">
|
@@ -0,0 +1,42 @@
|
|
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
|
+
|
14
|
+
{% if site.social.links %}
|
15
|
+
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
|
16
|
+
{% else %}
|
17
|
+
<em class="fst-normal">{{ site.social.name }}</em>.
|
18
|
+
{% endif %}
|
19
|
+
|
20
|
+
{% if site.data.locales[include.lang].copyright.brief %}
|
21
|
+
<span
|
22
|
+
data-bs-toggle="tooltip"
|
23
|
+
data-bs-placement="top"
|
24
|
+
title="{{ site.data.locales[include.lang].copyright.verbose }}"
|
25
|
+
>
|
26
|
+
{{- site.data.locales[include.lang].copyright.brief -}}
|
27
|
+
</span>
|
28
|
+
{% endif %}
|
29
|
+
</p>
|
30
|
+
|
31
|
+
<p>
|
32
|
+
{%- capture _platform -%}
|
33
|
+
<a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
|
34
|
+
{%- endcapture -%}
|
35
|
+
|
36
|
+
{%- capture _theme -%}
|
37
|
+
<a href="https://github.com/salarce/doc-theme" target="_blank" rel="noopener">Doc-theme</a>
|
38
|
+
{%- endcapture -%}
|
39
|
+
|
40
|
+
{{ site.data.locales[include.lang].meta | replace: ':PLATFORM', _platform | replace: ':THEME', _theme }}
|
41
|
+
</p>
|
42
|
+
</footer>
|
data/_includes/head.html
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
<head>
|
2
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
3
|
+
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7">
|
4
|
+
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e">
|
5
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
6
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
7
|
+
<meta
|
8
|
+
name="viewport"
|
9
|
+
content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
|
10
|
+
>
|
11
|
+
|
12
|
+
{%- capture seo_tags -%}
|
13
|
+
{% seo title=false %}
|
14
|
+
{%- endcapture -%}
|
15
|
+
|
16
|
+
<!-- Setup Open Graph image -->
|
17
|
+
|
18
|
+
{% if page.image %}
|
19
|
+
{% assign src = page.image.path | default: page.image %}
|
20
|
+
|
21
|
+
{% unless src contains '://' %}
|
22
|
+
{%- capture img_url -%}
|
23
|
+
{% include img-url.html src=src img_path=page.img_path absolute=true %}
|
24
|
+
{%- endcapture -%}
|
25
|
+
|
26
|
+
{%- capture old_url -%}{{ src | absolute_url }}{%- endcapture -%}
|
27
|
+
{%- capture new_url -%}{{ img_url }}{%- endcapture -%}
|
28
|
+
|
29
|
+
{% assign seo_tags = seo_tags | replace: old_url, new_url %}
|
30
|
+
{% endunless %}
|
31
|
+
|
32
|
+
{% elsif site.social_preview_image %}
|
33
|
+
{%- capture img_url -%}
|
34
|
+
{% include img-url.html src=site.social_preview_image absolute=true %}
|
35
|
+
{%- endcapture -%}
|
36
|
+
|
37
|
+
{%- capture og_image -%}
|
38
|
+
<meta property="og:image" content="{{ img_url }}" />
|
39
|
+
{%- endcapture -%}
|
40
|
+
|
41
|
+
{%- capture twitter_image -%}
|
42
|
+
<meta property="twitter:card" content="summary_large_image" />
|
43
|
+
<meta property="twitter:image" content="{{ img_url }}" />
|
44
|
+
{%- endcapture -%}
|
45
|
+
|
46
|
+
{% assign old_meta_clip = '<meta name="twitter:card" content="summary" />' %}
|
47
|
+
{% assign new_meta_clip = og_image | append: twitter_image %}
|
48
|
+
{% assign seo_tags = seo_tags | replace: old_meta_clip, new_meta_clip %}
|
49
|
+
{% endif %}
|
50
|
+
|
51
|
+
{{ seo_tags }}
|
52
|
+
|
53
|
+
<title>
|
54
|
+
{%- unless page.layout == 'home' -%}
|
55
|
+
{{ page.title | append: ' | ' }}
|
56
|
+
{%- endunless -%}
|
57
|
+
{{ site.title }}
|
58
|
+
</title>
|
59
|
+
|
60
|
+
{% include_cached favicons.html %}
|
61
|
+
|
62
|
+
{% if site.resources.ignore_env != jekyll.environment and site.resources.self_hosted %}
|
63
|
+
<link href="{{ site.data.origin[type].webfonts | relative_url }}" rel="stylesheet">
|
64
|
+
|
65
|
+
{% else %}
|
66
|
+
{% for cdn in site.data.origin[type].cdns %}
|
67
|
+
<link rel="preconnect" href="{{ cdn.url }}" {{ cdn.args }}>
|
68
|
+
<link rel="dns-prefetch" href="{{ cdn.url }}" {{ cdn.args }}>
|
69
|
+
{% endfor %}
|
70
|
+
|
71
|
+
<link rel="stylesheet" href="{{ site.data.origin[type].webfonts | relative_url }}">
|
72
|
+
{% endif %}
|
73
|
+
|
74
|
+
<!-- GA -->
|
75
|
+
{% if jekyll.environment == 'production' and site.analytics.google.id != empty and site.analytics.google.id %}
|
76
|
+
<link rel="preconnect" href="https://www.google-analytics.com" crossorigin="use-credentials">
|
77
|
+
<link rel="dns-prefetch" href="https://www.google-analytics.com">
|
78
|
+
|
79
|
+
<link rel="preconnect" href="https://www.googletagmanager.com" crossorigin="anonymous">
|
80
|
+
<link rel="dns-prefetch" href="https://www.googletagmanager.com">
|
81
|
+
{% endif %}
|
82
|
+
|
83
|
+
<!-- Bootstrap -->
|
84
|
+
<link rel="stylesheet" href="{{ site.data.origin[type].bootstrap.css | relative_url }}">
|
85
|
+
|
86
|
+
<!-- Font Awesome -->
|
87
|
+
<link rel="stylesheet" href="{{ site.data.origin[type].fontawesome.css | relative_url }}">
|
88
|
+
|
89
|
+
<link rel="stylesheet" href="{{ '/assets/css/:THEME.css' | replace: ':THEME', site.theme | relative_url }}">
|
90
|
+
|
91
|
+
{% if site.toc and page.toc %}
|
92
|
+
<link rel="stylesheet" href="{{ site.data.origin[type].toc.css | relative_url }}">
|
93
|
+
{% endif %}
|
94
|
+
|
95
|
+
{% if page.layout == 'post' or page.layout == 'page' or page.layout == 'home' %}
|
96
|
+
<link rel="stylesheet" href="{{ site.data.origin[type]['lazy-polyfill'].css | relative_url }}">
|
97
|
+
{% endif %}
|
98
|
+
|
99
|
+
{% if page.layout == 'page' or page.layout == 'post' %}
|
100
|
+
<!-- Manific Popup -->
|
101
|
+
<link rel="stylesheet" href="{{ site.data.origin[type].magnific-popup.css | relative_url }}">
|
102
|
+
{% endif %}
|
103
|
+
|
104
|
+
<!-- JavaScript -->
|
105
|
+
|
106
|
+
{% unless site.theme_mode %}
|
107
|
+
{% include mode-toggle.html %}
|
108
|
+
{% endunless %}
|
109
|
+
|
110
|
+
{% include metadata-hook.html %}
|
111
|
+
</head>
|