jekyll-theme-purple 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_data/locales/ar.yml +7 -1
- data/_data/locales/bg-BG.yml +7 -1
- data/_data/locales/ca-ES.yml +7 -1
- data/_data/locales/cs-CZ.yml +7 -1
- data/_data/locales/da-DK.yml +7 -1
- data/_data/locales/de-DE.yml +7 -1
- data/_data/locales/dv/342/200/221MV.yml +7 -1
- data/_data/locales/el-GR.yml +7 -1
- data/_data/locales/en.yml +7 -1
- data/_data/locales/es-ES.yml +7 -1
- data/_data/locales/fa-IR.yml +7 -1
- data/_data/locales/fi-FI.yml +7 -1
- data/_data/locales/fr-FR.yml +7 -1
- data/_data/locales/hu-HU.yml +7 -1
- data/_data/locales/id-ID.yml +7 -1
- data/_data/locales/it-IT.yml +7 -1
- data/_data/locales/ja-JP.yml +7 -1
- data/_data/locales/ko-KR.yml +7 -1
- data/_data/locales/ku-IQ.yml +7 -1
- data/_data/locales/my-MM.yml +7 -1
- data/_data/locales/nl-NL.yml +7 -1
- data/_data/locales/ps/342/200/221AF.yml +7 -1
- data/_data/locales/pt-BR.yml +7 -1
- data/_data/locales/ru-RU.yml +7 -1
- data/_data/locales/sl-SI.yml +7 -1
- data/_data/locales/sv-SE.yml +7 -1
- data/_data/locales/th.yml +7 -1
- data/_data/locales/tr-TR.yml +7 -1
- data/_data/locales/uk-UA.yml +7 -1
- data/_data/locales/ur-PK.yml +7 -1
- data/_data/locales/vi-VN.yml +7 -1
- data/_data/locales/zh-CN.yml +7 -1
- data/_data/locales/zh-TW.yml +7 -1
- data/_data/origin/cors.yml +18 -15
- data/_includes/comments/disqus.html +2 -2
- data/_includes/comments/giscus.html +17 -7
- data/_includes/comments/utterances.html +4 -4
- data/_includes/datetime.html +1 -1
- data/_includes/head.html +16 -5
- data/_includes/js-selector.html +0 -1
- data/_includes/language-alias.html +7 -9
- data/_includes/media-url.html +1 -1
- data/_includes/notification.html +13 -9
- data/_includes/post-edit.html +23 -0
- data/_includes/post-paginator.html +1 -1
- data/_includes/refactor-content.html +1 -1
- data/_includes/sidebar.html +48 -6
- data/_layouts/default.html +7 -6
- data/_layouts/post.html +16 -13
- data/_sass/abstracts/_mixins.scss +6 -0
- data/_sass/abstracts/_variables.scss +6 -0
- data/_sass/base/_base.scss +28 -20
- data/_sass/base/_syntax.scss +7 -4
- data/_sass/components/_popups.scss +17 -28
- data/_sass/layout/_sidebar.scss +97 -9
- data/_sass/pages/_archives.scss +1 -1
- data/_sass/pages/_post.scss +11 -1
- data/_sass/themes/_dark.scss +5 -0
- data/_sass/themes/_light.scss +5 -0
- data/assets/css/jekyll-theme-purple.scss +4 -0
- data/assets/img/favicons/site.webmanifest +1 -1
- metadata +2 -10
- data/assets/js/dist/app.min.js +0 -7
- data/assets/js/dist/categories.min.js +0 -4
- data/assets/js/dist/commons.min.js +0 -4
- data/assets/js/dist/home.min.js +0 -4
- data/assets/js/dist/misc.min.js +0 -4
- data/assets/js/dist/page.min.js +0 -4
- data/assets/js/dist/post.min.js +0 -4
- data/assets/js/dist/sw.min.js +0 -7
- data/assets/js/dist/theme.min.js +0 -4
data/_data/locales/tr-TR.yml
CHANGED
|
@@ -46,9 +46,14 @@ not_found:
|
|
|
46
46
|
statement: Üzgünüz, bu linki yanlış yerleştirdik veya var olmayan bir şeye işaret ediyor.
|
|
47
47
|
|
|
48
48
|
notification:
|
|
49
|
-
update_found:
|
|
49
|
+
update_found: Yeni içerik bulundu
|
|
50
50
|
update: Güncelle
|
|
51
51
|
|
|
52
|
+
theme:
|
|
53
|
+
light: Açık
|
|
54
|
+
dark: Koyu
|
|
55
|
+
system: Sistem
|
|
56
|
+
|
|
52
57
|
# ----- Posts related labels -----
|
|
53
58
|
|
|
54
59
|
post:
|
|
@@ -60,6 +65,7 @@ post:
|
|
|
60
65
|
read_time:
|
|
61
66
|
unit: dakikada
|
|
62
67
|
prompt: okunabilir
|
|
68
|
+
edit: Bu gönderiyi düzenle
|
|
63
69
|
relate_posts: Benzer Gönderiler
|
|
64
70
|
share: Paylaş
|
|
65
71
|
button:
|
data/_data/locales/uk-UA.yml
CHANGED
|
@@ -46,9 +46,14 @@ not_found:
|
|
|
46
46
|
statement: Вибачте, це посилання вказує на ресурс, що не існує.
|
|
47
47
|
|
|
48
48
|
notification:
|
|
49
|
-
update_found:
|
|
49
|
+
update_found: Знайдено новий вміст
|
|
50
50
|
update: Оновлення
|
|
51
51
|
|
|
52
|
+
theme:
|
|
53
|
+
light: Світла
|
|
54
|
+
dark: Темна
|
|
55
|
+
system: Системна
|
|
56
|
+
|
|
52
57
|
# ----- Posts related labels -----
|
|
53
58
|
|
|
54
59
|
post:
|
|
@@ -60,6 +65,7 @@ post:
|
|
|
60
65
|
read_time:
|
|
61
66
|
unit: хвилин
|
|
62
67
|
prompt: читання
|
|
68
|
+
edit: Редагувати цей пост
|
|
63
69
|
relate_posts: Вас також може зацікавити
|
|
64
70
|
share: Поділитися
|
|
65
71
|
button:
|
data/_data/locales/ur-PK.yml
CHANGED
|
@@ -46,9 +46,14 @@ not_found:
|
|
|
46
46
|
statement: معذرت، یہ URL غلط ہے یا جس چیز کی طرف اشارہ کر رہا ہے وہ موجود نہیں۔
|
|
47
47
|
|
|
48
48
|
notification:
|
|
49
|
-
update_found: نیا مواد
|
|
49
|
+
update_found: نیا مواد مل گیا
|
|
50
50
|
update: اپ ڈیٹ
|
|
51
51
|
|
|
52
|
+
theme:
|
|
53
|
+
light: روشن
|
|
54
|
+
dark: تاریک
|
|
55
|
+
system: سسٹم
|
|
56
|
+
|
|
52
57
|
# ----- Posts related labels -----
|
|
53
58
|
|
|
54
59
|
post:
|
|
@@ -60,6 +65,7 @@ post:
|
|
|
60
65
|
read_time:
|
|
61
66
|
unit: منٹ
|
|
62
67
|
prompt: پڑھیں
|
|
68
|
+
edit: اس تحریر میں ترمیم کریں
|
|
63
69
|
relate_posts: مزید مطالعہ
|
|
64
70
|
share: شیئر
|
|
65
71
|
button:
|
data/_data/locales/vi-VN.yml
CHANGED
|
@@ -45,9 +45,14 @@ not_found:
|
|
|
45
45
|
statement: Xin lỗi, chúng tôi đã đặt nhầm URL hoặc đường dẫn trỏ đến một trang nào đó không tồn tại.
|
|
46
46
|
|
|
47
47
|
notification:
|
|
48
|
-
update_found: Đã
|
|
48
|
+
update_found: Đã tìm thấy nội dung mới
|
|
49
49
|
update: Cập nhật
|
|
50
50
|
|
|
51
|
+
theme:
|
|
52
|
+
light: Sáng
|
|
53
|
+
dark: Tối
|
|
54
|
+
system: Hệ thống
|
|
55
|
+
|
|
51
56
|
# ----- Posts related labels -----
|
|
52
57
|
|
|
53
58
|
post:
|
|
@@ -59,6 +64,7 @@ post:
|
|
|
59
64
|
read_time:
|
|
60
65
|
unit: phút
|
|
61
66
|
prompt: đọc
|
|
67
|
+
edit: Chỉnh sửa bài viết này
|
|
62
68
|
relate_posts: Bài viết liên quan
|
|
63
69
|
share: Chia sẻ
|
|
64
70
|
button:
|
data/_data/locales/zh-CN.yml
CHANGED
|
@@ -45,9 +45,14 @@ not_found:
|
|
|
45
45
|
statement: 抱歉,我们放错了该 URL,或者它指向了不存在的内容。
|
|
46
46
|
|
|
47
47
|
notification:
|
|
48
|
-
update_found:
|
|
48
|
+
update_found: 发现新内容
|
|
49
49
|
update: 更新
|
|
50
50
|
|
|
51
|
+
theme:
|
|
52
|
+
light: 浅色
|
|
53
|
+
dark: 深色
|
|
54
|
+
system: 跟随系统
|
|
55
|
+
|
|
51
56
|
# ----- Posts related labels -----
|
|
52
57
|
|
|
53
58
|
post:
|
|
@@ -59,6 +64,7 @@ post:
|
|
|
59
64
|
read_time:
|
|
60
65
|
unit: 分钟
|
|
61
66
|
prompt: 阅读
|
|
67
|
+
edit: 编辑此文
|
|
62
68
|
relate_posts: 相关文章
|
|
63
69
|
share: 分享
|
|
64
70
|
button:
|
data/_data/locales/zh-TW.yml
CHANGED
|
@@ -45,9 +45,14 @@ not_found:
|
|
|
45
45
|
statement: 抱歉,您可能正在存取一個已被移動的 URL,或者它從未存在。
|
|
46
46
|
|
|
47
47
|
notification:
|
|
48
|
-
update_found:
|
|
48
|
+
update_found: 發現新內容
|
|
49
49
|
update: 更新
|
|
50
50
|
|
|
51
|
+
theme:
|
|
52
|
+
light: 淺色
|
|
53
|
+
dark: 深色
|
|
54
|
+
system: 跟隨系統
|
|
55
|
+
|
|
51
56
|
# ----- Posts related labels -----
|
|
52
57
|
|
|
53
58
|
post:
|
|
@@ -59,6 +64,7 @@ post:
|
|
|
59
64
|
read_time:
|
|
60
65
|
unit: 分鐘
|
|
61
66
|
prompt: 閱讀
|
|
67
|
+
edit: 編輯此文
|
|
62
68
|
relate_posts: 相關文章
|
|
63
69
|
share: 分享
|
|
64
70
|
button:
|
data/_data/origin/cors.yml
CHANGED
|
@@ -19,36 +19,39 @@ webfonts: https://fonts.googleapis.com/css2?family=Lato:wght@300;400&family=Sour
|
|
|
19
19
|
|
|
20
20
|
# Libraries
|
|
21
21
|
|
|
22
|
+
bootstrap:
|
|
23
|
+
css: https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css
|
|
24
|
+
|
|
22
25
|
toc:
|
|
23
|
-
css: https://cdn.jsdelivr.net/npm/tocbot@4
|
|
24
|
-
js: https://cdn.jsdelivr.net/npm/tocbot@4
|
|
26
|
+
css: https://cdn.jsdelivr.net/npm/tocbot@4/dist/tocbot.min.css
|
|
27
|
+
js: https://cdn.jsdelivr.net/npm/tocbot@4/dist/tocbot.min.js
|
|
25
28
|
|
|
26
29
|
fontawesome:
|
|
27
|
-
css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@7
|
|
30
|
+
css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@7/css/all.min.css
|
|
28
31
|
|
|
29
32
|
search:
|
|
30
|
-
js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1
|
|
33
|
+
js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1/dest/simple-jekyll-search.min.js
|
|
31
34
|
|
|
32
35
|
mermaid:
|
|
33
|
-
js: https://cdn.jsdelivr.net/npm/mermaid@11
|
|
36
|
+
js: https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js
|
|
34
37
|
|
|
35
38
|
dayjs:
|
|
36
39
|
js:
|
|
37
|
-
common: https://cdn.jsdelivr.net/npm/dayjs@1
|
|
38
|
-
locale: https://cdn.jsdelivr.net/npm/dayjs@1
|
|
39
|
-
relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1
|
|
40
|
-
localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1
|
|
40
|
+
common: https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js
|
|
41
|
+
locale: https://cdn.jsdelivr.net/npm/dayjs@1/locale/:LOCALE.js
|
|
42
|
+
relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1/plugin/relativeTime.js
|
|
43
|
+
localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1/plugin/localizedFormat.js
|
|
41
44
|
|
|
42
45
|
glightbox:
|
|
43
|
-
css: https://cdn.jsdelivr.net/npm/glightbox@3
|
|
44
|
-
js: https://cdn.jsdelivr.net/npm/glightbox@3
|
|
46
|
+
css: https://cdn.jsdelivr.net/npm/glightbox@3/dist/css/glightbox.min.css
|
|
47
|
+
js: https://cdn.jsdelivr.net/npm/glightbox@3/dist/js/glightbox.min.js
|
|
45
48
|
|
|
46
49
|
lazy-polyfill:
|
|
47
|
-
css: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2
|
|
48
|
-
js: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2
|
|
50
|
+
css: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2/dist/loading-attribute-polyfill.min.css
|
|
51
|
+
js: https://cdn.jsdelivr.net/npm/loading-attribute-polyfill@2/dist/loading-attribute-polyfill.umd.min.js
|
|
49
52
|
|
|
50
53
|
clipboard:
|
|
51
|
-
js: https://cdn.jsdelivr.net/npm/clipboard@2
|
|
54
|
+
js: https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js
|
|
52
55
|
|
|
53
56
|
mathjax:
|
|
54
|
-
js: https://cdn.jsdelivr.net/npm/mathjax@
|
|
57
|
+
js: https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
{%- comment -%} Auto switch theme {%- endcomment -%}
|
|
21
21
|
function reloadDisqus(event) {
|
|
22
|
-
if (event.source === window && event.data && event.data.id === Theme.
|
|
22
|
+
if (event.source === window && event.data && event.data.id === Theme.eventId) {
|
|
23
23
|
{%- comment -%} Disqus hasn't been loaded {%- endcomment -%}
|
|
24
24
|
if (typeof DISQUS === 'undefined') {
|
|
25
25
|
return;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
addDisqus();
|
|
35
35
|
|
|
36
|
-
if (Theme.
|
|
36
|
+
if (Theme.isToggleable) {
|
|
37
37
|
addEventListener('message', reloadDisqus);
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- https://giscus.app/ -->
|
|
2
2
|
<script>
|
|
3
3
|
(function () {
|
|
4
|
-
const
|
|
5
|
-
const initTheme =
|
|
4
|
+
const themeMap = Theme.newThemeMap('light', 'dark_dimmed');
|
|
5
|
+
const initTheme = themeMap[Theme.resolvedTheme];
|
|
6
6
|
|
|
7
7
|
let lang = '{{ site.comments.giscus.lang | default: lang }}';
|
|
8
8
|
{%- comment -%} https://github.com/giscus/giscus/tree/main/locales {%- endcomment -%}
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
$footer.insertAdjacentElement("beforebegin", giscusNode);
|
|
38
38
|
|
|
39
39
|
addEventListener('message', (event) => {
|
|
40
|
-
if (event.source === window && event.data && event.data.id === Theme.
|
|
41
|
-
const newTheme =
|
|
40
|
+
if (event.source === window && event.data && event.data.id === Theme.eventId) {
|
|
41
|
+
const newTheme = themeMap[Theme.resolvedTheme];
|
|
42
42
|
|
|
43
43
|
const message = {
|
|
44
44
|
setConfig: {
|
|
@@ -46,9 +46,19 @@
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
const iframe = document.querySelector('.giscus-frame');
|
|
50
|
+
|
|
51
|
+
if (!iframe) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (iframe.classList.contains('giscus-frame--loading')) {
|
|
56
|
+
let url = new URL(iframe.src);
|
|
57
|
+
url.searchParams.set('theme', newTheme);
|
|
58
|
+
iframe.src = url.toString();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app');
|
|
52
62
|
}
|
|
53
63
|
});
|
|
54
64
|
})();
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<script>
|
|
3
3
|
(function () {
|
|
4
4
|
const origin = 'https://utteranc.es';
|
|
5
|
-
const
|
|
6
|
-
const initTheme =
|
|
5
|
+
const themeMap = Theme.newThemeMap('github-light', 'github-dark');
|
|
6
|
+
const initTheme = themeMap[Theme.resolvedTheme];
|
|
7
7
|
|
|
8
8
|
let script = document.createElement('script');
|
|
9
9
|
script.src = 'https://utteranc.es/client.js';
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
{%- comment -%}
|
|
23
23
|
Credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347>
|
|
24
24
|
{%- endcomment -%}
|
|
25
|
-
if (event.source === window && event.data && event.data.id === Theme.
|
|
26
|
-
newTheme =
|
|
25
|
+
if (event.source === window && event.data && event.data.id === Theme.eventId) {
|
|
26
|
+
newTheme = themeMap[Theme.resolvedTheme];
|
|
27
27
|
|
|
28
28
|
const message = {
|
|
29
29
|
type: 'set-theme',
|
data/_includes/datetime.html
CHANGED
data/_includes/head.html
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
3
3
|
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7">
|
|
4
4
|
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e">
|
|
5
|
-
<meta name="mobile-web-app-capable" content="yes">
|
|
6
|
-
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
7
5
|
<meta
|
|
8
6
|
name="viewport"
|
|
9
7
|
content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
|
|
@@ -50,11 +48,24 @@
|
|
|
50
48
|
|
|
51
49
|
{{ seo_tags }}
|
|
52
50
|
|
|
51
|
+
{%- if site.social.fediverse_handle %}
|
|
52
|
+
<!-- Fediverse handle/creator -->
|
|
53
|
+
<meta name="fediverse:creator" content="{{ site.social.fediverse_handle }}">
|
|
54
|
+
{% endif %}
|
|
55
|
+
|
|
53
56
|
<title>
|
|
54
57
|
{%- unless page.layout == 'home' -%}
|
|
55
|
-
{
|
|
58
|
+
{%- capture title -%}
|
|
59
|
+
{%- if page.collection == 'tabs' -%}
|
|
60
|
+
{%- assign tab_key = page.title | downcase -%}
|
|
61
|
+
{{- site.data.locales[include.lang].tabs[tab_key] -}}
|
|
62
|
+
{%- else -%}
|
|
63
|
+
{{- page.title -}}
|
|
64
|
+
{%- endif -%}
|
|
65
|
+
{%- endcapture -%}
|
|
66
|
+
{{- title | append: ' | ' -}}
|
|
56
67
|
{%- endunless -%}
|
|
57
|
-
{{ site.title }}
|
|
68
|
+
{{- site.title -}}
|
|
58
69
|
</title>
|
|
59
70
|
|
|
60
71
|
{% include_cached favicons.html %}
|
|
@@ -70,7 +81,7 @@
|
|
|
70
81
|
|
|
71
82
|
<!-- Bootstrap -->
|
|
72
83
|
{% unless jekyll.environment == 'production' %}
|
|
73
|
-
<link rel="stylesheet" href="
|
|
84
|
+
<link rel="stylesheet" href="{{ site.data.origin.cors.bootstrap.css }}">
|
|
74
85
|
{% endunless %}
|
|
75
86
|
|
|
76
87
|
<!-- Theme style -->
|
data/_includes/js-selector.html
CHANGED
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
{% if page.math %}
|
|
68
68
|
<!-- MathJax -->
|
|
69
69
|
<script 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
70
|
<script id="MathJax-script" async src="{{ site.data.origin[type].mathjax.js | relative_url }}"></script>
|
|
72
71
|
{% endif %}
|
|
73
72
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
{% comment %}
|
|
2
|
-
|
|
3
2
|
Convert the alias of the syntax language to the official name
|
|
4
3
|
|
|
5
4
|
See: <https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers>
|
|
6
|
-
|
|
7
5
|
{% endcomment %}
|
|
8
6
|
|
|
9
7
|
{% assign _lang = include.language | default: '' %}
|
|
@@ -20,13 +18,13 @@
|
|
|
20
18
|
{% when 'coffeescript', 'coffee', 'coffee-script' %}
|
|
21
19
|
{{ 'CoffeeScript' }}
|
|
22
20
|
{% when 'cs', 'csharp' %}
|
|
23
|
-
|
|
21
|
+
{{ 'C#' }}
|
|
24
22
|
{% when 'erl' %}
|
|
25
23
|
{{ 'Erlang' }}
|
|
26
24
|
{% when 'graphql' %}
|
|
27
|
-
|
|
25
|
+
{{ 'GraphQL' }}
|
|
28
26
|
{% when 'haskell', 'hs' %}
|
|
29
|
-
|
|
27
|
+
{{ 'Haskell' }}
|
|
30
28
|
{% when 'javascript', 'js' %}
|
|
31
29
|
{{ 'JavaScript' }}
|
|
32
30
|
{% when 'make', 'mf', 'gnumake', 'bsdmake' %}
|
|
@@ -39,22 +37,22 @@
|
|
|
39
37
|
{{ 'Objective-C' }}
|
|
40
38
|
{% when 'perl', 'pl' %}
|
|
41
39
|
{{ 'Perl' }}
|
|
42
|
-
{% when 'php','php3','php4','php5' %}
|
|
40
|
+
{% when 'php', 'php3', 'php4', 'php5' %}
|
|
43
41
|
{{ 'PHP' }}
|
|
44
42
|
{% when 'py' %}
|
|
45
43
|
{{ 'Python' }}
|
|
46
44
|
{% when 'rb' %}
|
|
47
45
|
{{ 'Ruby' }}
|
|
48
|
-
{% when 'rs','no_run','ignore','should_panic' %}
|
|
46
|
+
{% when 'rs', 'no_run', 'ignore', 'should_panic' %}
|
|
49
47
|
{{ 'Rust' }}
|
|
50
48
|
{% when 'bash', 'zsh', 'ksh', 'sh' %}
|
|
51
49
|
{{ 'Shell' }}
|
|
52
50
|
{% when 'st', 'squeak' %}
|
|
53
51
|
{{ 'Smalltalk' }}
|
|
54
|
-
{% when 'tex'%}
|
|
52
|
+
{% when 'tex' %}
|
|
55
53
|
{{ 'TeX' }}
|
|
56
54
|
{% when 'latex' %}
|
|
57
|
-
{{ '
|
|
55
|
+
{{ 'LaTeX' }}
|
|
58
56
|
{% when 'ts', 'typescript' %}
|
|
59
57
|
{{ 'TypeScript' }}
|
|
60
58
|
{% when 'vb', 'visualbasic' %}
|
data/_includes/media-url.html
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
{%- comment -%} Add media resources subpath prefix {%- endcomment -%}
|
|
18
18
|
{% assign url = include.subpath | default: '' | append: '/' | append: url %}
|
|
19
19
|
|
|
20
|
-
{%- comment -%} Prepend
|
|
20
|
+
{%- comment -%} Prepend CDN URL {%- endcomment -%}
|
|
21
21
|
{% if site.cdn %}
|
|
22
22
|
{% assign url = site.cdn | append: '/' | append: url %}
|
|
23
23
|
{% endif %}
|
data/_includes/notification.html
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
<aside
|
|
2
2
|
id="notification"
|
|
3
|
-
class="toast"
|
|
3
|
+
class="toast w-auto rounded-5 text-nowrap"
|
|
4
4
|
role="alert"
|
|
5
5
|
aria-live="assertive"
|
|
6
6
|
aria-atomic="true"
|
|
7
7
|
data-bs-animation="true"
|
|
8
8
|
data-bs-autohide="false"
|
|
9
9
|
>
|
|
10
|
-
<div class="
|
|
10
|
+
<div class="d-flex align-items-center">
|
|
11
|
+
<div class="toast-body ps-3">
|
|
12
|
+
{{- site.data.locales[include.lang].notification.update_found -}}
|
|
13
|
+
</div>
|
|
11
14
|
<button
|
|
12
15
|
type="button"
|
|
13
|
-
class="btn-
|
|
16
|
+
class="btn btn-primary btn-sm rounded-2 py-0"
|
|
17
|
+
aria-label="Update"
|
|
18
|
+
>
|
|
19
|
+
{{- site.data.locales[include.lang].notification.update -}}
|
|
20
|
+
</button>
|
|
21
|
+
<button
|
|
22
|
+
type="button"
|
|
23
|
+
class="btn-close mx-3 ms-2"
|
|
14
24
|
data-bs-dismiss="toast"
|
|
15
25
|
aria-label="Close"
|
|
16
26
|
></button>
|
|
17
27
|
</div>
|
|
18
|
-
<div class="toast-body text-center pt-0">
|
|
19
|
-
<p class="px-2 mb-3">{{ site.data.locales[include.lang].notification.update_found }}</p>
|
|
20
|
-
<button type="button" class="btn btn-primary" aria-label="Update">
|
|
21
|
-
{{ site.data.locales[include.lang].notification.update }}
|
|
22
|
-
</button>
|
|
23
|
-
</div>
|
|
24
28
|
</aside>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Link to edit the post to contribute. -->
|
|
2
|
+
|
|
3
|
+
{% assign enabled = site.actions.edit_post.enabled %}
|
|
4
|
+
{% assign url = site.actions.edit_post.url %}
|
|
5
|
+
{% assign static_url = site.actions.edit_post.static_url %}
|
|
6
|
+
|
|
7
|
+
{% unless static_url %}
|
|
8
|
+
{% assign url = url | append: '/' | append: page.path %}
|
|
9
|
+
{% endunless %}
|
|
10
|
+
|
|
11
|
+
{% if enabled %}
|
|
12
|
+
<div class="post-edit">
|
|
13
|
+
{% assign edit = site.data.locales[include.lang].post.edit %}
|
|
14
|
+
<a
|
|
15
|
+
href="{{ url }}"
|
|
16
|
+
target="_blank"
|
|
17
|
+
rel="noopener"
|
|
18
|
+
>
|
|
19
|
+
<i class="fa fa-pen fa-fw me-1"></i>
|
|
20
|
+
<span>{{ edit }}</span>
|
|
21
|
+
</a>
|
|
22
|
+
</div>
|
|
23
|
+
{% endif %}
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
{% assign _parent = _right | slice: 1, 4 %}
|
|
174
174
|
|
|
175
175
|
{% if _parent == '</a>' %}
|
|
176
|
-
<!-- add class to
|
|
176
|
+
<!-- add class to existing <a> tag -->
|
|
177
177
|
{% assign _size = _img_content | size | minus: 1 %}
|
|
178
178
|
{% capture _class %}
|
|
179
179
|
class="img-link{% unless _lqip %} shimmer{% endunless %}"
|
data/_includes/sidebar.html
CHANGED
|
@@ -40,11 +40,53 @@
|
|
|
40
40
|
</ul>
|
|
41
41
|
</nav>
|
|
42
42
|
|
|
43
|
-
<div class="sidebar-bottom d-flex flex-wrap
|
|
44
|
-
{% unless site.theme_mode %}
|
|
45
|
-
|
|
46
|
-
<i class="
|
|
47
|
-
|
|
43
|
+
<div class="sidebar-bottom d-flex flex-wrap align-items-center w-100">
|
|
44
|
+
{% unless site.theme_mode == 'light' or site.theme_mode == 'dark' %}
|
|
45
|
+
{%- capture icon_system -%}
|
|
46
|
+
<i class="fa-solid fa-display" data-theme-mode="system"></i>
|
|
47
|
+
{%- endcapture -%}
|
|
48
|
+
|
|
49
|
+
{%- capture icon_light -%}
|
|
50
|
+
<i class="fa-regular fa-sun" data-theme-mode="light"></i>
|
|
51
|
+
{%- endcapture -%}
|
|
52
|
+
|
|
53
|
+
{%- capture icon_dark -%}
|
|
54
|
+
<i class="fa-regular fa-moon" data-theme-mode="dark"></i>
|
|
55
|
+
{%- endcapture -%}
|
|
56
|
+
|
|
57
|
+
<div class="btn-group dropup">
|
|
58
|
+
<button
|
|
59
|
+
type="button"
|
|
60
|
+
class="btn btn-link nav-link"
|
|
61
|
+
aria-label="Switch Mode"
|
|
62
|
+
id="mode-toggle"
|
|
63
|
+
data-bs-toggle="dropdown"
|
|
64
|
+
>
|
|
65
|
+
{{- icon_light -}}
|
|
66
|
+
{{- icon_dark -}}
|
|
67
|
+
{{- icon_system -}}
|
|
68
|
+
</button>
|
|
69
|
+
<ul class="dropdown-menu rounded-3 mb-1 p-1">
|
|
70
|
+
<li>
|
|
71
|
+
<button class="dropdown-item d-flex align-items-center" type="button" data-theme-mode="light">
|
|
72
|
+
{{- icon_light -}}
|
|
73
|
+
{{- site.data.locales[lang].theme.light -}}
|
|
74
|
+
</button>
|
|
75
|
+
</li>
|
|
76
|
+
<li>
|
|
77
|
+
<button class="dropdown-item d-flex align-items-center" type="button" data-theme-mode="dark">
|
|
78
|
+
{{- icon_dark -}}
|
|
79
|
+
{{- site.data.locales[lang].theme.dark -}}
|
|
80
|
+
</button>
|
|
81
|
+
</li>
|
|
82
|
+
<li>
|
|
83
|
+
<button class="dropdown-item d-flex align-items-center" type="button" data-theme-mode="system">
|
|
84
|
+
{{- icon_system -}}
|
|
85
|
+
{{- site.data.locales[lang].theme.system -}}
|
|
86
|
+
</button>
|
|
87
|
+
</li>
|
|
88
|
+
</ul>
|
|
89
|
+
</div>
|
|
48
90
|
|
|
49
91
|
{% if site.data.contact.size > 0 %}
|
|
50
92
|
<span class="icon-border"></span>
|
|
@@ -68,7 +110,7 @@
|
|
|
68
110
|
{%- endunless -%}
|
|
69
111
|
{%- assign email = site.social.email | split: '@' -%}
|
|
70
112
|
{%- capture url -%}
|
|
71
|
-
javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
|
|
113
|
+
javascript:void(location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@'))
|
|
72
114
|
{%- endcapture -%}
|
|
73
115
|
{% when 'rss' %}
|
|
74
116
|
{% assign url = '/feed.xml' | relative_url %}
|
data/_layouts/default.html
CHANGED
|
@@ -8,13 +8,14 @@ layout: compress
|
|
|
8
8
|
|
|
9
9
|
{% include lang.html %}
|
|
10
10
|
|
|
11
|
-
{% if site.theme_mode %}
|
|
12
|
-
{% capture prefer_mode %}data-mode="{{ site.theme_mode }}"{% endcapture %}
|
|
13
|
-
{% endif %}
|
|
14
|
-
|
|
15
11
|
<!-- `site.alt_lang` can specify a language different from the UI -->
|
|
16
|
-
<html
|
|
17
|
-
{
|
|
12
|
+
<html
|
|
13
|
+
lang="{{ page.lang | default: site.alt_lang | default: site.lang }}"
|
|
14
|
+
{%- if site.theme_mode == 'light' or site.theme_mode == 'dark' -%}
|
|
15
|
+
data-bs-theme="{{ site.theme_mode }}"
|
|
16
|
+
{%- endif -%}
|
|
17
|
+
>
|
|
18
|
+
{% include head.html lang=lang %}
|
|
18
19
|
|
|
19
20
|
<body>
|
|
20
21
|
{% include sidebar.html lang=lang %}
|
data/_layouts/post.html
CHANGED
|
@@ -113,9 +113,7 @@ script_includes:
|
|
|
113
113
|
<dialog id="toc-popup" class="p-0">
|
|
114
114
|
<div class="header d-flex flex-row align-items-center justify-content-between">
|
|
115
115
|
<div class="label text-truncate py-2 ms-4">{{- page.title -}}</div>
|
|
116
|
-
<button id="toc-popup-close" type="button" class="btn
|
|
117
|
-
<i class="fas fa-close"></i>
|
|
118
|
-
</button>
|
|
116
|
+
<button id="toc-popup-close" type="button" class="btn-close btn-sm mx-3" aria-label="Close"></button>
|
|
119
117
|
</div>
|
|
120
118
|
<div id="toc-popup-content" class="px-4 py-3 pb-4"></div>
|
|
121
119
|
</dialog>
|
|
@@ -126,16 +124,21 @@ script_includes:
|
|
|
126
124
|
</div>
|
|
127
125
|
|
|
128
126
|
<div class="post-tail-wrapper text-muted">
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
<
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
127
|
+
<div class="d-flex justify-content-between align-items-center gap-3 mb-3">
|
|
128
|
+
<!-- categories -->
|
|
129
|
+
{% if page.categories.size > 0 %}
|
|
130
|
+
<div class="post-meta">
|
|
131
|
+
<i class="far fa-folder-open fa-fw me-1"></i>
|
|
132
|
+
{% for category in page.categories %}
|
|
133
|
+
<a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a>
|
|
134
|
+
{%- unless forloop.last -%},{%- endunless -%}
|
|
135
|
+
{% endfor %}
|
|
136
|
+
</div>
|
|
137
|
+
{% endif %}
|
|
138
|
+
|
|
139
|
+
<!-- "Edit this post" link -->
|
|
140
|
+
{% include post-edit.html lang=lang %}
|
|
141
|
+
</div>
|
|
139
142
|
|
|
140
143
|
<!-- tags -->
|
|
141
144
|
{% if page.tags.size > 0 %}
|
|
@@ -28,3 +28,9 @@ $code-icon-width: 1.75rem !default;
|
|
|
28
28
|
|
|
29
29
|
$font-family-base: 'Source Sans Pro', 'Microsoft Yahei', sans-serif !default;
|
|
30
30
|
$font-family-heading: Lato, 'Microsoft Yahei', sans-serif !default;
|
|
31
|
+
|
|
32
|
+
/* Theme mode settings */
|
|
33
|
+
|
|
34
|
+
$theme-attr: 'data-bs-theme'; /* the attribute used to indicate the resolved theme */
|
|
35
|
+
$theme-options: light, dark;
|
|
36
|
+
$theme: null !default; /* set by Jekyll site configuration */
|