hexo-theme-shokax 0.0.2-alpha1 → 0.0.2-alpha3
Sign up to get free protection for your applications and to get access to all the features.
- package/CODE_OF_CONDUCT.md +128 -0
- package/CONTRIBUTING.md +56 -0
- package/LICENSE +28 -28
- package/LICENSE-shoka +21 -21
- package/README.md +46 -53
- package/README_en.MD +25 -0
- package/_config.yml +392 -355
- package/_images.yml +100 -100
- package/languages/README.md +19 -19
- package/languages/default.yml +1 -1
- package/languages/en.yml +151 -151
- package/languages/ja.yml +146 -146
- package/languages/zh-CN.yml +154 -154
- package/languages/zh-HK.yml +146 -146
- package/languages/zh-TW.yml +146 -146
- 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 +37 -37
- package/layout/_mixin/comment.pug +66 -12
- package/layout/_mixin/postmeta.pug +30 -30
- package/layout/_mixin/segment.pug +32 -32
- package/layout/_mixin/sidebar.pug +36 -36
- package/layout/_mixin/widgets.pug +31 -29
- package/layout/_partials/footer.pug +40 -40
- package/layout/_partials/head/head.pug +51 -58
- package/layout/_partials/head/head_com.pug +17 -17
- package/layout/_partials/head/pwa.pug +18 -18
- package/layout/_partials/header.pug +18 -20
- package/layout/_partials/layout.pug +143 -153
- 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 +14 -14
- package/layout/_partials/post/nav.pug +13 -13
- package/layout/_partials/post/post.pug +28 -27
- package/layout/_partials/post/reward.pug +18 -18
- package/layout/_partials/sidebar/menu.pug +37 -37
- package/layout/_partials/sidebar/overview.pug +41 -42
- package/layout/_partials/third-party/baidu-analytics.pug +11 -11
- package/layout/_partials/third-party/clarity.pug +8 -8
- package/layout/archive.pug +118 -118
- package/layout/category.pug +63 -63
- package/layout/index.pug +33 -33
- package/layout/page.pug +56 -56
- package/layout/post.pug +35 -35
- package/layout/tag.pug +43 -43
- package/package.json +35 -35
- package/scripts/filters/locals.js +59 -59
- package/scripts/filters/post.js +23 -23
- package/scripts/generaters/archive.js +141 -141
- package/scripts/generaters/config.js +43 -43
- package/scripts/generaters/images.js +26 -26
- package/scripts/generaters/index.js +110 -110
- package/scripts/generaters/pages.js +19 -19
- package/scripts/generaters/script.js +89 -89
- package/scripts/helpers/asset.js +183 -237
- package/scripts/helpers/engine.js +190 -190
- package/scripts/helpers/list_categories.js +140 -140
- package/scripts/helpers/symbols_count_time.js +76 -76
- package/scripts/plugin/index.js +6 -6
- package/scripts/plugin/lib/injects-point.js +19 -19
- package/scripts/plugin/lib/injects.js +89 -88
- package/scripts/tags/links.js +86 -86
- package/scripts/tags/media.js +19 -19
- 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 +353 -353
- 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 +385 -385
- 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 +264 -264
- 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 +63 -63
- 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 +83 -83
- 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/valine.styl +548 -548
- package/source/css/_common/components/third-party/widgets.styl +57 -57
- package/source/css/_common/outline/footer/footer.styl +69 -69
- 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 +79 -79
- 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 +50 -50
- 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 +75 -75
- 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 +318 -318
- package/source/css/_common/scaffolding/base.styl +172 -172
- 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 +289 -289
- 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 +451 -451
- package/source/css/_mixins.styl +146 -146
- package/source/css/_variables.styl +89 -89
- package/source/css/app.styl +36 -38
- package/source/css/comment.styl +5 -5
- package/source/css/mermaid.styl +5 -5
- package/source/js/_app/components.js +330 -330
- package/source/js/_app/global.js +317 -317
- package/source/js/_app/library.js +302 -302
- package/source/js/_app/page.js +623 -623
- package/source/js/_app/player.js +748 -748
- package/source/js/_app/vue.js +43 -43
- package/layout/_partials/third-party/qweather.pug +0 -35
- package/source/css/plugin.styl +0 -174
@@ -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('/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>
|
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>
|
@@ -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
|
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>'
|
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>'
|
package/layout/_mixin/card.pug
CHANGED
@@ -1,37 +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'})
|
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'})
|
@@ -1,12 +1,66 @@
|
|
1
|
-
mixin CommentRender()
|
2
|
-
!= shokax_inject('comment')
|
3
|
-
- var tk = theme?.twikoo?.enable,wl = theme?.waline?.enable
|
4
|
-
if page.comment !== false
|
5
|
-
if tk
|
6
|
-
div(class="wrap" id="tcomments")
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
mixin CommentRender()
|
2
|
+
!= shokax_inject('comment')
|
3
|
+
- var tk = theme?.twikoo?.enable,wl = theme?.waline?.enable,gt=theme?.gitalk?.enable,gs=theme?.giscus?.enable
|
4
|
+
if page.comment !== false && !theme.experiments.disableThemeComment
|
5
|
+
if tk
|
6
|
+
div(class="wrap" id="tcomments")
|
7
|
+
script(type="text/javascript" data-pjax).
|
8
|
+
setTimeout(function () {
|
9
|
+
twikoo.init({
|
10
|
+
envId: '#{ hexo.theme.config.twikoo.envId }',
|
11
|
+
el: '#tcomments',
|
12
|
+
region: '#{hexo.theme.config.twikoo?.region}'
|
13
|
+
})
|
14
|
+
}, 1000)
|
15
|
+
else if wl
|
16
|
+
div(class="warp" id="wcomments")
|
17
|
+
script(type="module" data-pjax).
|
18
|
+
import { init } from 'https://unpkg.com/@waline/client@v2/dist/waline.mjs';
|
19
|
+
|
20
|
+
setTimeout(function () {
|
21
|
+
init({
|
22
|
+
el: '#wcomments',
|
23
|
+
serverURL: '#{hexo.theme.config.waline.serverURL}',
|
24
|
+
lang: '#{hexo.theme.config.waline?.lang || 'zh-CN'}',
|
25
|
+
locale: #{hexo.theme.config.waline?.locale || {}},
|
26
|
+
emoji: #{hexo.theme.config.waline?.emoji || []},
|
27
|
+
meta: #{hexo.theme.config.waline?.meta ?? ['nick', 'mail', 'link']},
|
28
|
+
requiredMeta: #{hexo.theme.config.waline?.requiredMeta ?? ['nick', 'mail']},
|
29
|
+
wordLimit: #{hexo.theme.config.waline?.wordLimit ?? 0},
|
30
|
+
pageSize: #{hexo.theme.config.waline?.pageSize || 10}
|
31
|
+
});
|
32
|
+
}, 1000)
|
33
|
+
else if gt
|
34
|
+
div(class="warp" id="gtcomments")
|
35
|
+
script(type="text/javascript" data-pjax).
|
36
|
+
const gitalk = new Gitalk({
|
37
|
+
clientID: '#{theme.gitalk.clientID}',
|
38
|
+
clientSecret: '#{theme.gitalk.clientSecret}',
|
39
|
+
repo: '#{theme.gitalk.repo}',
|
40
|
+
owner: '#{theme.gitalk.owner}',
|
41
|
+
admin: #{theme.gitalk.admin},
|
42
|
+
id: location.pathname, // Ensure uniqueness and length less than 50
|
43
|
+
distractionFreeMode: false, // Facebook-like distraction free mode
|
44
|
+
proxy: "#{theme.gitalk?.proxy || undefined}"
|
45
|
+
});
|
46
|
+
gitalk.render("gtcomments")
|
47
|
+
else if gs
|
48
|
+
div(class="warp giscus" id="gscomments")
|
49
|
+
script( src="https://giscus.app/client.js"
|
50
|
+
data-repo="#{theme.giscus.repo}"
|
51
|
+
data-repo-id="#{theme.giscus.repoId}"
|
52
|
+
data-category="#{theme.giscus.category}"
|
53
|
+
data-category-id="#{theme.giscus.categoryId}"
|
54
|
+
data-mapping="#{theme.giscus.mapping || "pathname" }"
|
55
|
+
data-strict="#{theme.giscus.strict || "1" }"
|
56
|
+
data-reactions-enabled="#{theme.giscus.reactionsEnabled || "1"}"
|
57
|
+
data-emit-metadata="#{theme.giscus.emitMetadata || "0"}"
|
58
|
+
data-input-position="#{theme.giscus.inputPosition || "bottom"}"
|
59
|
+
data-theme="#{theme.giscus.commentTheme || "preferred_color_scheme"}"
|
60
|
+
data-lang="#{theme.giscus.lang || "zh-CN"}"
|
61
|
+
data-loading="lazy"
|
62
|
+
crossorigin="anonymous"
|
63
|
+
async
|
64
|
+
)
|
65
|
+
|
66
|
+
|
@@ -1,30 +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'))
|
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'))
|
@@ -1,32 +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
|
-
|
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
|
+
|
@@ -1,36 +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")
|
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")
|
@@ -1,29 +1,31 @@
|
|
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
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
+
- var tk = theme?.twikoo?.enable
|
13
|
+
if theme.widgets.random_posts
|
14
|
+
div(class="rpost pjax")
|
15
|
+
h2
|
16
|
+
!= __('index.random_posts')
|
17
|
+
ul
|
18
|
+
- var posts = site.posts.shuffle().limit(10).toArray()
|
19
|
+
each item in posts
|
20
|
+
+field(item)
|
21
|
+
if theme.widgets.recent_comments
|
22
|
+
div(class="rpost pjax")
|
23
|
+
h2 最新评论
|
24
|
+
ul(class="leancloud-recent-comment" id="new-comment")
|
25
|
+
if tk
|
26
|
+
li(v-for="com in coms" class="item")
|
27
|
+
a(v-bind:href="com.href" data-pjax-state="data-pjax-state")
|
28
|
+
span(class="breadcrumb") {{com.nick}}@{{com.time}}
|
29
|
+
span {{com.text}}
|
30
|
+
br
|
31
|
+
|
@@ -1,40 +1,40 @@
|
|
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/', 'ShokaX'))
|
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
|
-
!= shokax_inject('footer')
|
40
|
-
|
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/', 'ShokaX'))
|
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
|
+
!= shokax_inject('footer')
|
40
|
+
|