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,146 @@
1
+ ---
2
+ name: 繁體中文
3
+ favicon:
4
+ show: (●´3`●)復活成功
5
+ hide: (´Д`)瀏覽器崩潰啦
6
+
7
+ title:
8
+ archive: 歸檔
9
+ category: 分類
10
+ tag: 標籤
11
+ all: 全部
12
+ not_found: Σ( ° △ °|||)︴404!何も見えない
13
+ category_in: 分類於"%s"的文章
14
+ tag_in: 包含標籤"%s"的文章
15
+ archive_in: 發表於"%s"的文章
16
+
17
+ menu:
18
+ home: 首頁
19
+ posts: 文章
20
+ archives: 歸檔
21
+ categories: 分類
22
+ tags: 標籤
23
+ about: 關於
24
+ search: 檢索
25
+
26
+ sidebar:
27
+ overview: 本站概要
28
+ toc: 文章目錄
29
+ related: 系列文章
30
+
31
+ index:
32
+ sticky: 置頂文章
33
+ category: 精選分類
34
+ posts: 文章列表
35
+ random_posts: 隨機文章
36
+ recent_comments: 最新評論
37
+
38
+ post:
39
+ posted: 發表於
40
+ edited: 更新於
41
+ created: 創建時間
42
+ modified: 修改時間
43
+ edit: 編輯
44
+ in: 分類於
45
+ read_more: 閱讀全文
46
+ untitled: 未命名
47
+ sticky: 置頂
48
+ views: 閱讀次數
49
+ related_posts: 相關文章
50
+ next: 下一篇
51
+ prev: 上一篇
52
+ copyright:
53
+ author: 作者
54
+ link: 文章連結
55
+ license_title: 版權聲明
56
+ license_content: "本網誌所有文章除特別聲明外,均採用 %s 許可協議。轉載請註明出處!"
57
+ nocopy: "<span class=\"red\">本頁內容禁止轉載!</span>"
58
+
59
+ footer:
60
+ powered: "基於 %s"
61
+ total_views: 總瀏覽次數
62
+ total_visitors: 訪客總數
63
+
64
+ counter:
65
+ index:
66
+ post: "%d 篇文章"
67
+ category: "%d 個子項,"
68
+ tag_cloud:
69
+ zero: 沒有標籤
70
+ one: 目前共有 1 個標籤
71
+ other: "目前共有 %d 個標籤"
72
+ categories:
73
+ zero: 沒有分類
74
+ one: 目前共有 1 個分類
75
+ other: "目前共有 %d 個分類"
76
+ archive_posts:
77
+ zero: 沒有文章。
78
+ one: 目前共有 1 篇文章。
79
+ other: "目前共有 %d 篇文章。"
80
+
81
+ state:
82
+ posts: 文章
83
+ tags: 標籤
84
+ categories: 分類
85
+
86
+ search:
87
+ placeholder: 文章搜尋
88
+ empty: "關於 「 ${query} 」 ,什麼也沒搜到"
89
+ stats: "${time} ms 內找到 ${hits} 條結果"
90
+
91
+ cheers:
92
+ um: 嗯..
93
+ ok: 還行
94
+ nice: 好
95
+ good: 很好
96
+ great: 非常好
97
+ excellent: 太棒了
98
+
99
+ keep_on: 繼續努力。
100
+
101
+ symbol:
102
+ comma: ","
103
+ period: "。"
104
+ colon: ":"
105
+ year: 年
106
+ month: 月
107
+
108
+ reward:
109
+ donate: 捐贈
110
+ text: 請我喝[茶]~( ̄▽ ̄)~*
111
+ wechatpay: 微信支付
112
+ alipay: 支付寶
113
+ paypal: PayPal
114
+ bitcoin: 比特幣
115
+
116
+ follow_me:
117
+ welcome: 歡迎關注我的其它發布渠道
118
+
119
+ accessibility:
120
+ nav_toggle: 切換導航欄
121
+ prev_page: 上一頁
122
+ next_page: 下一頁
123
+
124
+ symbols_count_time:
125
+ count: 文章字數
126
+ count_total: 總字數
127
+ time: 所需閱讀時間
128
+ time_total: 所需總閱讀時間
129
+ time_minutes: 分鐘
130
+ word: 字
131
+ view: 次
132
+
133
+ tips:
134
+ copyright: "複製成功,轉載請遵守 %s 協議。"
135
+ nocopy: "複製失敗,本頁內容禁止轉載!"
136
+
137
+ quiz:
138
+ choice: 單選題
139
+ multiple: 多選題
140
+ true_false: 判斷題
141
+ essay: 問答題
142
+ gap_fill: 填空題
143
+ mistake: 錯題備註
144
+
145
+ outime:
146
+ template: "<div class=\"note warning\"><p><span class=\"label warning\">文章時效性提示</span><br>這是一篇發佈於 {{publish}} 天前,最後一次更新在 {{updated}} 天前的文章,部分信息可能已經發生改變,請注意甄別。</p></div>"
@@ -0,0 +1,30 @@
1
+ <?xml version="1.0"?>
2
+ <feed xmlns="http://www.w3.org/2005/Atom">
3
+ <id><%= config.url %></id>
4
+ <title><%= config.title %></title>
5
+ <subtitle><%= config.subtitle %></subtitle>
6
+ <icon><%= full_url_for('/images/favicon.ico') %></icon>
7
+ <link href="<%= config.url %>" />
8
+ <author>
9
+ <name><%= config.author %></name>
10
+ </author>
11
+ <updated><%= moment(lastBuildDate).toISOString() %></updated>
12
+ <%_ for (item of (config.keywords ? config.keywords.split(',') : [])) { _%>
13
+ <category term="<%= item %>" />
14
+ <%_ } _%>
15
+ <%_ for (const post of posts) { _%>
16
+ <entry>
17
+ <id><%= post.permalink %></id>
18
+ <title><%= post.title %></title>
19
+ <link rel="alternate" href="<%= post.permalink %>"/>
20
+ <content type="html"><%= post.content %></content>
21
+ <%_ for (const { name, path } of (post.categories ? post.categories.toArray() : [])) { _%>
22
+ <category term="<%= name %>" scheme="<%= full_url_for(path) %>" />
23
+ <%_ } _%>
24
+ <%_ for (const { name, path } of (post.tags ? post.tags.toArray() : [])) { _%>
25
+ <category term="<%= name %>" scheme="<%= full_url_for(path) %>" />
26
+ <%_ } _%>
27
+ <updated><%= moment(post.date).toISOString() %></updated>
28
+ </entry>
29
+ <%_ } _%>
30
+ </feed>
@@ -0,0 +1,16 @@
1
+ <%- JSON.stringify({
2
+ version: 'https://jsonfeed.org/version/1',
3
+ title: config.title,
4
+ subtitle: config.subtitle,
5
+ icon: full_url_for('/images/favicon.ico'),
6
+ description: config.description,
7
+ home_page_url: config.url,
8
+ items: posts.map(post => ({
9
+ id: post.permalink,
10
+ url: post.permalink,
11
+ title: post.title,
12
+ date_published: moment(post.date).toISOString(),
13
+ content_html: post.content || '',
14
+ tags: [...(post.categories ? post.categories.toArray() : []).map(({ name }) => name), ...(post.tags ? post.tags.toArray() : []).map(({ name }) => name)]
15
+ }))
16
+ }, null, 4) _%>
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0"?>
2
+ <rss version="2.0">
3
+ <channel>
4
+ <title><%= config.title %></title>
5
+ <subtitle><%= config.subtitle %></subtitle>
6
+ <icon><%= full_url_for('/images/favicon.ico') %></icon>
7
+ <link><%= config.url %></link>
8
+ <author>
9
+ <name><%= config.author %></name>
10
+ </author>
11
+ <description><%= config.description %></description>
12
+ <language><%= config.language %></language>
13
+ <pubDate><%= moment(lastBuildDate).locale('en').format('ddd, DD MMM YYYY HH:mm:ss ZZ') %></pubDate>
14
+ <lastBuildDate><%= moment(lastBuildDate).locale('en').format('ddd, DD MMM YYYY HH:mm:ss ZZ') %></lastBuildDate>
15
+ <%_ for (item of (config.keywords ? config.keywords.split(',') : [])) { _%>
16
+ <category term="<%= item %>" />
17
+ <%_ } _%>
18
+ <%_ for (const post of posts) { _%>
19
+ <item>
20
+ <guid isPermalink="true"><%= post.permalink %></guid>
21
+ <title><%= post.title %></title>
22
+ <link><%= post.permalink %></link>
23
+ <%_ for (const { name, path } of (post.categories ? post.categories.toArray() : [])) { _%>
24
+ <category term="<%= name %>" scheme="<%= full_url_for(path) %>" />
25
+ <%_ } _%>
26
+ <%_ for (const { name, path } of (post.tags ? post.tags.toArray() : [])) { _%>
27
+ <category term="<%= name %>" scheme="<%= full_url_for(path) %>" />
28
+ <%_ } _%>
29
+ <pubDate><%= moment(post.date).locale('en').format('ddd, DD MMM YYYY HH:mm:ss ZZ') %></pubDate>
30
+ <description><![CDATA[ <%= post.content %> ]]></description>
31
+ </item>
32
+ <%_ } _%>
33
+ </channel>
34
+ </rss>
@@ -0,0 +1,33 @@
1
+ mixin BCRender(post, home)
2
+ if home
3
+ != '<div class="breadcrumb" itemListElement itemscope itemtype="https://schema.org/BreadcrumbList">'
4
+ i(class="ic i-home")
5
+ span
6
+ a(href=url_for(site.path))
7
+ != __('menu.home')
8
+ else
9
+ != '<div class="breadcrumb">'
10
+ if post.categories && post.categories.length
11
+ - var cat_length = post.categories.length
12
+ if home
13
+ i(class="ic i-angle-right")
14
+ each cat,index in post.categories.toArray()
15
+ if home
16
+ if index===cat_length
17
+ span(class="current" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem")
18
+ a(href=url_for(cat.path) itemprop="item" rel="index" title=__('post.in')+ cat.name)
19
+ span(itemprop="name")
20
+ != cat.name
21
+ meta(itemprop="position" content=index)
22
+ else
23
+ span(itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem")
24
+ a(href=url_for(cat.path) itemprop="item" rel="index" title=__('post.in') + cat.name)
25
+ span(itemprop="name")
26
+ != cat.name
27
+ meta(itemprop="position" content=index)
28
+ else
29
+ a(href=url_for(cat.path) title=__('post.in')+cat.name)
30
+ != cat.name
31
+ if cat_length > 1 && index !== cat_length
32
+ i(class="ic i-angle-right")
33
+ != '</div>'
@@ -0,0 +1,37 @@
1
+ mixin CardRender(item)
2
+ - cover = url_for(theme.statics + item.slug + '/cover.jpg')
3
+ - itemname = item.name
4
+
5
+ section(class="item")
6
+ div(class="cover" data-background-image!=cover ? cover:"")
7
+ h2(class="title")
8
+ != itemname
9
+ - var temp = item?.top?.name
10
+ if temp
11
+ span
12
+ != item.top.name
13
+ div(class="info")
14
+ if item.link
15
+ - var postTitleIcon = '<i class="ic i-link-alt"></i>'
16
+ - var postText = itemname || item.link || __('post.untitled')
17
+ div(class="ribbon")
18
+ != _url(item.link , postText + (postTitleIcon || ''), {itemprop: 'url', title: postText})
19
+ div(class="inner")
20
+ - var len = ''
21
+ if item.child
22
+ - len = _p('counter.index.category', item.child)
23
+ - len = len + _p('counter.index.post', item.length)
24
+ ul(class="posts")
25
+ each sub in item.subs
26
+ - var subname = sub.name || sub.title
27
+ li
28
+ a(title=subname href=url_for(sub.path))
29
+ = subname
30
+ div(class="meta footer")
31
+ if item.top
32
+ span
33
+ != _url(item.top.path, '<i class="ic i-flag"></i>'+item.top.name, {itemprop: 'url', title: item.top.name})
34
+ span
35
+ i(class="ic i-file")
36
+ != len
37
+ != _url(item.path, 'more...', {itemprop: 'url', title: itemname, class: 'btn'})
@@ -0,0 +1,10 @@
1
+ mixin CommentRender()
2
+ - var tk = theme?.twikoo?.enable,wl = theme?.waline?.enable
3
+ if page.comment !== false
4
+ if tk
5
+ div(class="wrap" id="tcomments")
6
+ != _init_comments("twikoo")
7
+ else if wl
8
+ div(class="warp" id="wcomments")
9
+ != _init_comments("waline")
10
+
@@ -0,0 +1,30 @@
1
+ mixin PMRender(item, full)
2
+ - full ||= false
3
+ //- 下方的_content为暴力修复法,在未来需要重写
4
+ div(class="meta")
5
+ - var create_title = __('post.created') + __('symbol.colon') + full_date(item.date)
6
+ span(class="item" title=create_title)
7
+ span(class="icon")
8
+ i(class="ic i-calendar")
9
+ if full
10
+ span(class="text")
11
+ != __('post.posted')
12
+ time(itemprop="dateCreated datePublished" datetime=moment(item.date).format())
13
+ != date(item.date)
14
+ if theme.post.count
15
+ span(class="item" title=__('symbols_count_time.count'))
16
+ span(class="icon")
17
+ i(class="ic i-pen")
18
+ if full
19
+ span(class="text")
20
+ != __('symbols_count_time.count')
21
+ span= symbolsCount(item)
22
+ span(class="text")
23
+ != __('symbols_count_time.word')
24
+ span(class="item" title=__('symbols_count_time.time'))
25
+ span(class="icon")
26
+ i(class="ic i-clock")
27
+ if full
28
+ span(class="text")
29
+ != __('symbols_count_time.time')
30
+ span= symbolsTime(item, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes'))
@@ -0,0 +1,32 @@
1
+ include postmeta.pug
2
+
3
+ mixin SMRender(item)
4
+ - var link1 = item.link || item.path
5
+ - var gradient = theme?.experiments?.gradient
6
+ if item.link
7
+ - var postTitleIcon = '<i class="ic i-link-alt"></i>'
8
+ - var postText = item.title || item.link || __('post.untitled')
9
+ article(class="item")
10
+ if gradient
11
+ div(class="cover" style=`background: linear-gradient(to bottom right, ${random_color()}, ${random_color()});`)
12
+ else
13
+ div(class="cover")
14
+ != _url(link1, '<img data-src="'+ _cover(item) +'" alt="article cover">', {itemprop: 'url', title: postText})
15
+ div(class="info")
16
+ +PMRender(item)
17
+ h3
18
+ != _url(link1, postText + (postTitleIcon || ''), {itemprop: 'url', title: postText})
19
+ div(class="excerpt")
20
+ if item.description
21
+ != item.description
22
+ else if item.excerpt
23
+ != item.excerpt
24
+ else
25
+ != _truncate(escape_html(_striptags(item.content)),300)
26
+ if item.categories.length > 0
27
+ div(class="meta footer")
28
+ span
29
+ - var lastcat = item.categories.last()
30
+ != _url(lastcat.path, '<i class="ic i-flag"></i>' + lastcat.name, {itemprop: 'url', title: lastcat.name})
31
+ != _url(link1, 'more...', {itemprop: 'url', title: postText, class: 'btn'})
32
+
@@ -0,0 +1,36 @@
1
+ mixin sidebarRender(display_toc)
2
+ - var related = _category_posts(page)
3
+ if page && page.prev
4
+ - var prevlink = page?.prev_link
5
+ if is_page() || is_post()
6
+ - prevlink = page?.next?.path
7
+ if page && page.next
8
+ - var nextlink = page?.next_link
9
+ if is_page() || is_post()
10
+ - nextlink = page?.prev?.path
11
+ div(class="inner")
12
+ div(class="panels")
13
+ div(class="inner")
14
+ div(class="contents panel pjax" data-title=__('sidebar.toc'))
15
+ if display_toc
16
+ != toc(page.content)
17
+
18
+ div(class="related panel pjax" data-title=__('sidebar.related'))
19
+ if related
20
+ ul
21
+ != related
22
+ div(class="overview panel" data-title=__('sidebar.overview'))
23
+ != partial('_partials/sidebar/overview.pug', {}, {cache: true})
24
+ ul(id="quick")
25
+ li(class="prev pjax")
26
+ if page && page.prev
27
+ if prevlink
28
+ != _url(prevlink, '<i class="ic i-chevron-left"></i>', {rel: 'prev', title: __('post.prev')})
29
+ li(class="up")
30
+ i(class="ic i-arrow-up")
31
+ li(class="down")
32
+ i(class="ic i-arrow-down")
33
+ li(class="next pjax")
34
+ if nextlink
35
+ != _url(nextlink, '<i class="ic i-chevron-right"></i>', {rel: 'next', title: __('post.next')})
36
+ li(class="percent")
@@ -0,0 +1,29 @@
1
+ mixin field(item)
2
+ if item.link
3
+ - var postTitleIcon = '<i class="ic i-link-alt"></i>'
4
+ li(class="item")
5
+ +BCRender(item, false)
6
+ - var postText = item.title || item.link || __('post.untitled')
7
+ - var link1 = item.link || item.path
8
+ span
9
+ != _url(link1, postText + (postTitleIcon || ''))
10
+
11
+ mixin WRender(item)
12
+ if theme.widgets.random_posts
13
+ div(class="rpost pjax")
14
+ h2
15
+ != __('index.random_posts')
16
+ ul
17
+ - var posts = site.posts.shuffle().limit(10).toArray()
18
+ each item in posts
19
+ +field(item)
20
+ if theme.widgets.recent_comments
21
+ div(class="rpost pjax")
22
+ h2 最新评论
23
+ ul(class="leancloud-recent-comment" id="new-comment")
24
+ li(v-for="com in coms" class="item")
25
+ a(v-bind:href="com.href" data-pjax-state="data-pjax-state")
26
+ span(class="breadcrumb") {{com.nick}}@{{com.time}}
27
+ span {{com.text}}
28
+ br
29
+
@@ -0,0 +1,61 @@
1
+ div(class="status")
2
+ div(class="copyright")
3
+ - var copyright_year = date(null, 'YYYY')
4
+ if theme.footer.since && theme.footer.since != copyright_year
5
+ span(itemprop="copyrightYear")
6
+ != copyright_year
7
+ span(class="with-love")
8
+ i(class=`ic i-${ theme.footer.icon.name }`)
9
+ span(class="author" itemprop="copyrightHolder")
10
+ != `${author} @ ${ alternate?alternate:title}`
11
+ if theme.footer.count
12
+ div(class="count")
13
+ span(class="post-meta-item-icon")
14
+ i(class="ic i-chart-area")
15
+ span(title=__('symbols_count_time.count_total'))
16
+ != `${ symbolsCountTotal(site) } ${__('symbols_count_time.word')}`
17
+ span(class="post-meta-divider") |
18
+ span(class="post-meta-item-icon")
19
+ i(class="ic i-coffee")
20
+ span(title=__('symbols_count_time.time_total'))
21
+ != symbolsTimeTotal(site, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes'))
22
+ //- span(id="timeDate")
23
+ //- span(id="times")
24
+ if theme.footer.powered
25
+ div(class="powered-by")
26
+ != __('footer.powered', _url('https://hexo.io', 'Hexo') + ' & Theme.' + _url('https://github.com/zkz098/hexo-theme-shokaX/tree/vue', 'ShokaX with Vue'))
27
+ if theme.footer.icp.enable
28
+ br
29
+ span(style="display:inline;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;")
30
+ a(href="https://beian.miit.gov.cn")
31
+ != theme.footer.icp.icpnumber
32
+ - var beianN = theme.footer.icp?.beian, RC=theme.footer.icp?.recordcode
33
+ if beianN && RC
34
+ br
35
+ a(target="_blank" href=`https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=${RC}`)
36
+ img(src=theme.statics + theme.assets + '/' + theme.footer.icp.icon style="max-width: 2em;display:inline;")
37
+ != beianN
38
+
39
+
40
+ if theme.footer.lantern.enable
41
+ div(class="deng-box")
42
+ div(class="deng")
43
+ div(class="xian")
44
+ div(class="deng-a")
45
+ div(class="deng-b")
46
+ div(class="deng-t")
47
+ != theme.footer.lantern.word2
48
+ div(class="shui shui-a")
49
+ div(class="shui-c")
50
+ div(class="shui-b")
51
+ div(class="deng-box1")
52
+ div(class="deng")
53
+ div(class="xian")
54
+ div(class="deng-a")
55
+ div(class="deng-b")
56
+ div(class="deng-t")
57
+ != theme.footer.lantern.word1
58
+ div(class="shui shui-a")
59
+ div(class="shui-c")
60
+ div(class="shui-b")
61
+
@@ -0,0 +1,54 @@
1
+ - var msValidate = theme?.seo?.bing,googleValid = theme?.seo?.google
2
+ - var yandexValid = theme?.seo?.yandex,baiduValid = theme?.seo?.baidu
3
+ - var siteTitle = config.title,noBaiduT = theme?.seo?.disable_baidu_transformation
4
+ - var feedLink = full_url_for("/feed.json")
5
+ - var twikooLink = theme?.twikoo?.link;var jsInjects = theme?.inject?.head?.js,cssInjects = theme?.inject?.head?.css
6
+ - var wl = theme.waline.enable
7
+ meta(charset="UTF-8")
8
+ meta(name="viewport" content="width=device-width,initial-scale=1,maximum-scale=2")
9
+ meta(name="theme-color" content="#222")
10
+
11
+ meta(http-equiv="X-UA-COMPATIBLE" content="IE=edge,chrome=1")
12
+ meta(name="renderer" content="webkit")
13
+ link(rel="icon" type="image/ico" sizes="32x32" href=url_for(theme.statics + theme.assets + theme.icon.favicon))
14
+ if theme.icon.apple_touch_icon
15
+ link(rel="apple-touch-icon" sizes="180x180" href=url_for(theme.statics + theme.assets + theme.icon.apple_touch_icon))
16
+
17
+ if msValidate
18
+ meta(name="msvalidate.01" content=msValidate)
19
+ if googleValid
20
+ meta(name="google-site-verification" content=googleValid)
21
+ if yandexValid
22
+ meta(name="yandex-verification" content=yandexValid)
23
+ if baiduValid
24
+ meta(name="baidu-site-verification" content=baiduValid)
25
+ if noBaiduT
26
+ meta(http-equiv="Cache-Control" content="no-transform")
27
+ meta(http-equiv="Cache-Control" content="no-siteapp")
28
+
29
+ != feed_tag('rss.xml')
30
+ != feed_tag('atom.xml')
31
+ link(rel="alternate" type="application/json" title=siteTitle href=feedLink)
32
+ != _vendor_font()
33
+ if theme.custom.enable
34
+ != _local_fonts()
35
+ != _css('app.css')
36
+ script(src="https://unpkg.com/vue@3/dist/vue.global.js")
37
+ include pwa.pug
38
+ if twikooLink && !wl
39
+ != _css("twikoo.css")
40
+ script(src=twikooLink)
41
+ else if wl
42
+ link(rel="stylesheet" href="https://unpkg.com/@waline/client@v2/dist/waline.css")
43
+ script(nomodule src="https://unpkg.com/@waline/client@v2/dist/waline.js")
44
+ if theme.qweather.enable
45
+ style.
46
+ img[data-v-7d48daab] {
47
+ max-width: 2em !important;
48
+ }
49
+
50
+ if cssInjects
51
+ != css(cssInjects)
52
+
53
+ if jsInjects
54
+ != js(jsInjects)
@@ -0,0 +1,17 @@
1
+ - var keywords='',tmp=page?.tags?.toArray()
2
+ if tmp
3
+ each tag,index in tmp
4
+ - keywords += tag.name
5
+ - index++
6
+ - if (index < tmp.length) keywords += ','
7
+ if page.keywords
8
+ meta(name="keywords" content=page.keywords)
9
+ else if page.tags && page.tags.length
10
+ meta(name="keywords" content=keywords)
11
+ else if config.keywords
12
+ meta(name="keywords" content=config.keywords)
13
+
14
+ != canonical()
15
+
16
+ if theme.open_graph
17
+ != open_graph(theme.open_graph)
@@ -0,0 +1,17 @@
1
+ //- https://blog.cyfan.top/p/c0af86bb.html#%E5%AE%89%E8%A3%85-Install
2
+ if theme.pwa.enable
3
+ script(data-pjax async)
4
+ | if ('serviceWorker' in navigator) {
5
+ != `navigator.serviceWorker.register(\"/${theme.pwa.serviceworker}?time=${new Date().getTime()}\").then(async (reg) => {`
6
+ | if (window.localStorage.getItem('install') !== 'true') {
7
+ | window.localStorage.setItem('install', 'true');
8
+ | setTimeout(() => {
9
+ | window.location.reload()
10
+ | }, 500)
11
+ | }
12
+ | }).catch(err => {
13
+ | console.log(err)
14
+ | })
15
+ | ;
16
+ |}
17
+ link(rel="manifest" href=`/${theme.pwa.manifest}`)
@@ -0,0 +1,19 @@
1
+ nav(id="nav")
2
+ div(class="inner")
3
+ div(class="toggle")
4
+ div(class="lines" aria-label!=__('accessibility.nav_toggle'))
5
+ span(class="line")
6
+ span(class="line")
7
+ span(class="line")
8
+ ul(class="menu")
9
+ li(class="item title")
10
+ a(href=config.root rel="start")
11
+ != alternate || title
12
+ ul(class="right" id="rightNav")
13
+ li(class="item theme" @click="changeThemeByBtn")
14
+ i(class="ic" :class="{'i-sun': !themeStatus,'i-moon': themeStatus}")
15
+ li(class="item search")
16
+ i(class="ic i-search")
17
+ li(class="item weather")
18
+ div(id="he-plugin-simple")
19
+