jekyll-theme-abd3lraouf 5.2.6 → 5.2.7
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/LICENSE +21 -21
- data/README.md +105 -105
- data/_data/assets/cross_origin.yml +62 -62
- data/_data/assets/self_host.yml +51 -51
- data/_data/authors.yml +17 -17
- data/_data/contact.yml +30 -30
- data/_data/locales/bg-BG.yml +83 -83
- data/_data/locales/en.yml +83 -83
- data/_data/locales/es-ES.yml +79 -79
- data/_data/locales/fr-FR.yml +79 -79
- data/_data/locales/hu-HU.yml +81 -81
- data/_data/locales/id-ID.yml +79 -79
- data/_data/locales/ko-KR.yml +79 -79
- data/_data/locales/my-MM.yml +79 -79
- data/_data/locales/pt-BR.yml +79 -79
- data/_data/locales/ru-RU.yml +79 -79
- data/_data/locales/tr-TR.yml +79 -79
- data/_data/locales/uk-UA.yml +79 -79
- data/_data/locales/vi-VN.yml +77 -77
- data/_data/locales/zh-CN.yml +78 -78
- data/_data/share.yml +27 -27
- data/_includes/assets-origin.html +12 -12
- data/_includes/comments/disqus.html +54 -54
- data/_includes/comments/giscus.html +56 -56
- data/_includes/comments/utterances.html +51 -51
- data/_includes/comments.html +5 -5
- data/_includes/datetime.html +21 -21
- data/_includes/favicons.html +17 -17
- data/_includes/footer.html +17 -36
- data/_includes/google-analytics.html +14 -14
- data/_includes/head.html +116 -116
- data/_includes/js-selector.html +104 -104
- data/_includes/jsdelivr-combine.html +32 -32
- data/_includes/lang.html +8 -8
- data/_includes/language-alias.html +70 -70
- data/_includes/mermaid.html +57 -57
- data/_includes/mode-toggle.html +129 -129
- data/_includes/no-linenos.html +10 -10
- data/_includes/post-nav.html +30 -30
- data/_includes/post-paginator.html +88 -88
- data/_includes/post-sharing.html +27 -27
- data/_includes/read-time.html +30 -30
- data/_includes/refactor-content.html +282 -282
- data/_includes/related-posts.html +103 -103
- data/_includes/search-loader.html +46 -46
- data/_includes/search-results.html +11 -11
- data/_includes/sidebar.html +93 -93
- data/_includes/toc.html +16 -16
- data/_includes/topbar.html +70 -70
- data/_includes/trending-tags.html +50 -50
- data/_includes/update-list.html +40 -40
- data/_layouts/archives.html +48 -48
- data/_layouts/categories.html +120 -120
- data/_layouts/category.html +24 -24
- data/_layouts/compress.html +10 -10
- data/_layouts/default.html +74 -74
- data/_layouts/home.html +103 -103
- data/_layouts/page.html +64 -64
- data/_layouts/post.html +159 -159
- data/_layouts/tag.html +23 -23
- data/_layouts/tags.html +23 -23
- data/_plugins/posts-lastmod-hook.rb +14 -14
- data/_sass/addon/commons.scss +1678 -1680
- data/_sass/addon/module.scss +151 -151
- data/_sass/addon/syntax.scss +289 -289
- data/_sass/addon/variables.scss +34 -34
- data/_sass/colors/dark-syntax.scss +88 -88
- data/_sass/colors/dark-typography.scss +157 -157
- data/_sass/colors/light-syntax.scss +84 -84
- data/_sass/colors/light-typography.scss +94 -94
- data/_sass/layout/archives.scss +147 -147
- data/_sass/layout/categories.scss +67 -67
- data/_sass/layout/category-tag.scss +73 -73
- data/_sass/layout/home.scss +184 -184
- data/_sass/layout/post.scss +369 -369
- data/_sass/layout/tags.scss +19 -19
- data/_sass/variables-hook.scss +3 -3
- data/_tabs/about.md +8 -8
- data/_tabs/archives.md +7 -7
- data/_tabs/categories.md +6 -6
- data/_tabs/tags.md +6 -6
- data/assets/404.html +16 -16
- data/assets/css/style.scss +12 -12
- data/assets/feed.xml +61 -61
- data/assets/img/favicons/browserconfig.xml +13 -13
- data/assets/img/favicons/site.webmanifest +26 -26
- data/assets/js/data/search.json +18 -18
- data/assets/js/data/swcache.js +55 -55
- data/assets/js/pwa/app.js +47 -47
- data/assets/js/pwa/sw.js +89 -89
- data/assets/js/pwa/unregister.js +12 -12
- data/assets/robots.txt +10 -10
- data/index.html +4 -4
- metadata +7 -7
data/_data/locales/vi-VN.yml
CHANGED
@@ -1,77 +1,77 @@
|
|
1
|
-
# The layout text of site
|
2
|
-
|
3
|
-
# ----- Commons label -----
|
4
|
-
|
5
|
-
layout:
|
6
|
-
post: Bài viết
|
7
|
-
category: Danh mục
|
8
|
-
tag: Thẻ
|
9
|
-
|
10
|
-
# The tabs of sidebar
|
11
|
-
tabs:
|
12
|
-
# format: <filename_without_extension>: <value>
|
13
|
-
home: Trang chủ
|
14
|
-
categories: Các danh mục
|
15
|
-
tags: Các thẻ
|
16
|
-
archives: Lưu trữ
|
17
|
-
about: Giới thiệu
|
18
|
-
|
19
|
-
# the text displayed in the search bar & search results
|
20
|
-
search:
|
21
|
-
hint: tìm kiếm
|
22
|
-
cancel: Hủy
|
23
|
-
no_results: Không có kết quả tìm kiếm.
|
24
|
-
|
25
|
-
panel:
|
26
|
-
lastmod: Mới cập nhật
|
27
|
-
trending_tags: Các thẻ thịnh hành
|
28
|
-
toc: Mục lục
|
29
|
-
|
30
|
-
copyright:
|
31
|
-
# Shown at the bottom of the post
|
32
|
-
license:
|
33
|
-
template: Bài viết này được cấp phép bởi tác giả theo giấy phép :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: Một số quyền được bảo lưu.
|
39
|
-
verbose: >-
|
40
|
-
Trừ khi có ghi chú khác, các bài viết đăng trên trang này được cấp phép bởi tác giả theo giấy phép Creative Commons Attribution 4.0 International (CC BY 4.0).
|
41
|
-
meta: Trang web này được tạo bởi :PLATFORM với chủ đề :THEME.
|
42
|
-
|
43
|
-
not_found:
|
44
|
-
statment: 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.
|
45
|
-
|
46
|
-
notification:
|
47
|
-
update_found: Đã có phiên bản mới của nội dung.
|
48
|
-
update: Cập nhật
|
49
|
-
|
50
|
-
# ----- Posts related labels -----
|
51
|
-
|
52
|
-
post:
|
53
|
-
written_by: Viết bởi
|
54
|
-
posted: Đăng lúc
|
55
|
-
updated: Cập nhật lúc
|
56
|
-
words: từ
|
57
|
-
pageview_measure: lượt xem
|
58
|
-
read_time:
|
59
|
-
unit: phút
|
60
|
-
prompt: đọc
|
61
|
-
relate_posts: Bài viết liên quan
|
62
|
-
share: Chia sẻ
|
63
|
-
button:
|
64
|
-
next: Mới hơn
|
65
|
-
previous: Cũ hơn
|
66
|
-
copy_code:
|
67
|
-
succeed: Đã sao chép!
|
68
|
-
share_link:
|
69
|
-
title: Sao chép đường dẫn
|
70
|
-
succeed: Đã sao chép đường dẫn thành công!
|
71
|
-
# pinned prompt of posts list on homepage
|
72
|
-
pin_prompt: Bài ghim
|
73
|
-
|
74
|
-
# categories page
|
75
|
-
categories:
|
76
|
-
category_measure: danh mục
|
77
|
-
post_measure: bài viết
|
1
|
+
# The layout text of site
|
2
|
+
|
3
|
+
# ----- Commons label -----
|
4
|
+
|
5
|
+
layout:
|
6
|
+
post: Bài viết
|
7
|
+
category: Danh mục
|
8
|
+
tag: Thẻ
|
9
|
+
|
10
|
+
# The tabs of sidebar
|
11
|
+
tabs:
|
12
|
+
# format: <filename_without_extension>: <value>
|
13
|
+
home: Trang chủ
|
14
|
+
categories: Các danh mục
|
15
|
+
tags: Các thẻ
|
16
|
+
archives: Lưu trữ
|
17
|
+
about: Giới thiệu
|
18
|
+
|
19
|
+
# the text displayed in the search bar & search results
|
20
|
+
search:
|
21
|
+
hint: tìm kiếm
|
22
|
+
cancel: Hủy
|
23
|
+
no_results: Không có kết quả tìm kiếm.
|
24
|
+
|
25
|
+
panel:
|
26
|
+
lastmod: Mới cập nhật
|
27
|
+
trending_tags: Các thẻ thịnh hành
|
28
|
+
toc: Mục lục
|
29
|
+
|
30
|
+
copyright:
|
31
|
+
# Shown at the bottom of the post
|
32
|
+
license:
|
33
|
+
template: Bài viết này được cấp phép bởi tác giả theo giấy phép :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: Một số quyền được bảo lưu.
|
39
|
+
verbose: >-
|
40
|
+
Trừ khi có ghi chú khác, các bài viết đăng trên trang này được cấp phép bởi tác giả theo giấy phép Creative Commons Attribution 4.0 International (CC BY 4.0).
|
41
|
+
meta: Trang web này được tạo bởi :PLATFORM với chủ đề :THEME.
|
42
|
+
|
43
|
+
not_found:
|
44
|
+
statment: 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.
|
45
|
+
|
46
|
+
notification:
|
47
|
+
update_found: Đã có phiên bản mới của nội dung.
|
48
|
+
update: Cập nhật
|
49
|
+
|
50
|
+
# ----- Posts related labels -----
|
51
|
+
|
52
|
+
post:
|
53
|
+
written_by: Viết bởi
|
54
|
+
posted: Đăng lúc
|
55
|
+
updated: Cập nhật lúc
|
56
|
+
words: từ
|
57
|
+
pageview_measure: lượt xem
|
58
|
+
read_time:
|
59
|
+
unit: phút
|
60
|
+
prompt: đọc
|
61
|
+
relate_posts: Bài viết liên quan
|
62
|
+
share: Chia sẻ
|
63
|
+
button:
|
64
|
+
next: Mới hơn
|
65
|
+
previous: Cũ hơn
|
66
|
+
copy_code:
|
67
|
+
succeed: Đã sao chép!
|
68
|
+
share_link:
|
69
|
+
title: Sao chép đường dẫn
|
70
|
+
succeed: Đã sao chép đường dẫn thành công!
|
71
|
+
# pinned prompt of posts list on homepage
|
72
|
+
pin_prompt: Bài ghim
|
73
|
+
|
74
|
+
# categories page
|
75
|
+
categories:
|
76
|
+
category_measure: danh mục
|
77
|
+
post_measure: bài viết
|
data/_data/locales/zh-CN.yml
CHANGED
@@ -1,78 +1,78 @@
|
|
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
|
-
# pinned prompt of posts list on homepage
|
73
|
-
pin_prompt: 顶置
|
74
|
-
|
75
|
-
# categories page
|
76
|
-
categories:
|
77
|
-
category_measure: 个分类
|
78
|
-
post_measure: 篇文章
|
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
|
+
# pinned prompt of posts list on homepage
|
73
|
+
pin_prompt: 顶置
|
74
|
+
|
75
|
+
# categories page
|
76
|
+
categories:
|
77
|
+
category_measure: 个分类
|
78
|
+
post_measure: 篇文章
|
data/_data/share.yml
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
# Sharing options at the bottom of the post.
|
2
|
-
# Icons from <https://fontawesome.com/>
|
3
|
-
|
4
|
-
platforms:
|
5
|
-
-
|
6
|
-
type: Twitter
|
7
|
-
icon: "fab fa-twitter"
|
8
|
-
link: "https://twitter.com/intent/tweet?text=TITLE&url=URL"
|
9
|
-
-
|
10
|
-
type: Facebook
|
11
|
-
icon: "fab fa-facebook-square"
|
12
|
-
link: "https://www.facebook.com/sharer/sharer.php?title=TITLE&u=URL"
|
13
|
-
-
|
14
|
-
type: Telegram
|
15
|
-
icon: "fab fa-telegram"
|
16
|
-
link: "https://t.me/share/url?url=URL&text=TITLE"
|
17
|
-
|
18
|
-
# Uncomment below if you need to.
|
19
|
-
# -
|
20
|
-
# type: Linkedin
|
21
|
-
# icon: "fab fa-linkedin"
|
22
|
-
# link: "https://www.linkedin.com/sharing/share-offsite/?url=URL"
|
23
|
-
#
|
24
|
-
# -
|
25
|
-
# type: Weibo
|
26
|
-
# icon: "fab fa-weibo"
|
27
|
-
# link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL"
|
1
|
+
# Sharing options at the bottom of the post.
|
2
|
+
# Icons from <https://fontawesome.com/>
|
3
|
+
|
4
|
+
platforms:
|
5
|
+
-
|
6
|
+
type: Twitter
|
7
|
+
icon: "fab fa-twitter"
|
8
|
+
link: "https://twitter.com/intent/tweet?text=TITLE&url=URL"
|
9
|
+
-
|
10
|
+
type: Facebook
|
11
|
+
icon: "fab fa-facebook-square"
|
12
|
+
link: "https://www.facebook.com/sharer/sharer.php?title=TITLE&u=URL"
|
13
|
+
-
|
14
|
+
type: Telegram
|
15
|
+
icon: "fab fa-telegram"
|
16
|
+
link: "https://t.me/share/url?url=URL&text=TITLE"
|
17
|
+
|
18
|
+
# Uncomment below if you need to.
|
19
|
+
# -
|
20
|
+
# type: Linkedin
|
21
|
+
# icon: "fab fa-linkedin"
|
22
|
+
# link: "https://www.linkedin.com/sharing/share-offsite/?url=URL"
|
23
|
+
#
|
24
|
+
# -
|
25
|
+
# type: Weibo
|
26
|
+
# icon: "fab fa-weibo"
|
27
|
+
# link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL"
|
@@ -1,12 +1,12 @@
|
|
1
|
-
{% comment %} Site static assets origin {% endcomment %}
|
2
|
-
{% assign origin = 'cross_origin' %}
|
3
|
-
|
4
|
-
{% if site.assets.self_host.enabled %}
|
5
|
-
{% if site.assets.self_host.env %}
|
6
|
-
{% if site.assets.self_host.env == jekyll.environment %}
|
7
|
-
{% assign origin = 'self_host' %}
|
8
|
-
{% endif %}
|
9
|
-
{% else %}
|
10
|
-
{% assign origin = 'self_host' %}
|
11
|
-
{% endif %}
|
12
|
-
{% endif %}
|
1
|
+
{% comment %} Site static assets origin {% endcomment %}
|
2
|
+
{% assign origin = 'cross_origin' %}
|
3
|
+
|
4
|
+
{% if site.assets.self_host.enabled %}
|
5
|
+
{% if site.assets.self_host.env %}
|
6
|
+
{% if site.assets.self_host.env == jekyll.environment %}
|
7
|
+
{% assign origin = 'self_host' %}
|
8
|
+
{% endif %}
|
9
|
+
{% else %}
|
10
|
+
{% assign origin = 'self_host' %}
|
11
|
+
{% endif %}
|
12
|
+
{% endif %}
|
@@ -1,54 +1,54 @@
|
|
1
|
-
<!--
|
2
|
-
The Disqus lazy loading.
|
3
|
-
-->
|
4
|
-
<div id="disqus_thread" class="pt-2 pb-2">
|
5
|
-
<p class="text-center text-muted small">
|
6
|
-
Comments powered by <a href="https://disqus.com/">Disqus</a>.
|
7
|
-
</p>
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<script type="text/javascript">
|
11
|
-
|
12
|
-
var disqus_config = function () {
|
13
|
-
this.page.url = '{{ page.url | absolute_url }}';
|
14
|
-
this.page.identifier = '{{ page.url }}';
|
15
|
-
};
|
16
|
-
|
17
|
-
/* Lazy loading */
|
18
|
-
|
19
|
-
var disqus_observer = new IntersectionObserver(function (entries) {
|
20
|
-
if(entries[0].isIntersecting) {
|
21
|
-
(function () {
|
22
|
-
var d = document, s = d.createElement('script');
|
23
|
-
s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
|
24
|
-
s.setAttribute('data-timestamp', +new Date());
|
25
|
-
(d.head || d.body).appendChild(s);
|
26
|
-
})();
|
27
|
-
|
28
|
-
disqus_observer.disconnect();
|
29
|
-
}
|
30
|
-
}, { threshold: [0] });
|
31
|
-
|
32
|
-
disqus_observer.observe(document.querySelector('#disqus_thread'));
|
33
|
-
|
34
|
-
/* Auto switch theme */
|
35
|
-
|
36
|
-
function reloadDisqus() {
|
37
|
-
/* Disqus hasn't been loaded */
|
38
|
-
if (typeof DISQUS === "undefined") {
|
39
|
-
return;
|
40
|
-
}
|
41
|
-
|
42
|
-
if (document.readyState == 'complete') {
|
43
|
-
DISQUS.reset({ reload: true, config: disqus_config });
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
const modeToggle = document.querySelector(".mode-toggle");
|
48
|
-
|
49
|
-
if (typeof modeToggle !== "undefined") {
|
50
|
-
/* modeToggle.addEventListener('click', reloadDisqus); // not pretty for 'color-scheme' */
|
51
|
-
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', reloadDisqus);
|
52
|
-
}
|
53
|
-
|
54
|
-
</script>
|
1
|
+
<!--
|
2
|
+
The Disqus lazy loading.
|
3
|
+
-->
|
4
|
+
<div id="disqus_thread" class="pt-2 pb-2">
|
5
|
+
<p class="text-center text-muted small">
|
6
|
+
Comments powered by <a href="https://disqus.com/">Disqus</a>.
|
7
|
+
</p>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<script type="text/javascript">
|
11
|
+
|
12
|
+
var disqus_config = function () {
|
13
|
+
this.page.url = '{{ page.url | absolute_url }}';
|
14
|
+
this.page.identifier = '{{ page.url }}';
|
15
|
+
};
|
16
|
+
|
17
|
+
/* Lazy loading */
|
18
|
+
|
19
|
+
var disqus_observer = new IntersectionObserver(function (entries) {
|
20
|
+
if(entries[0].isIntersecting) {
|
21
|
+
(function () {
|
22
|
+
var d = document, s = d.createElement('script');
|
23
|
+
s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
|
24
|
+
s.setAttribute('data-timestamp', +new Date());
|
25
|
+
(d.head || d.body).appendChild(s);
|
26
|
+
})();
|
27
|
+
|
28
|
+
disqus_observer.disconnect();
|
29
|
+
}
|
30
|
+
}, { threshold: [0] });
|
31
|
+
|
32
|
+
disqus_observer.observe(document.querySelector('#disqus_thread'));
|
33
|
+
|
34
|
+
/* Auto switch theme */
|
35
|
+
|
36
|
+
function reloadDisqus() {
|
37
|
+
/* Disqus hasn't been loaded */
|
38
|
+
if (typeof DISQUS === "undefined") {
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
|
42
|
+
if (document.readyState == 'complete') {
|
43
|
+
DISQUS.reset({ reload: true, config: disqus_config });
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
const modeToggle = document.querySelector(".mode-toggle");
|
48
|
+
|
49
|
+
if (typeof modeToggle !== "undefined") {
|
50
|
+
/* modeToggle.addEventListener('click', reloadDisqus); // not pretty for 'color-scheme' */
|
51
|
+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', reloadDisqus);
|
52
|
+
}
|
53
|
+
|
54
|
+
</script>
|
@@ -1,56 +1,56 @@
|
|
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
|
-
let initTheme = lightTheme;
|
9
|
-
|
10
|
-
if ($("html[data-mode=dark]").length > 0
|
11
|
-
|| ($("html[data-mode]").length == 0
|
12
|
-
&& window.matchMedia("(prefers-color-scheme: dark)").matches)) {
|
13
|
-
initTheme = darkTheme;
|
14
|
-
}
|
15
|
-
|
16
|
-
let giscusAttributes = {
|
17
|
-
"src": "https://giscus.app/client.js",
|
18
|
-
"data-repo": "{{ site.comments.giscus.repo}}",
|
19
|
-
"data-repo-id": "{{ site.comments.giscus.repo_id }}",
|
20
|
-
"data-category": "{{ site.comments.giscus.category }}",
|
21
|
-
"data-category-id": "{{ site.comments.giscus.category_id }}",
|
22
|
-
"data-mapping": "{{ site.comments.giscus.mapping | default: 'pathname' }}",
|
23
|
-
"data-reactions-enabled": "1",
|
24
|
-
"data-emit-metadata": "0",
|
25
|
-
"data-theme": initTheme,
|
26
|
-
"data-input-position": "{{ site.comments.giscus.input_position | default: 'bottom' }}",
|
27
|
-
"data-lang": "{{ site.comments.giscus.lang | default: lang }}",
|
28
|
-
"crossorigin": "anonymous",
|
29
|
-
"async": ""
|
30
|
-
};
|
31
|
-
|
32
|
-
let giscusScript = document.createElement("script");
|
33
|
-
Object.entries(giscusAttributes).forEach(([key, value]) => giscusScript.setAttribute(key, value));
|
34
|
-
document.getElementById("tail-wrapper").appendChild(giscusScript);
|
35
|
-
|
36
|
-
addEventListener("message", (event) => {
|
37
|
-
if (event.source === window && event.data &&
|
38
|
-
event.data.direction === ModeToggle.ID) {
|
39
|
-
/* global theme mode changed */
|
40
|
-
const mode = event.data.message;
|
41
|
-
const theme = (mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme);
|
42
|
-
|
43
|
-
const message = {
|
44
|
-
setConfig: {
|
45
|
-
theme: theme
|
46
|
-
}
|
47
|
-
};
|
48
|
-
|
49
|
-
const giscus = document.querySelector(iframe).contentWindow;
|
50
|
-
giscus.postMessage({ giscus: message }, origin);
|
51
|
-
}
|
52
|
-
|
53
|
-
});
|
54
|
-
|
55
|
-
});
|
56
|
-
</script>
|
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
|
+
let initTheme = lightTheme;
|
9
|
+
|
10
|
+
if ($("html[data-mode=dark]").length > 0
|
11
|
+
|| ($("html[data-mode]").length == 0
|
12
|
+
&& window.matchMedia("(prefers-color-scheme: dark)").matches)) {
|
13
|
+
initTheme = darkTheme;
|
14
|
+
}
|
15
|
+
|
16
|
+
let giscusAttributes = {
|
17
|
+
"src": "https://giscus.app/client.js",
|
18
|
+
"data-repo": "{{ site.comments.giscus.repo}}",
|
19
|
+
"data-repo-id": "{{ site.comments.giscus.repo_id }}",
|
20
|
+
"data-category": "{{ site.comments.giscus.category }}",
|
21
|
+
"data-category-id": "{{ site.comments.giscus.category_id }}",
|
22
|
+
"data-mapping": "{{ site.comments.giscus.mapping | default: 'pathname' }}",
|
23
|
+
"data-reactions-enabled": "1",
|
24
|
+
"data-emit-metadata": "0",
|
25
|
+
"data-theme": initTheme,
|
26
|
+
"data-input-position": "{{ site.comments.giscus.input_position | default: 'bottom' }}",
|
27
|
+
"data-lang": "{{ site.comments.giscus.lang | default: lang }}",
|
28
|
+
"crossorigin": "anonymous",
|
29
|
+
"async": ""
|
30
|
+
};
|
31
|
+
|
32
|
+
let giscusScript = document.createElement("script");
|
33
|
+
Object.entries(giscusAttributes).forEach(([key, value]) => giscusScript.setAttribute(key, value));
|
34
|
+
document.getElementById("tail-wrapper").appendChild(giscusScript);
|
35
|
+
|
36
|
+
addEventListener("message", (event) => {
|
37
|
+
if (event.source === window && event.data &&
|
38
|
+
event.data.direction === ModeToggle.ID) {
|
39
|
+
/* global theme mode changed */
|
40
|
+
const mode = event.data.message;
|
41
|
+
const theme = (mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme);
|
42
|
+
|
43
|
+
const message = {
|
44
|
+
setConfig: {
|
45
|
+
theme: theme
|
46
|
+
}
|
47
|
+
};
|
48
|
+
|
49
|
+
const giscus = document.querySelector(iframe).contentWindow;
|
50
|
+
giscus.postMessage({ giscus: message }, origin);
|
51
|
+
}
|
52
|
+
|
53
|
+
});
|
54
|
+
|
55
|
+
});
|
56
|
+
</script>
|