hexo-theme-shokax 0.4.6-dev6 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- package/CODE_OF_CONDUCT.md +128 -128
- package/CONTRIBUTING.md +58 -58
- package/LICENSE +660 -660
- package/LICENSE-shoka +21 -21
- package/README.md +76 -99
- package/README_en.MD +75 -91
- package/UsageRestrictions.md +25 -25
- package/_config.yml +381 -381
- package/_images.yml +9 -9
- package/eslint.config.mjs +55 -55
- package/languages/README.md +19 -19
- package/languages/default.yml +1 -1
- package/languages/en.yml +153 -153
- package/languages/ja.yml +153 -153
- package/languages/zh-CN.yml +153 -153
- package/languages/zh-HK.yml +153 -153
- package/languages/zh-TW.yml +153 -153
- package/layout/_alternate/atom.ejs +30 -30
- package/layout/_alternate/json.ejs +16 -16
- package/layout/_alternate/rss.ejs +34 -34
- package/layout/_mixin/breadcrumb.pug +33 -33
- package/layout/_mixin/card.pug +38 -38
- package/layout/_mixin/comment.pug +6 -6
- package/layout/_mixin/postmeta.pug +29 -29
- package/layout/_mixin/segment.pug +35 -35
- package/layout/_mixin/sidebar.pug +40 -40
- package/layout/_mixin/widgets.pug +28 -28
- package/layout/_partials/footer.pug +43 -43
- package/layout/_partials/head/head.pug +55 -55
- package/layout/_partials/head/head_com.pug +24 -24
- package/layout/_partials/head/pwa.pug +18 -18
- package/layout/_partials/header.pug +18 -18
- package/layout/_partials/layout.pug +140 -140
- package/layout/_partials/loading.pug +13 -13
- package/layout/_partials/pagination.pug +4 -4
- package/layout/_partials/post/copyright.pug +20 -20
- package/layout/_partials/post/footer.pug +17 -17
- package/layout/_partials/post/nav.pug +13 -13
- package/layout/_partials/post/post.pug +41 -41
- package/layout/_partials/post/reward.pug +18 -18
- package/layout/_partials/sidebar/menu.pug +37 -37
- package/layout/_partials/sidebar/overview.pug +42 -42
- package/layout/_partials/third-party/baidu-analytics.pug +11 -11
- package/layout/_partials/third-party/clarity.pug +8 -8
- package/layout/_partials/third-party/google-analytics.pug +9 -9
- package/layout/archive.pug +118 -118
- package/layout/category.pug +59 -59
- package/layout/index.pug +33 -33
- package/layout/page.pug +55 -55
- package/layout/post.pug +36 -36
- package/layout/tag.pug +43 -43
- package/package.json +72 -72
- package/scripts/filters/locals.js +52 -0
- package/scripts/filters/post.js +5 -0
- package/scripts/generaters/archive.js +133 -0
- package/scripts/generaters/config.js +51 -0
- package/scripts/generaters/images.js +23 -0
- package/scripts/generaters/index.js +107 -0
- package/scripts/generaters/pages.js +15 -0
- package/scripts/generaters/script.js +156 -0
- package/scripts/helpers/asset.js +73 -0
- package/scripts/helpers/engine.js +177 -0
- package/scripts/helpers/list_categories.js +80 -0
- package/scripts/helpers/summary_ai.js +107 -0
- package/scripts/helpers/symbols_count_time.js +69 -0
- package/scripts/plugin/check.js +32 -0
- package/scripts/plugin/index.js +81 -0
- package/scripts/plugin/lib/injects-point.js +20 -0
- package/scripts/plugin/lib/injects.js +89 -0
- package/scripts/tags/links.js +44 -0
- package/scripts/tags/media.js +19 -0
- package/scripts/utils.js +13 -0
- package/source/assets/algolia_logo.svg +9 -9
- package/source/assets/logo.svg +16 -16
- package/source/css/_colors.styl +207 -207
- package/source/css/_common/components/components.styl +6 -6
- package/source/css/_common/components/highlight/highlight.styl +357 -357
- package/source/css/_common/components/highlight/operation.styl +21 -21
- package/source/css/_common/components/pages/collapse.styl +119 -119
- package/source/css/_common/components/pages/home.styl +391 -391
- package/source/css/_common/components/pages/pages.styl +56 -56
- package/source/css/_common/components/pages/tag-cloud.styl +12 -12
- package/source/css/_common/components/post/breadcrumb.styl +39 -39
- package/source/css/_common/components/post/copyright.styl +41 -41
- package/source/css/_common/components/post/expand.styl +263 -263
- package/source/css/_common/components/post/footer.styl +11 -11
- package/source/css/_common/components/post/header.styl +79 -79
- package/source/css/_common/components/post/nav.styl +64 -64
- package/source/css/_common/components/post/post.styl +29 -29
- package/source/css/_common/components/post/reward.styl +50 -50
- package/source/css/_common/components/post/rtl.styl +12 -12
- package/source/css/_common/components/post/tags.styl +39 -39
- package/source/css/_common/components/tags/collapse.styl +72 -72
- package/source/css/_common/components/tags/container.styl +49 -49
- package/source/css/_common/components/tags/label.styl +12 -12
- package/source/css/_common/components/tags/links.styl +77 -77
- package/source/css/_common/components/tags/list.styl +131 -131
- package/source/css/_common/components/tags/note.styl +70 -70
- package/source/css/_common/components/tags/player.styl +361 -361
- package/source/css/_common/components/tags/quiz.styl +200 -200
- package/source/css/_common/components/tags/tabs.styl +89 -89
- package/source/css/_common/components/tags/tags.styl +9 -9
- package/source/css/_common/components/third-party/loading.styl +222 -222
- package/source/css/_common/components/third-party/mermaid/class.styl +90 -90
- package/source/css/_common/components/third-party/mermaid/flowchart.styl +72 -72
- package/source/css/_common/components/third-party/mermaid/gantt.styl +251 -251
- package/source/css/_common/components/third-party/mermaid/git.styl +7 -7
- package/source/css/_common/components/third-party/mermaid/mermaid.styl +37 -37
- package/source/css/_common/components/third-party/mermaid/pie.styl +9 -9
- package/source/css/_common/components/third-party/mermaid/sequence.styl +95 -95
- package/source/css/_common/components/third-party/mermaid/state.styl +130 -130
- package/source/css/_common/components/third-party/pace.styl +18 -18
- package/source/css/_common/components/third-party/search.styl +167 -167
- package/source/css/_common/components/third-party/theme.styl +151 -151
- package/source/css/_common/components/third-party/third-party.styl +22 -22
- package/source/css/_common/components/third-party/widgets.styl +57 -57
- package/source/css/_common/outline/footer/footer.styl +67 -67
- package/source/css/_common/outline/header/brand.styl +77 -77
- package/source/css/_common/outline/header/header.styl +20 -20
- package/source/css/_common/outline/header/image.styl +85 -85
- package/source/css/_common/outline/header/menu.styl +117 -117
- package/source/css/_common/outline/header/nav.styl +81 -81
- package/source/css/_common/outline/header/right.styl +15 -15
- package/source/css/_common/outline/header/tool.styl +207 -207
- package/source/css/_common/outline/header/waves.styl +57 -57
- package/source/css/_common/outline/mobile.styl +46 -46
- package/source/css/_common/outline/outline.styl +78 -78
- package/source/css/_common/outline/sidebar/author.styl +59 -59
- package/source/css/_common/outline/sidebar/dimmer.styl +23 -23
- package/source/css/_common/outline/sidebar/menu.styl +63 -63
- package/source/css/_common/outline/sidebar/quick.styl +43 -43
- package/source/css/_common/outline/sidebar/related.styl +56 -56
- package/source/css/_common/outline/sidebar/sidebar.styl +80 -80
- package/source/css/_common/outline/sidebar/social.styl +69 -69
- package/source/css/_common/outline/sidebar/state.styl +37 -37
- package/source/css/_common/outline/sidebar/tab.styl +71 -71
- package/source/css/_common/outline/sidebar/toc.styl +47 -47
- package/source/css/_common/scaffolding/animate.styl +322 -322
- package/source/css/_common/scaffolding/base.styl +190 -190
- package/source/css/_common/scaffolding/buttons.styl +48 -48
- package/source/css/_common/scaffolding/divider.styl +36 -36
- package/source/css/_common/scaffolding/iconfont.styl +443 -443
- package/source/css/_common/scaffolding/normalize.styl +273 -273
- package/source/css/_common/scaffolding/pagination.styl +81 -81
- package/source/css/_common/scaffolding/ribbon.styl +38 -38
- package/source/css/_common/scaffolding/scaffolding.styl +14 -14
- package/source/css/_common/scaffolding/scrollbar.styl +37 -37
- package/source/css/_common/scaffolding/tables.styl +50 -50
- package/source/css/_common/scaffolding/tip.styl +19 -19
- package/source/css/_common/scaffolding/toggles.styl +59 -59
- package/source/css/_iconfont.styl +455 -455
- package/source/css/_mixins.styl +148 -148
- package/source/css/_variables.styl +89 -89
- package/source/css/app.styl +41 -41
- package/source/css/mermaid.styl +5 -5
- package/source/css/optimize.styl +5 -5
- package/source/js/_app/components/comments.ts +88 -88
- package/source/js/_app/components/sidebar.ts +239 -239
- package/source/js/_app/components/tcomments.ts +54 -54
- package/source/js/_app/globals/globalVars.ts +99 -99
- package/source/js/_app/globals/handles.ts +124 -124
- package/source/js/_app/globals/themeColor.ts +63 -63
- package/source/js/_app/globals/thirdparty.ts +63 -63
- package/source/js/_app/globals/tools.ts +75 -75
- package/source/js/_app/library/anime.ts +110 -110
- package/source/js/_app/library/declare.d.ts +128 -128
- package/source/js/_app/library/dom.ts +28 -28
- package/source/js/_app/library/loadFile.ts +47 -47
- package/source/js/_app/library/proto.ts +137 -137
- package/source/js/_app/library/scriptPjax.ts +72 -72
- package/source/js/_app/library/storage.ts +12 -12
- package/source/js/_app/library/vue.ts +49 -49
- package/source/js/_app/page/common.ts +43 -43
- package/source/js/_app/page/fancybox.ts +72 -72
- package/source/js/_app/page/post.ts +266 -266
- package/source/js/_app/page/search.ts +115 -115
- package/source/js/_app/page/tab.ts +60 -60
- package/source/js/_app/pjax/domInit.ts +97 -97
- package/source/js/_app/pjax/refresh.ts +140 -140
- package/source/js/_app/pjax/siteInit.ts +106 -106
- package/source/js/_app/player.ts +798 -798
- package/toolbox/compiler.mjs +10 -6
- package/toolbox/hoistdep.mjs +5 -5
- package/toolbox/lib.mjs +63 -63
- package/index.html +0 -231
- package/meta.json +0 -6431
@@ -1,16 +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('/assets/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) _%>
|
1
|
+
<%- JSON.stringify({
|
2
|
+
version: 'https://jsonfeed.org/version/1',
|
3
|
+
title: config.title,
|
4
|
+
subtitle: config.subtitle,
|
5
|
+
icon: full_url_for('/assets/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) _%>
|
@@ -1,34 +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('/assets/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>
|
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('/assets/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>
|
@@ -1,33 +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-1
|
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 - 1
|
32
|
-
i(class="ic i-angle-right")
|
33
|
-
!= '</div>'
|
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-1
|
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 - 1
|
32
|
+
i(class="ic i-angle-right")
|
33
|
+
!= '</div>'
|
package/layout/_mixin/card.pug
CHANGED
@@ -1,38 +1,38 @@
|
|
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 || item.path || __('post.untitled')
|
17
|
-
div(class="ribbon")
|
18
|
-
- var tempL = item.link || item.path
|
19
|
-
!= _url(tempL , postText + (postTitleIcon || ''), {itemprop: 'url', title: postText})
|
20
|
-
div(class="inner")
|
21
|
-
- var len = ''
|
22
|
-
if item.child
|
23
|
-
- len = _p('counter.index.category', item.child)
|
24
|
-
- len = len + _p('counter.index.post', item.length)
|
25
|
-
ul(class="posts")
|
26
|
-
each sub in item.subs
|
27
|
-
- var subname = sub.name || sub.title
|
28
|
-
li
|
29
|
-
a(title=subname href=url_for(sub.path))
|
30
|
-
= subname
|
31
|
-
div(class="meta footer")
|
32
|
-
if item.top
|
33
|
-
span
|
34
|
-
!= _url(item.top.path, '<i class="ic i-flag"></i>'+item.top.name, {itemprop: 'url', title: item.top.name})
|
35
|
-
span
|
36
|
-
i(class="ic i-file")
|
37
|
-
!= len
|
38
|
-
!= _url(item.path, 'more...', {itemprop: 'url', title: itemname, class: 'btn'})
|
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 || item.path || __('post.untitled')
|
17
|
+
div(class="ribbon")
|
18
|
+
- var tempL = item.link || item.path
|
19
|
+
!= _url(tempL , postText + (postTitleIcon || ''), {itemprop: 'url', title: postText})
|
20
|
+
div(class="inner")
|
21
|
+
- var len = ''
|
22
|
+
if item.child
|
23
|
+
- len = _p('counter.index.category', item.child)
|
24
|
+
- len = len + _p('counter.index.post', item.length)
|
25
|
+
ul(class="posts")
|
26
|
+
each sub in item.subs
|
27
|
+
- var subname = sub.name || sub.title
|
28
|
+
li
|
29
|
+
a(title=subname href=url_for(sub.path))
|
30
|
+
= subname
|
31
|
+
div(class="meta footer")
|
32
|
+
if item.top
|
33
|
+
span
|
34
|
+
!= _url(item.top.path, '<i class="ic i-flag"></i>'+item.top.name, {itemprop: 'url', title: item.top.name})
|
35
|
+
span
|
36
|
+
i(class="ic i-file")
|
37
|
+
!= len
|
38
|
+
!= _url(item.path, 'more...', {itemprop: 'url', title: itemname, class: 'btn'})
|
@@ -1,6 +1,6 @@
|
|
1
|
-
mixin CommentRender()
|
2
|
-
!= shokax_inject('comment')
|
3
|
-
if page.comment !== false
|
4
|
-
div(class="wrap" id="comments")
|
5
|
-
|
6
|
-
|
1
|
+
mixin CommentRender()
|
2
|
+
!= shokax_inject('comment')
|
3
|
+
if page.comment !== false
|
4
|
+
div(class="wrap" id="comments")
|
5
|
+
|
6
|
+
|
@@ -1,29 +1,29 @@
|
|
1
|
-
mixin PMRender(item, full)
|
2
|
-
- full ||= false
|
3
|
-
div(class="meta")
|
4
|
-
- var create_title = __('post.created') + __('symbol.colon') + full_date(item.date)
|
5
|
-
span(class="item" title=create_title)
|
6
|
-
span(class="icon")
|
7
|
-
i(class="ic i-calendar")
|
8
|
-
if full
|
9
|
-
span(class="text")
|
10
|
-
!= __('post.posted')
|
11
|
-
time(itemprop="dateCreated datePublished" datetime=moment(item.date).format())
|
12
|
-
!= date(item.date)
|
13
|
-
if theme.post.count
|
14
|
-
span(class="item" title=__('symbols_count_time.count'))
|
15
|
-
span(class="icon")
|
16
|
-
i(class="ic i-pen")
|
17
|
-
if full
|
18
|
-
span(class="text")
|
19
|
-
!= __('symbols_count_time.count')
|
20
|
-
span= symbolsCount(item)
|
21
|
-
span(class="text")
|
22
|
-
!= __('symbols_count_time.word')
|
23
|
-
span(class="item" title=__('symbols_count_time.time'))
|
24
|
-
span(class="icon")
|
25
|
-
i(class="ic i-clock")
|
26
|
-
if full
|
27
|
-
span(class="text")
|
28
|
-
!= __('symbols_count_time.time')
|
29
|
-
span= symbolsTime(item, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes'))
|
1
|
+
mixin PMRender(item, full)
|
2
|
+
- full ||= false
|
3
|
+
div(class="meta")
|
4
|
+
- var create_title = __('post.created') + __('symbol.colon') + full_date(item.date)
|
5
|
+
span(class="item" title=create_title)
|
6
|
+
span(class="icon")
|
7
|
+
i(class="ic i-calendar")
|
8
|
+
if full
|
9
|
+
span(class="text")
|
10
|
+
!= __('post.posted')
|
11
|
+
time(itemprop="dateCreated datePublished" datetime=moment(item.date).format())
|
12
|
+
!= date(item.date)
|
13
|
+
if theme.post.count
|
14
|
+
span(class="item" title=__('symbols_count_time.count'))
|
15
|
+
span(class="icon")
|
16
|
+
i(class="ic i-pen")
|
17
|
+
if full
|
18
|
+
span(class="text")
|
19
|
+
!= __('symbols_count_time.count')
|
20
|
+
span= symbolsCount(item)
|
21
|
+
span(class="text")
|
22
|
+
!= __('symbols_count_time.word')
|
23
|
+
span(class="item" title=__('symbols_count_time.time'))
|
24
|
+
span(class="icon")
|
25
|
+
i(class="ic i-clock")
|
26
|
+
if full
|
27
|
+
span(class="text")
|
28
|
+
!= __('symbols_count_time.time')
|
29
|
+
span= symbolsTime(item, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes'))
|
@@ -1,35 +1,35 @@
|
|
1
|
-
include postmeta.pug
|
2
|
-
|
3
|
-
mixin SMRender(item, lazy)
|
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
|
-
if lazy
|
15
|
-
!= _url(link1, '<img loading="lazy" decoding="async" data-src="'+ _cover(item) +'" alt="article cover">', {itemprop: 'url', title: postText})
|
16
|
-
else
|
17
|
-
!= _url(link1, '<img loading="eager" decoding="async" src="'+ _cover(item) +'" alt="article cover">', {itemprop: 'url', title: postText})
|
18
|
-
div(class="info")
|
19
|
-
+PMRender(item)
|
20
|
-
h3
|
21
|
-
!= _url(link1, postText + (postTitleIcon || ''), {itemprop: 'url', title: postText})
|
22
|
-
div(class="excerpt")
|
23
|
-
if item.description
|
24
|
-
!= item.description
|
25
|
-
else if item.excerpt
|
26
|
-
!= item.excerpt
|
27
|
-
else
|
28
|
-
!= _truncate(escape_html(_striptags(item.content)),300)
|
29
|
-
if item.categories.length > 0
|
30
|
-
div(class="meta footer")
|
31
|
-
span
|
32
|
-
- var lastcat = item.categories.last()
|
33
|
-
!= _url(lastcat.path, '<i class="ic i-flag"></i>' + lastcat.name, {itemprop: 'url', title: lastcat.name})
|
34
|
-
!= _url(link1, 'more...', {itemprop: 'url', title: postText, class: 'btn'})
|
35
|
-
|
1
|
+
include postmeta.pug
|
2
|
+
|
3
|
+
mixin SMRender(item, lazy)
|
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
|
+
if lazy
|
15
|
+
!= _url(link1, '<img loading="lazy" decoding="async" data-src="'+ _cover(item) +'" alt="article cover">', {itemprop: 'url', title: postText})
|
16
|
+
else
|
17
|
+
!= _url(link1, '<img loading="eager" decoding="async" src="'+ _cover(item) +'" alt="article cover">', {itemprop: 'url', title: postText})
|
18
|
+
div(class="info")
|
19
|
+
+PMRender(item)
|
20
|
+
h3
|
21
|
+
!= _url(link1, postText + (postTitleIcon || ''), {itemprop: 'url', title: postText})
|
22
|
+
div(class="excerpt")
|
23
|
+
if item.description
|
24
|
+
!= item.description
|
25
|
+
else if item.excerpt
|
26
|
+
!= item.excerpt
|
27
|
+
else
|
28
|
+
!= _truncate(escape_html(_striptags(item.content)),300)
|
29
|
+
if item.categories.length > 0
|
30
|
+
div(class="meta footer")
|
31
|
+
span
|
32
|
+
- var lastcat = item.categories.last()
|
33
|
+
!= _url(lastcat.path, '<i class="ic i-flag"></i>' + lastcat.name, {itemprop: 'url', title: lastcat.name})
|
34
|
+
!= _url(link1, 'more...', {itemprop: 'url', title: postText, class: 'btn'})
|
35
|
+
|
@@ -1,40 +1,40 @@
|
|
1
|
-
mixin sidebarRender(display_toc)
|
2
|
-
- var related = _category_posts(page)
|
3
|
-
if page && page.prev
|
4
|
-
- var prevlink = page?.prev_link
|
5
|
-
if !prevlink && is_home()
|
6
|
-
if page.prev === 1
|
7
|
-
- prevlink = '/'
|
8
|
-
else
|
9
|
-
- prevlink = `/page/${page.prev}/`
|
10
|
-
if is_page() || is_post()
|
11
|
-
- prevlink = page.prev.path
|
12
|
-
if page && page.next
|
13
|
-
- var nextlink = page?.next_link
|
14
|
-
if is_page() || is_post()
|
15
|
-
- nextlink = page.next.path
|
16
|
-
div(class="inner")
|
17
|
-
div(class="panels")
|
18
|
-
div(class="inner")
|
19
|
-
div(class="contents panel pjax" data-title=__('sidebar.toc'))
|
20
|
-
if display_toc
|
21
|
-
!= toc(page.content)
|
22
|
-
|
23
|
-
div(class="related panel pjax" data-title=__('sidebar.related'))
|
24
|
-
if related
|
25
|
-
ul
|
26
|
-
!= related
|
27
|
-
div(class="overview panel" data-title=__('sidebar.overview'))
|
28
|
-
!= partial('_partials/sidebar/overview.pug', {}, {cache: true})
|
29
|
-
ul(id="quick")
|
30
|
-
li(class="prev pjax")
|
31
|
-
if prevlink
|
32
|
-
!= _url(prevlink, '<i class="ic i-chevron-left"></i>', {rel: 'prev', title: __('post.prev')})
|
33
|
-
li(class="up")
|
34
|
-
i(class="ic i-arrow-up")
|
35
|
-
li(class="down")
|
36
|
-
i(class="ic i-arrow-down")
|
37
|
-
li(class="next pjax")
|
38
|
-
if nextlink
|
39
|
-
!= _url(nextlink, '<i class="ic i-chevron-right"></i>', {rel: 'next', title: __('post.next')})
|
40
|
-
li(class="percent")
|
1
|
+
mixin sidebarRender(display_toc)
|
2
|
+
- var related = _category_posts(page)
|
3
|
+
if page && page.prev
|
4
|
+
- var prevlink = page?.prev_link
|
5
|
+
if !prevlink && is_home()
|
6
|
+
if page.prev === 1
|
7
|
+
- prevlink = '/'
|
8
|
+
else
|
9
|
+
- prevlink = `/page/${page.prev}/`
|
10
|
+
if is_page() || is_post()
|
11
|
+
- prevlink = page.prev.path
|
12
|
+
if page && page.next
|
13
|
+
- var nextlink = page?.next_link
|
14
|
+
if is_page() || is_post()
|
15
|
+
- nextlink = page.next.path
|
16
|
+
div(class="inner")
|
17
|
+
div(class="panels")
|
18
|
+
div(class="inner")
|
19
|
+
div(class="contents panel pjax" data-title=__('sidebar.toc'))
|
20
|
+
if display_toc
|
21
|
+
!= toc(page.content)
|
22
|
+
|
23
|
+
div(class="related panel pjax" data-title=__('sidebar.related'))
|
24
|
+
if related
|
25
|
+
ul
|
26
|
+
!= related
|
27
|
+
div(class="overview panel" data-title=__('sidebar.overview'))
|
28
|
+
!= partial('_partials/sidebar/overview.pug', {}, {cache: true})
|
29
|
+
ul(id="quick")
|
30
|
+
li(class="prev pjax")
|
31
|
+
if prevlink
|
32
|
+
!= _url(prevlink, '<i class="ic i-chevron-left"></i>', {rel: 'prev', title: __('post.prev')})
|
33
|
+
li(class="up")
|
34
|
+
i(class="ic i-arrow-up")
|
35
|
+
li(class="down")
|
36
|
+
i(class="ic i-arrow-down")
|
37
|
+
li(class="next pjax")
|
38
|
+
if nextlink
|
39
|
+
!= _url(nextlink, '<i class="ic i-chevron-right"></i>', {rel: 'next', title: __('post.next')})
|
40
|
+
li(class="percent")
|
@@ -1,28 +1,28 @@
|
|
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
|
-
- var tk = theme?.twikoo?.enable
|
13
|
-
- var waline = theme.waline.enable
|
14
|
-
if theme.widgets.random_posts
|
15
|
-
div(class="rpost pjax")
|
16
|
-
h2
|
17
|
-
!= __('index.random_posts')
|
18
|
-
ul
|
19
|
-
- var posts = site.posts.shuffle().limit(10).toArray()
|
20
|
-
each item in posts
|
21
|
-
+field(item)
|
22
|
-
if theme.widgets.recent_comments
|
23
|
-
div(class="rpost pjax")
|
24
|
-
h2
|
25
|
-
!= __('index.recent_comments')
|
26
|
-
if tk || waline
|
27
|
-
ul(class="leancloud-recent-comment" id="new-comment")
|
28
|
-
|
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
|
+
- var tk = theme?.twikoo?.enable
|
13
|
+
- var waline = theme.waline.enable
|
14
|
+
if theme.widgets.random_posts
|
15
|
+
div(class="rpost pjax")
|
16
|
+
h2
|
17
|
+
!= __('index.random_posts')
|
18
|
+
ul
|
19
|
+
- var posts = site.posts.shuffle().limit(10).toArray()
|
20
|
+
each item in posts
|
21
|
+
+field(item)
|
22
|
+
if theme.widgets.recent_comments
|
23
|
+
div(class="rpost pjax")
|
24
|
+
h2
|
25
|
+
!= __('index.recent_comments')
|
26
|
+
if tk || waline
|
27
|
+
ul(class="leancloud-recent-comment" id="new-comment")
|
28
|
+
|
@@ -1,43 +1,43 @@
|
|
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
|
-
!= `© ${theme.footer.since} -`
|
6
|
-
span(itemprop="copyrightYear")
|
7
|
-
!= copyright_year
|
8
|
-
span(class="with-love")
|
9
|
-
i(class=`ic i-${ theme.footer.icon.name }`)
|
10
|
-
span(class="author" itemprop="copyrightHolder")
|
11
|
-
!= `${author} @ ${ alternate?alternate:title}`
|
12
|
-
if theme.footer.count
|
13
|
-
div(class="count")
|
14
|
-
span(class="post-meta-item-icon")
|
15
|
-
i(class="ic i-chart-area")
|
16
|
-
span(title=__('symbols_count_time.count_total'))
|
17
|
-
!= `${ symbolsCountTotal(site) } ${__('symbols_count_time.word')}`
|
18
|
-
span(class="post-meta-divider")
|
19
|
-
!= " | "
|
20
|
-
span(class="post-meta-item-icon")
|
21
|
-
i(class="ic i-coffee")
|
22
|
-
span(title=__('symbols_count_time.time_total'))
|
23
|
-
!= symbolsTimeTotal(site, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes'))
|
24
|
-
//- span(id="timeDate")
|
25
|
-
//- span(id="times")
|
26
|
-
if theme.footer.powered
|
27
|
-
div(class="powered-by")
|
28
|
-
!= __('footer.powered', _url('https://hexo.io', 'Hexo') + ' & Theme.' + _url('https://github.com/theme-shoka-x/hexo-theme-shokaX/', 'ShokaX'))
|
29
|
-
if theme.footer.icp.enable
|
30
|
-
br
|
31
|
-
span(style="display:inline;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:var(--grey-5);")
|
32
|
-
a(href="https://beian.miit.gov.cn")
|
33
|
-
!= theme.footer.icp.icpnumber
|
34
|
-
- var beianN = theme.footer.icp?.beian, RC=theme.footer.icp?.recordcode
|
35
|
-
if beianN && RC
|
36
|
-
br
|
37
|
-
a(target="_blank" href=`https://beian.mps.gov.cn/#/query/webSearch?code=${RC}`)
|
38
|
-
img(loading="lazy" decoding="async" data-src=theme.statics + theme.assets + '/' + theme.footer.icp.icon style="max-width: 2em;display:inline;" width="20" height="20" alt="备案")
|
39
|
-
!= beianN
|
40
|
-
!= shokax_inject('status')
|
41
|
-
|
42
|
-
!= shokax_inject('footer')
|
43
|
-
|
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
|
+
!= `© ${theme.footer.since} -`
|
6
|
+
span(itemprop="copyrightYear")
|
7
|
+
!= copyright_year
|
8
|
+
span(class="with-love")
|
9
|
+
i(class=`ic i-${ theme.footer.icon.name }`)
|
10
|
+
span(class="author" itemprop="copyrightHolder")
|
11
|
+
!= `${author} @ ${ alternate?alternate:title}`
|
12
|
+
if theme.footer.count
|
13
|
+
div(class="count")
|
14
|
+
span(class="post-meta-item-icon")
|
15
|
+
i(class="ic i-chart-area")
|
16
|
+
span(title=__('symbols_count_time.count_total'))
|
17
|
+
!= `${ symbolsCountTotal(site) } ${__('symbols_count_time.word')}`
|
18
|
+
span(class="post-meta-divider")
|
19
|
+
!= " | "
|
20
|
+
span(class="post-meta-item-icon")
|
21
|
+
i(class="ic i-coffee")
|
22
|
+
span(title=__('symbols_count_time.time_total'))
|
23
|
+
!= symbolsTimeTotal(site, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes'))
|
24
|
+
//- span(id="timeDate")
|
25
|
+
//- span(id="times")
|
26
|
+
if theme.footer.powered
|
27
|
+
div(class="powered-by")
|
28
|
+
!= __('footer.powered', _url('https://hexo.io', 'Hexo') + ' & Theme.' + _url('https://github.com/theme-shoka-x/hexo-theme-shokaX/', 'ShokaX'))
|
29
|
+
if theme.footer.icp.enable
|
30
|
+
br
|
31
|
+
span(style="display:inline;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:var(--grey-5);")
|
32
|
+
a(href="https://beian.miit.gov.cn")
|
33
|
+
!= theme.footer.icp.icpnumber
|
34
|
+
- var beianN = theme.footer.icp?.beian, RC=theme.footer.icp?.recordcode
|
35
|
+
if beianN && RC
|
36
|
+
br
|
37
|
+
a(target="_blank" href=`https://beian.mps.gov.cn/#/query/webSearch?code=${RC}`)
|
38
|
+
img(loading="lazy" decoding="async" data-src=theme.statics + theme.assets + '/' + theme.footer.icp.icon style="max-width: 2em;display:inline;" width="20" height="20" alt="备案")
|
39
|
+
!= beianN
|
40
|
+
!= shokax_inject('status')
|
41
|
+
|
42
|
+
!= shokax_inject('footer')
|
43
|
+
|