hexo-theme-clarity 1.0.0

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.
Files changed (71) hide show
  1. package/.travis.yml +5 -0
  2. package/LICENSE +7 -0
  3. package/README-en.md +319 -0
  4. package/README.md +343 -0
  5. package/_config.yml +180 -0
  6. package/languages/de-DE.yml +22 -0
  7. package/languages/en.yml +37 -0
  8. package/languages/es-ES.yml +22 -0
  9. package/languages/fr-FR.yml +22 -0
  10. package/languages/ko.yml +22 -0
  11. package/languages/nb-NO.yml +38 -0
  12. package/languages/ru.yml +22 -0
  13. package/languages/zh-CN.yml +38 -0
  14. package/languages/zh-TW.yml +38 -0
  15. package/layout/_partial/after_footer.pug +60 -0
  16. package/layout/_partial/comments.pug +183 -0
  17. package/layout/_partial/darkmode.pug +13 -0
  18. package/layout/_partial/footer.pug +26 -0
  19. package/layout/_partial/head.pug +61 -0
  20. package/layout/_partial/helpers.pug +21 -0
  21. package/layout/_partial/mathjax.pug +6 -0
  22. package/layout/_partial/mathjax2.pug +1 -0
  23. package/layout/_partial/paginator.pug +3 -0
  24. package/layout/_partial/post_nav.pug +6 -0
  25. package/layout/_partial/tag.pug +2 -0
  26. package/layout/_partial/totop.pug +5 -0
  27. package/layout/_partial/wordcount.pug +11 -0
  28. package/layout/_widget/category.pug +4 -0
  29. package/layout/_widget/copyright.pug +27 -0
  30. package/layout/_widget/donate.pug +19 -0
  31. package/layout/_widget/info.pug +21 -0
  32. package/layout/_widget/links.pug +6 -0
  33. package/layout/_widget/recent_comments.pug +12 -0
  34. package/layout/_widget/recent_posts.pug +4 -0
  35. package/layout/_widget/search.pug +26 -0
  36. package/layout/_widget/tag.pug +5 -0
  37. package/layout/archive.pug +24 -0
  38. package/layout/base-without-sidebar.pug +38 -0
  39. package/layout/base.pug +47 -0
  40. package/layout/blogroll.pug +21 -0
  41. package/layout/index.pug +50 -0
  42. package/layout/page.pug +12 -0
  43. package/layout/post.pug +60 -0
  44. package/layout/single-column.pug +10 -0
  45. package/layout/tagcloud.pug +23 -0
  46. package/layout/timeline.pug +28 -0
  47. package/package.json +15 -0
  48. package/source/css/copycode.scss +32 -0
  49. package/source/css/copyright.scss +43 -0
  50. package/source/css/donate.scss +308 -0
  51. package/source/css/search.scss +13 -0
  52. package/source/css/style.scss +2536 -0
  53. package/source/img/alipay.svg +1 -0
  54. package/source/img/avatar.png +0 -0
  55. package/source/img/bei.png +0 -0
  56. package/source/img/bitcoin.svg +1 -0
  57. package/source/img/github.svg +1 -0
  58. package/source/img/like.svg +1 -0
  59. package/source/img/paypal.svg +1 -0
  60. package/source/img/wechat.svg +1 -0
  61. package/source/js/codeblock-resizer.js +51 -0
  62. package/source/js/copycode.js +30 -0
  63. package/source/js/copyright.js +17 -0
  64. package/source/js/donate.js +49 -0
  65. package/source/js/fancybox.js +19 -0
  66. package/source/js/love.js +1 -0
  67. package/source/js/recent-comments.js +54 -0
  68. package/source/js/search.js +101 -0
  69. package/source/js/share.js +60 -0
  70. package/source/js/smartresize.js +32 -0
  71. package/source/js/totop.js +12 -0
