hexo-theme-shokax 0.0.1-alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE-shoka +21 -0
  3. package/README.md +47 -0
  4. package/_config.yml +353 -0
  5. package/_images.yml +99 -0
  6. package/languages/README.md +19 -0
  7. package/languages/default.yml +1 -0
  8. package/languages/en.yml +151 -0
  9. package/languages/ja.yml +146 -0
  10. package/languages/zh-CN.yml +154 -0
  11. package/languages/zh-HK.yml +146 -0
  12. package/languages/zh-TW.yml +146 -0
  13. package/layout/_alternate/atom.ejs +30 -0
  14. package/layout/_alternate/json.ejs +16 -0
  15. package/layout/_alternate/rss.ejs +34 -0
  16. package/layout/_mixin/breadcrumb.pug +33 -0
  17. package/layout/_mixin/card.pug +37 -0
  18. package/layout/_mixin/comment.pug +10 -0
  19. package/layout/_mixin/postmeta.pug +30 -0
  20. package/layout/_mixin/segment.pug +32 -0
  21. package/layout/_mixin/sidebar.pug +36 -0
  22. package/layout/_mixin/widgets.pug +29 -0
  23. package/layout/_partials/footer.pug +61 -0
  24. package/layout/_partials/head/head.pug +54 -0
  25. package/layout/_partials/head/head_com.pug +17 -0
  26. package/layout/_partials/head/pwa.pug +17 -0
  27. package/layout/_partials/header.pug +19 -0
  28. package/layout/_partials/layout.pug +143 -0
  29. package/layout/_partials/loading.pug +13 -0
  30. package/layout/_partials/pagination.pug +4 -0
  31. package/layout/_partials/post/copyright.pug +20 -0
  32. package/layout/_partials/post/footer.pug +13 -0
  33. package/layout/_partials/post/nav.pug +13 -0
  34. package/layout/_partials/post/post.pug +26 -0
  35. package/layout/_partials/post/reward.pug +18 -0
  36. package/layout/_partials/sidebar/menu.pug +37 -0
  37. package/layout/_partials/sidebar/overview.pug +40 -0
  38. package/layout/_partials/third-party/baidu-analytics.pug +11 -0
  39. package/layout/_partials/third-party/clarity.pug +8 -0
  40. package/layout/_partials/third-party/qweather.pug +35 -0
  41. package/layout/archive.pug +31 -0
  42. package/layout/category.pug +66 -0
  43. package/layout/index.pug +33 -0
  44. package/layout/page.pug +56 -0
  45. package/layout/post.pug +35 -0
  46. package/layout/tag.pug +43 -0
  47. package/package.json +35 -0
  48. package/scripts/filters/locals.js +57 -0
  49. package/scripts/filters/post.js +23 -0
  50. package/scripts/generaters/archive.js +141 -0
  51. package/scripts/generaters/config.js +43 -0
  52. package/scripts/generaters/images.js +26 -0
  53. package/scripts/generaters/index.js +110 -0
  54. package/scripts/generaters/pages.js +19 -0
  55. package/scripts/generaters/script.js +81 -0
  56. package/scripts/helpers/asset.js +237 -0
  57. package/scripts/helpers/engine.js +183 -0
  58. package/scripts/helpers/list_categories.js +140 -0
  59. package/scripts/helpers/symbols_count_time.js +76 -0
  60. package/scripts/tags/links.js +86 -0
  61. package/scripts/tags/media.js +19 -0
  62. package/source/assets/404.png +0 -0
  63. package/source/assets/algolia_logo.svg +9 -0
  64. package/source/assets/apple-touch-icon.png +0 -0
  65. package/source/assets/beian.webp +0 -0
  66. package/source/assets/failure.ico +0 -0
  67. package/source/assets/favicon.ico +0 -0
  68. package/source/assets/logo.svg +16 -0
  69. package/source/assets/play_disc.png +0 -0
  70. package/source/assets/play_needle.png +0 -0
  71. package/source/assets/search.png +0 -0
  72. package/source/css/_colors.styl +207 -0
  73. package/source/css/_common/components/components.styl +6 -0
  74. package/source/css/_common/components/highlight/highlight.styl +353 -0
  75. package/source/css/_common/components/highlight/operation.styl +21 -0
  76. package/source/css/_common/components/pages/collapse.styl +119 -0
  77. package/source/css/_common/components/pages/home.styl +385 -0
  78. package/source/css/_common/components/pages/pages.styl +56 -0
  79. package/source/css/_common/components/pages/tag-cloud.styl +12 -0
  80. package/source/css/_common/components/post/breadcrumb.styl +39 -0
  81. package/source/css/_common/components/post/copyright.styl +41 -0
  82. package/source/css/_common/components/post/expand.styl +264 -0
  83. package/source/css/_common/components/post/footer.styl +11 -0
  84. package/source/css/_common/components/post/header.styl +79 -0
  85. package/source/css/_common/components/post/nav.styl +63 -0
  86. package/source/css/_common/components/post/post.styl +29 -0
  87. package/source/css/_common/components/post/reward.styl +50 -0
  88. package/source/css/_common/components/post/rtl.styl +12 -0
  89. package/source/css/_common/components/post/tags.styl +39 -0
  90. package/source/css/_common/components/tags/collapse.styl +72 -0
  91. package/source/css/_common/components/tags/container.styl +49 -0
  92. package/source/css/_common/components/tags/label.styl +12 -0
  93. package/source/css/_common/components/tags/links.styl +77 -0
  94. package/source/css/_common/components/tags/list.styl +131 -0
  95. package/source/css/_common/components/tags/note.styl +70 -0
  96. package/source/css/_common/components/tags/player.styl +361 -0
  97. package/source/css/_common/components/tags/quiz.styl +200 -0
  98. package/source/css/_common/components/tags/tabs.styl +83 -0
  99. package/source/css/_common/components/tags/tags.styl +9 -0
  100. package/source/css/_common/components/third-party/loading.styl +222 -0
  101. package/source/css/_common/components/third-party/mermaid/class.styl +90 -0
  102. package/source/css/_common/components/third-party/mermaid/flowchart.styl +72 -0
  103. package/source/css/_common/components/third-party/mermaid/gantt.styl +251 -0
  104. package/source/css/_common/components/third-party/mermaid/git.styl +7 -0
  105. package/source/css/_common/components/third-party/mermaid/mermaid.styl +37 -0
  106. package/source/css/_common/components/third-party/mermaid/pie.styl +9 -0
  107. package/source/css/_common/components/third-party/mermaid/sequence.styl +95 -0
  108. package/source/css/_common/components/third-party/mermaid/state.styl +130 -0
  109. package/source/css/_common/components/third-party/pace.styl +18 -0
  110. package/source/css/_common/components/third-party/search.styl +167 -0
  111. package/source/css/_common/components/third-party/theme.styl +151 -0
  112. package/source/css/_common/components/third-party/third-party.styl +22 -0
  113. package/source/css/_common/components/third-party/valine.styl +548 -0
  114. package/source/css/_common/components/third-party/widgets.styl +57 -0
  115. package/source/css/_common/outline/footer/footer.styl +69 -0
  116. package/source/css/_common/outline/header/brand.styl +77 -0
  117. package/source/css/_common/outline/header/header.styl +20 -0
  118. package/source/css/_common/outline/header/image.styl +79 -0
  119. package/source/css/_common/outline/header/menu.styl +117 -0
  120. package/source/css/_common/outline/header/nav.styl +81 -0
  121. package/source/css/_common/outline/header/right.styl +15 -0
  122. package/source/css/_common/outline/header/tool.styl +207 -0
  123. package/source/css/_common/outline/header/waves.styl +50 -0
  124. package/source/css/_common/outline/mobile.styl +46 -0
  125. package/source/css/_common/outline/outline.styl +78 -0
  126. package/source/css/_common/outline/sidebar/author.styl +59 -0
  127. package/source/css/_common/outline/sidebar/dimmer.styl +23 -0
  128. package/source/css/_common/outline/sidebar/menu.styl +63 -0
  129. package/source/css/_common/outline/sidebar/quick.styl +43 -0
  130. package/source/css/_common/outline/sidebar/related.styl +56 -0
  131. package/source/css/_common/outline/sidebar/sidebar.styl +75 -0
  132. package/source/css/_common/outline/sidebar/social.styl +69 -0
  133. package/source/css/_common/outline/sidebar/state.styl +37 -0
  134. package/source/css/_common/outline/sidebar/tab.styl +71 -0
  135. package/source/css/_common/outline/sidebar/toc.styl +47 -0
  136. package/source/css/_common/scaffolding/animate.styl +318 -0
  137. package/source/css/_common/scaffolding/base.styl +172 -0
  138. package/source/css/_common/scaffolding/buttons.styl +48 -0
  139. package/source/css/_common/scaffolding/divider.styl +36 -0
  140. package/source/css/_common/scaffolding/iconfont.styl +443 -0
  141. package/source/css/_common/scaffolding/normalize.styl +289 -0
  142. package/source/css/_common/scaffolding/pagination.styl +81 -0
  143. package/source/css/_common/scaffolding/ribbon.styl +38 -0
  144. package/source/css/_common/scaffolding/scaffolding.styl +14 -0
  145. package/source/css/_common/scaffolding/scrollbar.styl +37 -0
  146. package/source/css/_common/scaffolding/tables.styl +50 -0
  147. package/source/css/_common/scaffolding/tip.styl +19 -0
  148. package/source/css/_common/scaffolding/toggles.styl +59 -0
  149. package/source/css/_iconfont.styl +451 -0
  150. package/source/css/_mixins.styl +146 -0
  151. package/source/css/_variables.styl +89 -0
  152. package/source/css/app.styl +27 -0
  153. package/source/css/comment.styl +5 -0
  154. package/source/css/mermaid.styl +5 -0
  155. package/source/css/plugin.styl +174 -0
  156. package/source/css/twikoo.css +2002 -0
  157. package/source/js/_app/components.js +330 -0
  158. package/source/js/_app/global.js +317 -0
  159. package/source/js/_app/library.js +302 -0
  160. package/source/js/_app/page.js +623 -0
  161. package/source/js/_app/player.js +748 -0
  162. package/source/js/_app/vue.js +43 -0
@@ -0,0 +1,143 @@
1
+ include ../_mixin/breadcrumb.pug
2
+ include ../_mixin/sidebar.pug
3
+ include ../_mixin/widgets.pug
4
+
5
+ doctype html
6
+ html(lang=page.language?page.language:config.language, style=theme.grayMode ? 'filter: grayscale(1);':'' )
7
+ head
8
+ != partial('_partials/head/head.pug', {}, {cache: true})
9
+ != partial('_partials/head/head_com.pug')
10
+ title
11
+ block title
12
+ != `${alternate?alternate + " = ":""}${title}${subtitle?" = "+subtitle:""}`
13
+ body(itemscope itemtype="http://schema.org/WebPage")
14
+ != partial('_partials/loading.pug', {}, {cache: true})
15
+ div(id="container")
16
+ header(id="header" itemscope itemtype="http://schema.org/WPHeader")
17
+ div(class="inner")
18
+ div(id="brand")
19
+ div(class="pjax")
20
+ block header
21
+ a(href=config.root class="logo" rel="start")
22
+ if alternate
23
+ p(class="artboard")
24
+ != alternate
25
+ h1(itemprop="name headline" class="title")
26
+ != title
27
+ if subtitle
28
+ p(class="meta" itemprop="description")
29
+ != `= ${subtitle} =`
30
+
31
+ != partial('_partials/header.pug', {}, {cache: true})
32
+ div(id="imgs" class="pjax")
33
+ - var covers = _cover(page, 6)
34
+ if covers.length === 6
35
+ ul
36
+ each image in covers
37
+ li(class="item" data-background-image=image)
38
+ else
39
+ img(src=covers)
40
+ div(id="waves")
41
+ svg(class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto")
42
+ defs
43
+ path(id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z")
44
+ g(class="parallax")
45
+ use(xlink:href="#gentle-wave" x="48" y="0")
46
+ use(xlink:href="#gentle-wave" x="48" y="3")
47
+ use(xlink:href="#gentle-wave" x="48" y="5")
48
+ use(xlink:href="#gentle-wave" x="48" y="7")
49
+ main
50
+ div(class="inner")
51
+ div(id="main" class="pjax")
52
+ block content
53
+ div(id="sidebar")
54
+ block sidebar
55
+ +sidebarRender
56
+ div(class="dimmer")
57
+ footer(id="footer")
58
+ div(class="inner")
59
+ div(class="widgets")
60
+ +WRender
61
+ != partial('_partials/footer.pug', {}, {cache: true})
62
+ - var ccIcon = '<i class="ic i-creative-commons"></i>'
63
+ - var ccText = theme.creative_commons.license.toUpperCase()
64
+ <script data-config type="text/javascript" >
65
+ | var LOCAL = {
66
+ != `path: \"${_permapath(page.path)}\",`
67
+ | favicon: {
68
+ != `show: \'${__('favicon.show')}\',`
69
+ != `hide: \'${__('favicon.hide')}\'`
70
+ | },
71
+ | search: {
72
+ != `placeholder: \"${__('search.placeholder')}\",`
73
+ != `empty: \"${__('search.empty')}\",`
74
+ != `stats: \"${__('search.stats')}\"`
75
+ | },
76
+ if theme.widgets.recent_comments || page.comment !== false
77
+ != `valine: ${page.valine ? _safedump(page.valine) : 'true'},`
78
+ if page.chart
79
+ | chart: true,
80
+ if page.math
81
+ | copy_tex: true,
82
+ | katex: true,
83
+ if page.mermaid
84
+ | mermaid: true,
85
+ if page.audio
86
+ != `audio: ${_safedump(page.audio)},`
87
+ if page.audio === false
88
+ | audio: {},
89
+ if page.fancybox !== false
90
+ | fancybox: true,
91
+ if page.copyright !== false
92
+ if page.copyright === true
93
+ | nocopy: true,
94
+ != `copyright: \'${__("tips.nocopy")}\',`
95
+ else
96
+ != `copyright: \'${__("tips.copyright", ccIcon + ccText)}\',`
97
+ if page.outime === false
98
+ | outime: false,
99
+ else
100
+ | outime: true,template: "#{ __('outime.template') }",
101
+ if page.quiz
102
+ | quiz: {
103
+ != `choice: \'${__('quiz.choice')}\',`
104
+ != `multiple: \'${__('quiz.multiple')}\',`
105
+ != `true_false: \'${__('quiz.true_false')}\',`
106
+ != `essay: \'${__('quiz.essay')}\',`
107
+ != `gap_fill: \'${__('quiz.gap_fill')}\',`
108
+ != `mistake: \'${__('quiz.mistake')}\'`
109
+ | },
110
+ | ignores : [
111
+ | function(uri) {
112
+ | return uri.includes('#');
113
+ | },
114
+ | function(uri) {
115
+ | return new RegExp(LOCAL.path+"$").test(uri);
116
+ | }
117
+ if theme.quicklink.ignores
118
+ | ,
119
+ != _safedump(theme.quicklink.ignores)
120
+ | ]
121
+ | };
122
+ </script>
123
+ script(src="https://polyfill.alicdn.com/polyfill.min.js")
124
+ if theme.advVendors.enable
125
+ each i in _list_vendor_js()
126
+ != _adv_vendor_js(i)
127
+ else
128
+ != _vendor_js()
129
+ != _js('app.js')
130
+ != partial('_partials/third-party/baidu-analytics.pug', {}, {cache: true})
131
+ != partial('_partials/third-party/qweather.pug', {}, {cache: true})
132
+ != _new_comments('twikoo')
133
+ if theme.qweather.enable
134
+
135
+ - var jsInjects = theme?.inject?.body?.js,cssInjects = theme?.inject?.body?.css
136
+ if cssInjects
137
+ != css(cssInjects)
138
+
139
+ if jsInjects
140
+ != js(jsInjects)
141
+
142
+
143
+
@@ -0,0 +1,13 @@
1
+ div(id="loading")
2
+ div(class="cat")
3
+ div(class="body")
4
+ div(class="head")
5
+ div(class="face")
6
+ div(class="foot")
7
+ div(class="tummy-end")
8
+ div(class="bottom")
9
+ div(class="legs left")
10
+ div(class="legs right")
11
+ div(class="paw")
12
+ div(class="hands left")
13
+ div(class="hands right")
@@ -0,0 +1,4 @@
1
+ if page.prev || page.next
2
+ nav(class="pagination")
3
+ div(class="inner")
4
+ != paginator({prev_text: '<i class="ic i-angle-left" aria-label="' + __('accessibility.prev_page') + '"></i>',next_text: '<i class="ic i-angle-right" aria-label="' + __('accessibility.next_page') + '"></i>',mid_size : 1,escape : false})
@@ -0,0 +1,20 @@
1
+ if page.copyright !== false
2
+ - var ccIcon = '<i class="ic i-creative-commons"><em>(CC)</em></i>'
3
+ - var ccText = theme.creative_commons.license | upper
4
+ div(id="copyright")
5
+ ul
6
+ li(class="author")
7
+ strong
8
+ != __('post.copyright.author') + __('symbol.colon')
9
+ != page.author || author
10
+ i(class="ic i-at")
11
+ em @
12
+ != title
13
+ li(class="link")
14
+ strong
15
+ != __('post.copyright.link') + __('symbol.colon')
16
+ != _url(page.permalink, page.permalink, {title: page.title})
17
+ li(class="license")
18
+ strong
19
+ != __('post.copyright.license_title') + __('symbol.colon')
20
+ != page.copyright !== true ? __('post.copyright.license_content', _url(ccURL, ccIcon + ccText)) : __("post.copyright.nocopy")
@@ -0,0 +1,13 @@
1
+ div(class="meta")
2
+ if date(post.date) != date(post.updated) || time(post.date) != time(post.updated)
3
+ span(class="icon")
4
+ i(class="ic i-eye")
5
+ span 此文章已被阅读次数:
6
+ span(id="twikoo_visitors" class="waline-pageview-count" data-path=post.path) 正在加载...
7
+ span(class="item")
8
+ span(class="icon")
9
+ i(class="ic i-calendar-check")
10
+ span(class="text")
11
+ != __('post.edited')
12
+ time(title=__('post.modified') + __('symbol.colon') + full_date(post.updated) itemprop="dateModified" datetime=moment(post.updated).format())
13
+ != date(post.updated)
@@ -0,0 +1,13 @@
1
+ mixin navpost(item, type)
2
+ - var postText = item.title || item.link || __('post.untitled')
3
+ - var lastcat = item.categories.last()
4
+ - var itemlink=`<span class="type">${__('post.' + type)}</span><span class="category"><i class="ic i-flag"></i>${lastcat?.name}</span><h3>${ postText }</h3>`
5
+ != _url(item.path, itemlink, {itemprop: 'url', rel: type, 'data-background-image': _cover(item), title: postText})
6
+
7
+ div(class="post-nav")
8
+ div(class="item left")
9
+ if post.next
10
+ +navpost(post.next, 'prev')
11
+ div(class="item right")
12
+ if post.prev
13
+ +navpost(post.prev, 'next')
@@ -0,0 +1,26 @@
1
+ article(itemscope itemtype="http://schema.org/Article" class="post block" lang="{{ post.lang or config.language }}")
2
+ link(itemprop="mainEntityOfPage" href!=post.permalink)
3
+ span(hidden itemprop="author" itemscope itemtype="http://schema.org/Person")
4
+ meta(itemprop="image" content=url_for(theme.statics + theme.images + '/' + theme.sidebar.avatar))
5
+ meta(itemprop="name" content=author)
6
+ meta(itemprop="description" content=`${ subtitle }, ${ description }`)
7
+ span(hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization")
8
+ meta(itemprop="name" content=title)
9
+ div(class=`body md${post.direction && post.direction.toLowerCase() === 'rtl'? rtl:""}` itemprop="articleBody")
10
+ if post.photos && post.photos.length
11
+ div(class="gallery" itemscope itemtype="http://schema.org/ImageGallery")
12
+ each photo in post.photos
13
+ img(data-src=_image_url(photo, post.path) itemprop="contentUrl")
14
+ != post.content
15
+ if post.tags && post.tags.length
16
+ div(class="tags")
17
+ each tag in post.tags.toArray()
18
+ a(href!=url_for(tag.path) rel="tag")
19
+ i(class="ic i-tag")
20
+ != tag.name
21
+ footer
22
+ != partial('_partials/post/footer.pug')
23
+ if theme.reward.enable
24
+ != partial('_partials/post/reward.pug', {}, {cache: true})
25
+ if theme.creative_commons.license
26
+ != partial('_partials/post/copyright.pug')
@@ -0,0 +1,18 @@
1
+ if page.reward !== false
2
+ div(class="reward")
3
+ button
4
+ i(class="ic i-heartbeat")
5
+ != __('reward.donate')
6
+ p
7
+ != __('reward.text')
8
+ div(id="qr")
9
+ each name, image in theme.reward.account
10
+ - var builtin = ['wechatpay', 'alipay', 'paypal', 'bitcoin']
11
+ if builtin.includes(name)
12
+ - var translation = __('reward.' + name)
13
+ else
14
+ - var translation = name
15
+ div
16
+ img(data-src=`${url_for(theme.statics + theme.images + image) }` alt=`${ author } ${ translation }`)
17
+ p
18
+ != translation
@@ -0,0 +1,37 @@
1
+ mixin item(name, path, parent, dropdown, sublist)
2
+ - var trimn = (str)=>{if (str!=null) return str.trim(); else return ""}
3
+ - var path = path.split('||')
4
+ - var itemURL = path[0].trim()
5
+ - if (!itemURL.startsWith('http')){ itemURL = itemURL.replace('//', '/') }
6
+ - var menuIcon = '<i class="ic i-' + trimn(path[1]) + '"></i>'
7
+ - var menuText = __('menu.' + name).replace('menu.', '')
8
+ if parent
9
+ li(class="item dropdown")
10
+ if itemURL == '/'
11
+ a(href="javascript:void(0);")
12
+ != menuIcon + menuText
13
+ else
14
+ != _url(itemURL, menuIcon + menuText, {rel: 'section'})
15
+ if dropdown
16
+ ul(class="submenu")
17
+ each subvalue, subname in sublist
18
+ - var path = subvalue.split('||')
19
+ - var itemURL = path[0].trim()
20
+ - if (itemURL==='/') itemURL='javascript:void(0)'
21
+ - var menuText = __('menu.' + subname).replace('menu.', '')
22
+ if subname == 'default'
23
+ - var menuText = __('menu.' + name).replace('menu.', '')
24
+ - var menuIcon = '<i class="ic i-' + trimn(path[1]) + '"></i>'
25
+ li(class="item")
26
+ != _url(itemURL, menuIcon + menuText, {rel: 'section'})
27
+ else
28
+ li(class="item")
29
+ != _url(itemURL, menuIcon + menuText, {rel: 'section'})
30
+
31
+ each value, name in theme.menu
32
+ if value == '[object Object]'
33
+ each subvalue, subname in value
34
+ if subname == 'default'
35
+ +item(name, subvalue, true, true, value)
36
+ else
37
+ +item(name, value)
@@ -0,0 +1,40 @@
1
+ div(class="author" itemprop="author" itemscope itemtype="http://schema.org/Person")
2
+ img(class="image" itemprop="image" alt=author
3
+ data-src=url_for(theme.statics + theme.assets + '/'+ theme.sidebar.avatar))
4
+ p(class="name" itemprop="name")
5
+ != author
6
+ div(class="description" itemprop="description")
7
+ != description
8
+
9
+ nav(class="state")
10
+ if config.archive_dir !== '/' && site.posts.length > 0
11
+ div(class="item posts")
12
+ a(href=url_for(config.archive_dir + '/'))
13
+ span(class="count")
14
+ != site.posts.length
15
+ span(class="name")
16
+ != __('state.posts')
17
+ if config.category_dir !== '/' && site.categories.length > 0
18
+ div(class="item categories")
19
+ a(href=url_for(config.category_dir + '/'))
20
+ span(class="count")
21
+ != site.categories.length
22
+ span(class="name")
23
+ != __('state.categories')
24
+ if config.tag_dir !== '/' && site.tags.length > 0
25
+ div(class="item tags")
26
+ a(href=url_for(config.tag_dir + '/'))
27
+ span(class="count")
28
+ != site.tags.length
29
+ span(class="name")
30
+ != __('state.tags')
31
+
32
+ div(class="social")
33
+ each link, name in theme.social
34
+ - var sidebarURL = link.split('||')[0].trim()
35
+ - var sidebarIcon = '<i class="ic i-' + link.split('||')[1].trim() + '"></i>'
36
+ != _url(sidebarURL, sidebarIcon, {title: sidebarURL, class: 'item ' + name})
37
+
38
+ div(class="menu")
39
+ //!= partial('_partials/sidebar/menu.pug', {}, {cache: true})
40
+ != partial('_partials/sidebar/menu.pug')
@@ -0,0 +1,11 @@
1
+ - var hmSrc = `https://hm.baidu.com/hm.js?${ theme.baidu_analytics }`
2
+ if theme.baidu_analytics
3
+ script(data-pjax=true).
4
+ var _hmt = _hmt || [];
5
+ (function () {
6
+ const hm = document.createElement("script");
7
+ hm.src = #{hmSrc}
8
+ hm.async = true;
9
+ const s = document.getElementsByTagName("script")[0];
10
+ s.parentNode.insertBefore(hm, s);
11
+ })();
@@ -0,0 +1,8 @@
1
+ - var code = theme?.visitor?.clarity
2
+ if code
3
+ script.
4
+ (function(c,l,a,r,i,t,y){
5
+ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
6
+ t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
7
+ y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
8
+ })(window, document, "clarity", "script", "#{code}");
@@ -0,0 +1,35 @@
1
+ script.
2
+ WIDGET = {
3
+ "CONFIG": {
4
+ "modules": "012",
5
+ "background": "5",
6
+ "tmpColor": "var(--text-color);",
7
+ "tmpSize": "16",
8
+ "cityColor": "var(--text-color);",
9
+ "citySize": "16",
10
+ "aqiColor": "FFFFFF",
11
+ "aqiSize": "16",
12
+ "weatherIconSize": "24",
13
+ "alertIconSize": "18",
14
+ "padding": "10px 10px 10px 10px",
15
+ "shadow": "0",
16
+ "language": "auto",
17
+ "borderRadius": "5",
18
+ "fixed": "false",
19
+ "vertical": "top",
20
+ "horizontal": "left",
21
+ "key": #{theme.qweather.key}
22
+ }
23
+ }
24
+
25
+ script.
26
+ (function (d) {
27
+ const c = d.createElement('link')
28
+ c.rel = 'stylesheet'
29
+ c.href = 'https://widget.qweather.net/simple/static/css/he-simple.css?v=1.4.0'
30
+ const s = d.createElement('script')
31
+ s.src = 'https://widget.qweather.net/simple/static/js/he-simple.js?v=1.4.0'
32
+ const sn = d.getElementsByTagName('script')[0]
33
+ sn.parentNode.insertBefore(c, sn)
34
+ sn.parentNode.insertBefore(s, sn)
35
+ })(document)
@@ -0,0 +1,31 @@
1
+ extends _partials/layout.pug
2
+
3
+ block title
4
+ if is_month()
5
+ != `${page.year}${__('symbol.year')}/${page.month}${__('symbol.month')}`
6
+ else if is_year()
7
+ != `${page.year}${__('symbol.year')}`
8
+ != `${__('title.archive')}|`
9
+
10
+ block header
11
+ h1(itemprop="name headline")
12
+ if is_month()
13
+ != _p('title.archive_in', page.year + __('symbol.year') + page.month + __('symbol.month'))
14
+ else if is_year()
15
+ != _p('title.archive_in', page.year + __('symbol.year'))
16
+ else
17
+ != __('title.archive')
18
+
19
+ block content
20
+ div(class="collapse wrap")
21
+ h2(class="item header")
22
+ if is_month()
23
+ a(href=url_for(config.archive_dir))
24
+ != __('title.all')
25
+ small /
26
+ a(href=url_for(config.archive_dir + '/' + page.year ))
27
+ != `${page.year} ${__('symbol.year')}`
28
+ small /
29
+ != `${page.month}${__('symbol.month')}`
30
+ small
31
+ != __('title.archive')
@@ -0,0 +1,66 @@
1
+ extends ./_partials/layout.pug
2
+
3
+ block title
4
+ != `${__('title.category')}${__('symbol.colon')}${page.category}|`
5
+
6
+ block header
7
+ h1(itemprop="name headline")
8
+ != _p('title.category_in', page.title)
9
+
10
+ block content
11
+ div(class="collapse wrap")
12
+ - var prev = _category_prev(page.category)
13
+ h2(class="item header")
14
+ a(href=url_for(config.category_dir))
15
+ != __('title.all')
16
+ if prev
17
+ small /
18
+ != prev
19
+ small /
20
+ != page.title
21
+ small
22
+ != __('title.category')
23
+ - var posts = page.posts
24
+ - var current = "c"
25
+ - var lastcat = ""
26
+ - var lastcatslug = ""
27
+ each post in posts.toArray()
28
+ if post.categories && post.categories.length
29
+ - var cat_length = post.categories.length
30
+ each cat,index in post.categories.toArray()
31
+ if cat.name == page.title
32
+ - var lastcat = ""
33
+ - var lastcatslug = ""
34
+ else
35
+ mixin lastcat
36
+ != lastcat
37
+ a(href=url_for(cat.path))
38
+ != cat.name
39
+ small
40
+ if index >= post.categories.toArray().length
41
+ != cat.length
42
+ else
43
+ != "/"
44
+ - var lastcatslug = lastcatslug + cat.slug
45
+ if lastcat && lastcatslug && lastcatslug !== current
46
+ h3(class="item section")
47
+ +lastcat
48
+ - var current = lastcatslug
49
+ article(class="item normal" itemscope itemtype="http://schema.org/Article")
50
+ div(class="meta")
51
+ time(
52
+ itemprop="dateCreated"
53
+ datetime=moment(post.date).format()
54
+ content=date(post.date, config.date_format)
55
+ )
56
+ != date(post.date, 'MM-DD')
57
+ div(class="title")
58
+ if post.link
59
+ - var postTitleIcon = '<i class="ic i-link-alt"></i>'
60
+ - var postText = post.title || post.link
61
+ != _url(post.link, postText + postTitleIcon, {class: 'external', itemprop: 'url'})
62
+ else
63
+ a(href=url_for(post.path) itemprop="url")
64
+ span(itemprop="name")
65
+ != post.title || __('post.untitled')
66
+ include _partials/pagination.pug
@@ -0,0 +1,33 @@
1
+ extends _partials/layout.pug
2
+ include _mixin/card.pug
3
+ include _mixin/postmeta.pug
4
+ include _mixin/segment.pug
5
+
6
+ block content
7
+ div(class="index wrap")
8
+ if page.current == 1
9
+ if page.sticky.length > 0
10
+ h2(class="divider")
11
+ != __('index.sticky')
12
+ - var sticky = page.sticky.toArray()
13
+ div(class="segments sticky")
14
+ each post in sticky
15
+ +SMRender(post)
16
+ if page.catlist.length > 0
17
+ h2(class="divider")
18
+ != __('index.category')
19
+ div(class="cards")
20
+ each cat in page.catlist
21
+ +CardRender(cat)
22
+ - var pagePosts = page?.posts?.length
23
+ if pagePosts > 0
24
+ - var posts = page.posts.toArray()
25
+ if page.current == 1
26
+ h2(class="divider")
27
+ != __('index.posts')
28
+ div(class="segments posts")
29
+ each post in posts
30
+ +SMRender(post)
31
+ include _partials/pagination.pug
32
+
33
+
@@ -0,0 +1,56 @@
1
+ extends _partials/layout.pug
2
+ include _mixin/sidebar.pug
3
+ include _mixin/comment.pug
4
+
5
+ block title
6
+ if page.type === 'categories'
7
+ != __('title.all') + __('title.category')
8
+ else if page.type === 'tags'
9
+ != __('title.all') + __('title.tag')
10
+ else if page.type === '404'
11
+ != __('title.not_found')
12
+ else
13
+ != page.title
14
+ != "|"
15
+
16
+ block header
17
+ h1(itemprop="name headline")
18
+ if page.link
19
+ - var postTitleIcon = '<i class="ic i-link-alt"></i>'
20
+ - var postText = page.title || page.link
21
+ != _url(page.link, postText + postTitleIcon, {class: 'link external', itemprop: 'url'})
22
+ else
23
+ if page.type === 'categories'
24
+ != __('title.all') + __('title.category')
25
+ else if page.type === 'tags'
26
+ != __('title.all') + __('title.tag')
27
+ else if page.type === '404'
28
+ != __('title.not_found')
29
+ else
30
+ != page.title
31
+ != "|"
32
+
33
+ block content
34
+ if page.type === 'categories'
35
+ div(class="collapse wrap")
36
+ h2(class="item title")
37
+ a(href=url_for(site.path))
38
+ != __('menu.home')
39
+ small
40
+ != _p('counter.categories', site.categories.length)
41
+ else if page.type === 'tags'
42
+ div(class="collapse wrap")
43
+ h2(class="item title")
44
+ a(href=url_for(site.path))
45
+ != __('menu.home')
46
+ small
47
+ != _p('counter.tag_cloud', site.tags.length)
48
+ div(class="tag cloud")
49
+ != tagcloud({min_font: theme.tagcloud.min,max_font: theme.tagcloud.max,amount: theme.tagcloud.amount,color: true,start_color: theme.tagcloud.start,end_color: theme.tagcloud.end})
50
+ else
51
+ div(class="page wrap")
52
+ != partial('_partials/post/post.pug', {post: page})
53
+ +CommentRender
54
+
55
+ block sidebar
56
+ +sidebarRender(true)
@@ -0,0 +1,35 @@
1
+ extends _partials/layout.pug
2
+ include _mixin/sidebar.pug
3
+ include _mixin/comment.pug
4
+ include _mixin/postmeta.pug
5
+
6
+ block title
7
+ - var page_title = page.title
8
+ if page.categories && page.categories.length
9
+ - var cat_list = ''
10
+ - var comma = ''
11
+ each cat in page.categories.toArray()
12
+ - var cat_list = cat.name + comma + cat_list
13
+ - var comma = ' - '
14
+ - var page_title = page.title + ' - ' + cat_list
15
+ != `${page_title} |`
16
+
17
+ block header
18
+ h1(itemprop="name headline")
19
+ if page.link
20
+ - var postTitleIcon = '<i class="ic i-link-alt"></i>'
21
+ - var postText = page.title || page.link
22
+ != _url(page.link, postText + postTitleIcon, {class: 'link external', itemprop: 'url'})
23
+ else
24
+ != page.title
25
+ +PMRender(page, true)
26
+
27
+ block content
28
+ div(class="article wrap")
29
+ +BCRender(page, true)
30
+ != partial('_partials/post/post.pug', {post: page})
31
+ != partial('_partials/post/nav.pug', {post: page})
32
+ +CommentRender
33
+
34
+ block sidebar
35
+ +sidebarRender(true)