@@ -0,0 +1,38 @@
1
+ reading_label: Leser artikler i %s
2
+ blog: Blogg
3
+ albums: Album
4
+ categories: Kategorier
5
+ tags: Tags
6
+ archive: Arkiv
7
+ links: Lenker
8
+ about: Om Siden
9
+ recent: Nylige
10
+ next: Neste
11
+ previous: Forrige
12
+ notitle: Uten Tittel
13
+ blogroll: Bloggroll
14
+ history: Historie
15
+ rss: RSS
16
+ guestbook: Gjestebok
17
+ home: Hjem
18
+ recent_comments: Nylige Kommentarer
19
+ Readmore: Les Mer
20
+ belongsto: Kategorisert i
21
+ contents: Innhold
22
+ shareto: Del
23
+ Discuss: Diskusjoner
24
+ Comment: Kommentarer
25
+ Hits: Treff
26
+ copyright_title_prefix: "Tittel: "
27
+ copyright_link_prefix: "Opprinnelig lenke: "
28
+ copyright_date_prefix: "Dato: "
29
+ copyright_update_prefix: "Sist oppdatert: "
30
+ copyright_author_prefix: "Forfatter: "
31
+ copyright_declare_prefix: "Erklæring om opphavsrett: "
32
+ copyright_default_text: Alle artikler på denne bloggen er lisensierte under <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/no/" rel="external nofollow" target="_blank">CC BY-NC-SA 3.0 NO</a> med mindre annet er angitt. Vennligst oppgi kilde når du reposter.
33
+ word_cnt: Ord
34
+ read_time: Minutter
35
+ copy_success_text: "Kopiert!"
36
+ no_donate: "Ingen støttealternativer!"
37
+ Copy_address_and_show_QRCode: "Kopier adressen og vis QR-koden"
38
+ Sticky: Festet
@@ -0,0 +1,22 @@
1
+ reading_label: Reading articles in %s
2
+ blog: Блог
3
+ albums: Альбомы
4
+ categories: Категории
5
+ tags: Теги
6
+ archive: Архив
7
+ links: Ссылки
8
+ about: О сайта
9
+ recent: Недавние
10
+ next: Следующая
11
+ previous: Предыдущая
12
+ notitle: Без заголовка
13
+ blogroll: Blogroll
14
+ history: История
15
+ rss: RSS
16
+ guestbook: Гостевая книга
17
+ home: Главная
18
+ recent_comments: Недавние комментарии
19
+ Readmore: Читать далее
20
+ belongsto: Определено в
21
+ contents: Содержимое
22
+ shareto: Поделиться
@@ -0,0 +1,38 @@
1
+ reading_label: 正在查看 %s 下的文章
2
+ blog: 博客
3
+ albums: 相册
4
+ categories: 分类
5
+ tags: 标签
6
+ archive: 归档
7
+ links: 友链
8
+ about: 关于
9
+ recent: 最近文章
10
+ next: 下一页
11
+ previous: 上一页
12
+ notitle: 无题
13
+ blogroll: 友情链接
14
+ history: 历史
15
+ rss: 订阅
16
+ guestbook: 留言
17
+ home: 首页
18
+ recent_comments: 最近评论
19
+ Readmore: 阅读全文
20
+ belongsto: 分类于
21
+ contents: 文章目录
22
+ shareto: 分享
23
+ Discuss: 条参与
24
+ Comment: 条评论
25
+ Hits: 阅读
26
+ copyright_title_prefix: 本文标题:
27
+ copyright_link_prefix: 原始链接:
28
+ copyright_date_prefix: 发布时间:
29
+ copyright_update_prefix: 最后更新:
30
+ copyright_author_prefix: 文章作者:
31
+ copyright_declare_prefix: 版权声明:
32
+ copyright_default_text: 本博客所有文章除特别声明外,均采用 <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/cn/" rel="external nofollow" target="_blank">CC BY-NC-SA 3.0 CN</a> 许可协议。转载请注明出处!
33
+ word_cnt: 字
34
+ read_time: 分钟
35
+ copy_success_text: "复制成功!"
36
+ no_donate: "没有开启任何 Donate 选项!"
37
+ Copy_address_and_show_QRCode: "复制地址和显示二维码!"
38
+ Sticky: 置顶
@@ -0,0 +1,38 @@
1
+ reading_label: 正在查看 %s 下的文章
2
+ blog: 部落格
3
+ albums: 相簿
4
+ categories: 分類
5
+ tags: 標籤
6
+ archive: 歸檔
7
+ links: 連結
8
+ about: 關於
9
+ recent: 最近文章
10
+ next: 下一頁
11
+ previous: 上一頁
12
+ notitle: 無標題
13
+ blogroll: 友站連結
14
+ history: 歷史
15
+ rss: 訂閱
16
+ guestbook: 留言
17
+ home: 首頁
18
+ recent_comments: 最近評論
19
+ Readmore: 閱讀全文
20
+ belongsto: 分類於
21
+ contents: 文章目錄
22
+ shareto: 分享
23
+ Discuss: 條參與
24
+ Comment: 條評論
25
+ Hits: 閱讀
26
+ copyright_title_prefix: 本文標題:
27
+ copyright_link_prefix: 原始連結:
28
+ copyright_date_prefix: 發佈時間:
29
+ copyright_update_prefix: 最後更新:
30
+ copyright_author_prefix: 文章作者:
31
+ copyright_declare_prefix: 版權聲明:
32
+ copyright_default_text: 本部落格所有的原創文章,均採用 <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="external nofollow">CC BY 4.0</a> 許可協議。
33
+ word_cnt: 字
34
+ read_time: 分鐘
35
+ copy_success_text: 複製成功!
36
+ no_donate: 沒有開啟任何 Donate 選項!
37
+ Copy_address_and_show_QRCode: 複製地址和顯示二維碼!
38
+ Sticky: 置頂
@@ -0,0 +1,60 @@
1
+ if theme.fancybox == true
2
+ script(type='text/javascript', src='https://unpkg.com/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js', async)
3
+ script(type='text/javascript', src=url_for(theme.js) + '/fancybox.js' + '?v=' + theme.version, async)
4
+ link(rel='stylesheet', type='text/css', href='https://unpkg.com/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css')
5
+
6
+ if theme.swiftype
7
+ script.
8
+ (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
9
+ (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
10
+ e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
11
+ })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');
12
+ _st('install','#{theme.swiftype}','2.0.0');
13
+
14
+ if theme.self_search == true
15
+ link(rel='stylesheet', type='text/css', href=url_for(theme.css)+'/search.css' + '?v=' + theme.version)
16
+ script(type='text/javascript', src=url_for(theme.js) + '/search.js' + '?v=' + theme.version)
17
+ script.
18
+ var search_path = '#{config.search.path}';
19
+ if (search_path.length == 0) {
20
+ search_path = 'search.xml';
21
+ }
22
+ var path = '#{config.root}' + search_path;
23
+ searchFunc(path, 'local-search-input', 'local-search-result');
24
+
25
+ if theme.canvas_nest.enable == true
26
+ - var color=theme.canvas_nest.color || "0,0,0"
27
+ - var opacity=theme.canvas_nest.opacity || "0.5"
28
+ - var zIndex=theme.canvas_nest.zIndex || "-2"
29
+ - var count=theme.canvas_nest.count || "50"
30
+ script(type='text/javascript', color=color, opacity=opacity, zIndex=zIndex, count=count, src='https://unpkg.com/canvas-nest.js@2.0.4/dist/canvas-nest.js')
31
+
32
+ if theme.love == true
33
+ script(type='text/javascript', src=url_for(theme.js) + '/love.js' + '?v=' + theme.version)
34
+
35
+ if theme.copycode == true
36
+ script(type='text/javascript', src=url_for(theme.js) + '/copycode.js' + '?v=' + theme.version, successtext=__('copy_success_text'))
37
+ link(rel='stylesheet', type='text/css', href=url_for(theme.css) + '/copycode.css' + '?v=' + theme.version)
38
+
39
+ if theme.external_css == true
40
+ link(rel='stylesheet', type='text/css', href=url_for(theme.css) + '/external.css' + '?v=' + theme.version)
41
+
42
+ if page.mathjax
43
+ include mathjax.pug
44
+
45
+ if page.mathjax2
46
+ include mathjax2.pug
47
+
48
+ script(type='text/javascript', src=url_for(theme.js) + '/codeblock-resizer.js' + '?v=' + theme.version)
49
+ script(type='text/javascript', src=url_for(theme.js) + '/smartresize.js' + '?v=' + theme.version)
50
+
51
+ script(src='https://unpkg.com/@docsearch/js@3.9.0/dist/umd/index.js')
52
+ script.
53
+ docsearch({
54
+ appId: "MWG43D7VW4",
55
+ apiKey: "c2ffcbf97637b8417ab2539c80e6d454",
56
+ indexName: "guozhenyi",
57
+ insights: true,
58
+ container: "#docsearch",
59
+ debug: false
60
+ });
@@ -0,0 +1,183 @@
1
+ if theme.disqus.enable == true
2
+ link(rel='stylesheet', type='text/css', href='https://unpkg.com/disqusjs@1.3.0/dist/disqusjs.css')
3
+ script(type='text/javascript', src='https://unpkg.com/disqusjs@1.3.0/dist/disqus.js')
4
+ script(type='text/javascript', id='disqus-count-script').
5
+ $(function() {
6
+ var xhr = new XMLHttpRequest();
7
+ xhr.open('GET', '//disqus.com/next/config.json', true);
8
+ xhr.timeout = 2500;
9
+ xhr.onreadystatechange = function () {
10
+ if (xhr.readyState === 4 && xhr.status === 200) {
11
+ $('.post-meta .post-comments-count').show();
12
+ var s = document.createElement('script');
13
+ s.id = 'dsq-count-scr';
14
+ s.src = 'https://#{theme.disqus.shortname}.disqus.com/count.js';
15
+ s.async = true;
16
+ (document.head || document.body).appendChild(s);
17
+ }
18
+ };
19
+ xhr.ontimeout = function () { xhr.abort(); };
20
+ xhr.send(null);
21
+ });
22
+ #disqus_thread.comments
23
+ script(type='text/javascript').
24
+ // Load comments with DisqusJS
25
+ function loadComments() {
26
+ window.dsqjs = new DisqusJS({
27
+ shortname: '#{theme.disqus.shortname}',
28
+ siteName: '#{config.title.replace("\'","\\\'")}',
29
+ identifier: '#{page.path}',
30
+ url: '#{config.url}/#{page.path}',
31
+ title: '#{page.title}',
32
+ api: '#{theme.disqus.api}',
33
+ apikey: '#{theme.disqus.apikey}',
34
+ admin: '#{theme.disqus.admin}',
35
+ adminLabel: '#{theme.disqus.admin_label}'
36
+ });
37
+ }
38
+ // Lazy load {# Credit: https://github.com/theme-next/hexo-theme-next/blob/master/layout/_third-party/comments/disqus.swig #}
39
+ (function () {
40
+ var offsetTop = document.getElementById('disqus_thread').offsetTop - window.innerHeight;
41
+ if (offsetTop <= 0) {
42
+ // Load directly when there's no scrollbar
43
+ window.addEventListener('load', loadComments, false);
44
+ } else {
45
+ var disqusScroll = function () {
46
+ // offsetTop may changes because of manually resizing browser window or lazy loading images
47
+ var offsetTop = document.getElementById('disqus_thread').offsetTop - window.innerHeight;
48
+ var scrollTop = window.scrollY;
49
+
50
+ // Pre-load comments a bit? (margin or anything else)
51
+ if (offsetTop - scrollTop < 60) {
52
+ window.removeEventListener('scroll', disqusScroll);
53
+ loadComments();
54
+ }
55
+ };
56
+ window.addEventListener('scroll', disqusScroll);
57
+ }
58
+ })();
59
+ // Scroll to comments automatically if #comment-xxx anchor specified
60
+ window.addEventListener('load', function () {
61
+ // I don't know why, it just works.
62
+ window.setTimeout(function () {
63
+ if (location.hash.indexOf('#comment-') !== -1) {
64
+ document.getElementById('disqus_thread').scrollIntoView(true);
65
+ }
66
+ }, 100);
67
+ }, false);
68
+
69
+ if theme.uyan
70
+ #uyan_frame
71
+ script(type='text/javascript', src='//v2.uyan.cc/code/uyan.js?uid=' + theme.uyan)
72
+
73
+ if theme.changyan
74
+ #SOHUCS(sid=page.date.valueOf())
75
+ script.
76
+ (function(){var appid='#{theme.changyan}';var conf='#{theme.changyan_conf}';var width=window.innerWidth||document.documentElement.clientWidth;if(width<960){window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id='+appid+'&conf='+conf+'"><\/script>')}else{var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("https://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})})}})()
77
+
78
+ if theme.livere
79
+ #lv-container(data-id='city', data-uid=theme.livere)
80
+ script.
81
+ (function(d, s) {
82
+ var j, e = d.getElementsByTagName(s)[0];
83
+ if (typeof LivereTower === 'function') { return; }
84
+ j = d.createElement(s);
85
+ j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
86
+ j.async = true;
87
+ e.parentNode.insertBefore(j, e);
88
+ })(document, 'script');
89
+
90
+ if theme.gitalk.enable == true
91
+ #container
92
+ link(rel='stylesheet', type='text/css', href='https://unpkg.com/gitalk@1.8.0/dist/gitalk.css')
93
+ script(type='text/javascript', src='https://unpkg.com/blueimp-md5@2.19.0/js/md5.min.js')
94
+ script(type='text/javascript', src='https://unpkg.com/gitalk@1.8.0/dist/gitalk.min.js')
95
+ script.
96
+ var gitalk = new Gitalk({
97
+ clientID: '#{theme.gitalk.client_id}',
98
+ clientSecret: '#{theme.gitalk.client_secret}',
99
+ repo: '#{theme.gitalk.repo}',
100
+ owner: '#{theme.gitalk.owner}',
101
+ admin: ['#{theme.gitalk.admin}'],
102
+ id: md5(location.pathname),
103
+ distractionFreeMode: false
104
+ })
105
+ gitalk.render('container')
106
+
107
+ if theme.valine.enable == true
108
+ #vcomment.nofancybox
109
+ script(src='https://unpkg.com/valine@1.5.3/dist/Valine.min.js')
110
+ script.
111
+ var notify = '#{ theme.valine.notify }' == 'true' ? true : false;
112
+ var verify = '#{ theme.valine.verify }' == 'true' ? true : false;
113
+ var GUEST_INFO = ['nick','mail','link'];
114
+ var guest_info = '#{ theme.valine.guest_info }'.split(',').filter(function(item){
115
+ return GUEST_INFO.indexOf(item) > -1
116
+ });
117
+ guest_info = guest_info.length == 0 ? GUEST_INFO :guest_info;
118
+ window.valine = new Valine({
119
+ el:'#vcomment',
120
+ notify:notify,
121
+ verify:verify,
122
+ appId:'#{theme.valine.appid}',
123
+ appKey:'#{theme.valine.appkey}',
124
+ serverURLs:'#{theme.valine.serverURLs}',
125
+ placeholder:'#{theme.valine.placeholder}',
126
+ avatar:'#{theme.valine.avatar}',
127
+ guest_info:guest_info,
128
+ pageSize:'#{theme.valine.pageSize}'
129
+ })
130
+
131
+ if theme.minivaline.enable == true
132
+ #minivaline-container.nofancybox
133
+ script(src='https://unpkg.com/minivaline@6.1.0/dist/MiniValine.min.js')
134
+ script.
135
+ new MiniValine({
136
+ el: '#minivaline-container',
137
+ appId: '#{theme.minivaline.appId}',
138
+ appKey: '#{theme.minivaline.appKey}',
139
+ placeholder: '#{theme.minivaline.placeholder}',
140
+ lang: '#{theme.minivaline.lang}',
141
+ adminEmailMd5: '#{theme.minivaline.adminEmailMd5}',
142
+ math: #{theme.minivaline.math},
143
+ md: #{theme.minivaline.md}
144
+ })
145
+
146
+ if theme.waline.enable == true
147
+ #waline.nofancybox
148
+ link(rel='stylesheet', type='text/css', href='https://unpkg.com/@waline/client@3.5.5/dist/waline.css')
149
+ script(type='module').
150
+ import {init} from 'https://unpkg.com/@waline/client@3.5.5/dist/waline.js';
151
+ init({
152
+ el: '#waline',
153
+ comment: true,
154
+ serverURL: '#{theme.waline.serverURL}',
155
+ pageSize: '#{theme.waline.pageSize}',
156
+ wordLimit: '#{theme.waline.wordLimit}',
157
+ requiredMeta,
158
+ locale: !{JSON.stringify(theme.waline.locale || {})},
159
+ emoji: [
160
+ 'https://unpkg.com/@waline/emojis@1.3.0/weibo',
161
+ 'https://unpkg.com/@waline/emojis@1.3.0/qq',
162
+ 'https://unpkg.com/@waline/emojis@1.3.0/tw-emoji',
163
+ ],
164
+ });
165
+ script.
166
+ let metaInfo = ['nick', 'mail', 'link']
167
+ let requiredMeta = '#{theme.waline.requiredMeta}'.split(',').filter(item => {
168
+ return metaInfo.indexOf(item) > -1
169
+ })
170
+
171
+ if theme.utterances.enable == true
172
+ script(src='https://utteranc.es/client.js', repo=theme.utterances.repo, issue-term=theme.utterances.identifier, theme=theme.utterances.theme, crossorigin='anonymous', async)
173
+
174
+ if theme.twikoo.enable == true
175
+ #tcomment
176
+ script(src='https://unpkg.com/twikoo@1.6.41/dist/twikoo.all.min.js')
177
+ script.
178
+ twikoo.init({
179
+ envId: '#{theme.twikoo.envId}',
180
+ el: '#tcomment',
181
+ region: '#{theme.twikoo.region}',
182
+ path: '#{theme.twikoo.path}'
183
+ })
@@ -0,0 +1,13 @@
1
+ .darkmode-toggle 🌓
2
+
3
+ script.
4
+ var prefersDarkMode = window.matchMedia('(prefers-color-scheme: dark)');
5
+ var toggle = document.querySelector('.darkmode-toggle');
6
+ var html = document.querySelector('html');
7
+
8
+ html.dataset.dark = localStorage.dark || prefersDarkMode.matches;
9
+
10
+ toggle.addEventListener('click', () => {
11
+ localStorage.dark = !(html.dataset.dark == 'true');
12
+ html.dataset.dark = localStorage.dark;
13
+ });
@@ -0,0 +1,26 @@
1
+ footer#footer
2
+ span(style={'margin-right': '10px'})= '© ' + date(Date.now(), 'YYYY') + ' '
3
+ a(href=url_for('.'), rel='nofollow')= config.title
4
+
5
+ if theme.icp && theme.bei
6
+ <br>
7
+
8
+ if theme.icp
9
+ a(rel='nofollow', target='_blank', href='https://beian.miit.gov.cn/')= theme.icp
10
+
11
+ if theme.bei
12
+ span(style='margin-left: 20px;')
13
+ img(src='/img/bei.png', style='width: 16px; vertical-align: text-bottom; object-fit: contain;')
14
+ a(rel='noreferrer', target='_blank', href='https://beian.mps.gov.cn/')= theme.bei
15
+
16
+ <br>
17
+
18
+ div.github-badge
19
+ a(rel='nofollow', target='_blank', href='https://hexo.io')
20
+ span.badge-subject Powered by
21
+ span.badge-value.bg-blue Hexo
22
+
23
+ div.github-badge(style='margin-left: 5px')
24
+ a(rel='nofollow', target='_blank', href='https://github.com/guozhenyi/hexo-theme-clarity')
25
+ span.badge-subject Theme
26
+ span.badge-value.bg-green Clarity
@@ -0,0 +1,61 @@
1
+ head
2
+ meta(charset='utf-8')
3
+ meta(name='viewport', content='width=device-width, initial-scale=1')
4
+ meta(name='mobile-web-app-capable', content='yes')
5
+ meta(name='apple-mobile-web-app-status-bar-style', content='black-translucent')
6
+ meta(name='format-detection', content='telephone=no')
7
+ meta(name='description', content=config.description)
8
+ if is_post()
9
+ meta(name='date', content=page.date.format('YYYY-MM-DDTHH:mm:ssZ'))
10
+ meta(name='last-modified', content=page.updated.format('YYYY-MM-DDTHH:mm:ssZ'))
11
+ //- Open Graph 协议
12
+ != open_graph()
13
+ link(rel='canonical', href=page.permalink)
14
+ block title
15
+ link(rel='icon', mask='',sizes='any', href=url_for('favicon.ico'))
16
+ link(rel='Shortcut Icon', type='image/x-icon', href=url_for('favicon.ico'))
17
+ link(rel='apple-touch-icon', href=url_for('apple-touch-icon.png'))
18
+ link(rel='apple-touch-icon-precomposed', href=url_for('apple-touch-icon.png'))
19
+ link(rel="preload", href="https://unpkg.com/font-awesome@4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0", as="font", type="font/woff2", crossorigin="anonymous")
20
+ link(rel='stylesheet', type='text/css', href=url_for(theme.css) + '/style.css' + '?v=' + theme.version)
21
+ //- link(rel='stylesheet', type='text/css', href='https://unpkg.com/normalize.css@8.0.1/normalize.css')
22
+ link(rel='stylesheet', type='text/css', href='https://unpkg.com/purecss@3.0.0/build/pure-min.css')
23
+ link(rel='stylesheet', type='text/css', href='https://unpkg.com/purecss@3.0.0/build/grids-responsive-min.css')
24
+ link(rel='stylesheet', href='https://unpkg.com/font-awesome@4.7.0/css/font-awesome.min.css')
25
+ link(rel='stylesheet', href='https://unpkg.com/@docsearch/css@3.9.0/dist/style.css')
26
+ script(type='text/javascript', src='https://unpkg.com/jquery@3.7.1/dist/jquery.min.js')
27
+ if config.feed
28
+ link(rel='alternate', type=feed_type, href=url_for(config.feed.path))
29
+ if theme.google_analytics
30
+ script(src='https://www.googletagmanager.com/gtag/js?id=' + theme.google_analytics, async)
31
+ script.
32
+ window.dataLayer = window.dataLayer || [];
33
+ function gtag(){dataLayer.push(arguments);}
34
+ gtag('js', new Date());
35
+ gtag('config', '#{theme.google_analytics}');
36
+
37
+ if theme.baidu_analytics
38
+ script.
39
+ var _hmt = _hmt || [];
40
+ (function() {
41
+ var hm = document.createElement('script');
42
+ hm.src = 'https://hm.baidu.com/hm.js?' + '#{theme.baidu_analytics}';
43
+ var s = document.getElementsByTagName("script")[0];
44
+ s.parentNode.insertBefore(hm, s);
45
+ })();
46
+ if theme.microsoft_clarity
47
+ script.
48
+ (function(c,l,a,r,i,t,y){
49
+ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
50
+ t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
51
+ y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
52
+ })(window, document, "clarity", "script", "#{theme.microsoft_clarity}");
53
+
54
+ if !(theme.copycode == false && (theme.donate.enable == false && page.donate != true) && theme.post_copyright.enable == false)
55
+ script(type='text/javascript', src='https://unpkg.com/clipboard@2.0.11/dist/clipboard.min.js')
56
+ script(type='text/javascript', src='https://unpkg.com/toastr@2.1.4/build/toastr.min.js')
57
+ link(rel='stylesheet', href='https://unpkg.com/toastr@2.1.4/build/toastr.min.css')
58
+
59
+ if theme.dark == true
60
+ include darkmode.pug
61
+
@@ -0,0 +1,21 @@
1
+ mixin a_with_current(href, content, id)
2
+ - var url = url_for(href)
3
+ if (href == '.' && (is_home() || is_post())) || is_current(href)
4
+ a.current(href=url)
5
+ i(class='fa' + ' ' + id)= ' ' + content
6
+ else if (href == 'archives/' && is_tag())
7
+ a.current(href=url)
8
+ i(class='fa' + ' ' + id)= ' ' + content
9
+ else if (href == 'archives/' && is_category())
10
+ a.current(href=url)
11
+ i(class='fa' + ' ' + id)= ' ' + content
12
+ else
13
+ a(href=url)
14
+ i(class='fa' + ' ' + id)= ' ' + content
15
+
16
+ mixin title(page)
17
+ if page
18
+ if page.title
19
+ = page.title
20
+ else
21
+ = _p('no-title')
@@ -0,0 +1,6 @@
1
+ script(type='text/x-mathjax-config').
2
+ MathJax.Hub.Config({
3
+ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
4
+ });
5
+
6
+ script(type='text/javascript', src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML', async)
@@ -0,0 +1 @@
1
+ script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML', async)
@@ -0,0 +1,3 @@
1
+ if page.next || page.prev
2
+ nav.page-navigator
3
+ != paginator({prev_text: __('previous'), next_text: __('next')})
@@ -0,0 +1,6 @@
1
+ if page.next || page.prev
2
+ .post-nav
3
+ if page.prev
4
+ a.pre(href=url_for(page.prev_link ? page.prev_link : page.prev.path))= page.prev.title
5
+ if page.next
6
+ a.next(href=url_for(page.next_link ? page.next_link : page.next.path))= page.next.title
@@ -0,0 +1,2 @@
1
+ if page.tags
2
+ .tags!= list_tags(page.tags,{show_count:false, class:"article-tag"})
@@ -0,0 +1,5 @@
1
+ a#rocket.show(href='#top')
2
+
3
+ script(type='text/javascript', src=url_for(theme.js) + '/totop.js' + '?v=' + theme.version, async)
4
+
5
+
@@ -0,0 +1,11 @@
1
+ span.post-time
2
+ span.post-meta-item-text= ' | '
3
+ span.post-meta-item-icon
4
+ i.fa.fa-keyboard-o
5
+ span.post-count= ' '+wordcount(page.content)
6
+ span.post-meta-item-text= " "+__('word_cnt')
7
+ span.post-time= ' | '
8
+ span.post-meta-item-icon
9
+ i.fa.fa-clock-o
10
+ span.post-count= ' '+min2read(page.content)
11
+ span.post-meta-item-text= ' '+__('read_time')
@@ -0,0 +1,4 @@
1
+ .widget
2
+ .widget-title
3
+ i.fa.fa-folder-o= ' ' + __('categories')
4
+ != list_categories({show_count: theme.show_category_count})
@@ -0,0 +1,27 @@
1
+ .post-copyright
2
+ script(type='text/javascript', src=url_for(theme.js) + '/copyright.js' + '?v=' + theme.version, successtext=__('copy_success_text'))
3
+ link(rel='stylesheet', type='text/css', href=url_for(theme.css) + '/copyright.css' + '?v=' + theme.version)
4
+ p
5
+ span= __('copyright_title_prefix')
6
+ = page.title
7
+ p
8
+ span= __('copyright_author_prefix')
9
+ = theme.post_copyright.author
10
+ p
11
+ span= __('copyright_date_prefix')
12
+ = page.date.format(config.date_format)
13
+ p
14
+ span= __('copyright_update_prefix')
15
+ = page.updated.format(config.date_format)
16
+ p
17
+ span= __('copyright_link_prefix')
18
+ a(href='/' + page.path)= page.permalink
19
+ span.copy-path
20
+ i.fa.fa-clipboard(data-clipboard-text=page.permalink)
21
+ p
22
+ span= __('copyright_declare_prefix')
23
+ if theme.post_copyright.copyright_text
24
+ != theme.post_copyright.copyright_text
25
+ else
26
+ != __('copyright_default_text')
27
+ br
@@ -0,0 +1,19 @@
1
+ #donate
2
+ link(rel='stylesheet', type='text/css', href=url_for(theme.css) + '/donate.css' + '?v=' + theme.version)
3
+ script(type='text/javascript', src=url_for(theme.js) + '/donate.js' + '?v=' + theme.version, successtext=__('copy_success_text'))
4
+ a#github.pos-f.tr3(href=theme.donate.github||'https://github.com/Kaiyuan/donate-page', target='_blank', title='Github')
5
+ #DonateText= 'Donate'
6
+ ul#donateBox.list.pos-f
7
+ if theme.donate.paypal_url!=null
8
+ li#PayPal
9
+ a(href=theme.donate.paypal_url, target='_blank')
10
+ if theme.donate.btc_qr!=null && theme.donate.btc_key!=null
11
+ li#BTC(data-clipboard-text=theme.donate.btc_key, data-footnote=__('Copy_address_and_show_QRCode'), qr=theme.donate.btc_qr)
12
+ if theme.donate.alipay_qr != null
13
+ li#AliPay(qr=theme.donate.alipay_qr)
14
+ if theme.donate.wechat_qr != null
15
+ li#WeChat(qr=theme.donate.wechat_qr)
16
+ if !(theme.donate.wechat_qr != null||theme.donate.alipay_qr != null || (theme.donate.btc_qr!=null && theme.donate.btc_key!=null)||theme.donate.paypal_url!=null)
17
+ li#ps= __('no_donate')
18
+ #QRBox.pos-f.left-100
19
+ #MainBox
@@ -0,0 +1,21 @@
1
+ .widget
2
+ .author-info
3
+ a.info-avatar(href='/about/', title= __('about'))
4
+ img.nofancybox(src=theme.info.avatar)
5
+ .info-description #{theme.info.discription}
6
+ .site-info
7
+ .site-info__item
8
+ a(href='/archives/')
9
+ div.item__label 文章
10
+ div.item__value= site.posts.length
11
+ .site-info__item
12
+ div.item__label 标签
13
+ div.item__value= site.tags.length
14
+ .site-info__item
15
+ div.item__label 分类
16
+ div.item__value= site.categories.length
17
+ .social-info
18
+ - for (var item of theme.info.outlinkitem)
19
+ - var styled= item.color ? {color: item.color} : undefined
20
+ a.info-icon(href=item.outlink, title=item.message, target='_blank', style=styled)
21
+ i.fa(class='fa-' + item.name)
@@ -0,0 +1,6 @@
1
+ .widget
2
+ .widget-title
3
+ i.fa.fa-external-link= ' ' + __('blogroll')
4
+ - for (var i in theme.links)
5
+ ul
6
+ a(href=theme.links[i].url, title=theme.links[i].title, target='_blank') #{theme.links[i].title}
@@ -0,0 +1,12 @@
1
+ if theme.disqus.enable == true
2
+ .widget
3
+ .widget-title
4
+ i.fa.fa-comment-o= ' ' + __('recent_comments')
5
+ script(type='text/javascript', src='//' + theme.disqus.shortname + '.disqus.com/recent_comments_widget.js?num_items=5&hide_avatars=1&avatar_size=32&excerpt_length=20&hide_mods=1')
6
+
7
+ if theme.waline.enable == true
8
+ .widget
9
+ .widget-title
10
+ i.fa.fa-comment-o= ' ' + __('recent_comments')
11
+ #widget-waline-list
12
+ script(type='text/javascript', id="recent-comment", serverURL=theme.waline.serverURL, count=theme.waline.count , src=url_for(theme.js) + '/recent-comments.js' + '?v=' + theme.version, async)