hexo-theme-shokax 0.3.13 → 0.3.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. package/CODE_OF_CONDUCT.md +128 -128
  2. package/CONTRIBUTING.md +58 -58
  3. package/LICENSE +660 -660
  4. package/LICENSE-shoka +21 -21
  5. package/README.md +99 -99
  6. package/README_en.MD +90 -90
  7. package/UsageRestrictions.md +25 -25
  8. package/_config.yml +370 -370
  9. package/_images.yml +9 -9
  10. package/languages/README.md +19 -19
  11. package/languages/default.yml +1 -1
  12. package/languages/en.yml +153 -153
  13. package/languages/ja.yml +153 -153
  14. package/languages/zh-CN.yml +153 -153
  15. package/languages/zh-HK.yml +153 -153
  16. package/languages/zh-TW.yml +153 -153
  17. package/layout/_alternate/atom.ejs +30 -30
  18. package/layout/_alternate/json.ejs +16 -16
  19. package/layout/_alternate/rss.ejs +34 -34
  20. package/layout/_mixin/breadcrumb.pug +33 -33
  21. package/layout/_mixin/card.pug +38 -38
  22. package/layout/_mixin/comment.pug +41 -41
  23. package/layout/_mixin/postmeta.pug +29 -29
  24. package/layout/_mixin/segment.pug +32 -32
  25. package/layout/_mixin/sidebar.pug +40 -40
  26. package/layout/_mixin/widgets.pug +33 -33
  27. package/layout/_partials/footer.pug +42 -42
  28. package/layout/_partials/head/head.pug +57 -57
  29. package/layout/_partials/head/head_com.pug +17 -17
  30. package/layout/_partials/head/pwa.pug +18 -18
  31. package/layout/_partials/header.pug +18 -18
  32. package/layout/_partials/layout.pug +139 -139
  33. package/layout/_partials/loading.pug +13 -13
  34. package/layout/_partials/pagination.pug +4 -4
  35. package/layout/_partials/post/copyright.pug +20 -20
  36. package/layout/_partials/post/footer.pug +25 -25
  37. package/layout/_partials/post/nav.pug +13 -13
  38. package/layout/_partials/post/post.pug +41 -41
  39. package/layout/_partials/post/reward.pug +18 -18
  40. package/layout/_partials/sidebar/menu.pug +37 -37
  41. package/layout/_partials/sidebar/overview.pug +42 -42
  42. package/layout/_partials/third-party/baidu-analytics.pug +11 -11
  43. package/layout/_partials/third-party/clarity.pug +8 -8
  44. package/layout/_partials/third-party/google-analytics.pug +9 -9
  45. package/layout/archive.pug +118 -118
  46. package/layout/category.pug +59 -59
  47. package/layout/index.pug +33 -33
  48. package/layout/page.pug +55 -55
  49. package/layout/post.pug +36 -36
  50. package/layout/tag.pug +43 -43
  51. package/package.json +47 -47
  52. package/scripts/helpers/asset.js +61 -61
  53. package/scripts/plugin/check.js +2 -2
  54. package/scripts/tags/links.js +4 -4
  55. package/source/assets/algolia_logo.svg +9 -9
  56. package/source/assets/logo.svg +16 -16
  57. package/source/css/_colors.styl +207 -207
  58. package/source/css/_common/components/components.styl +6 -6
  59. package/source/css/_common/components/highlight/highlight.styl +357 -357
  60. package/source/css/_common/components/highlight/operation.styl +21 -21
  61. package/source/css/_common/components/pages/collapse.styl +119 -119
  62. package/source/css/_common/components/pages/home.styl +391 -391
  63. package/source/css/_common/components/pages/pages.styl +56 -56
  64. package/source/css/_common/components/pages/tag-cloud.styl +12 -12
  65. package/source/css/_common/components/post/breadcrumb.styl +39 -39
  66. package/source/css/_common/components/post/copyright.styl +41 -41
  67. package/source/css/_common/components/post/expand.styl +263 -263
  68. package/source/css/_common/components/post/footer.styl +11 -11
  69. package/source/css/_common/components/post/header.styl +79 -79
  70. package/source/css/_common/components/post/nav.styl +63 -63
  71. package/source/css/_common/components/post/post.styl +29 -29
  72. package/source/css/_common/components/post/reward.styl +50 -50
  73. package/source/css/_common/components/post/rtl.styl +12 -12
  74. package/source/css/_common/components/post/tags.styl +39 -39
  75. package/source/css/_common/components/tags/collapse.styl +72 -72
  76. package/source/css/_common/components/tags/container.styl +49 -49
  77. package/source/css/_common/components/tags/label.styl +12 -12
  78. package/source/css/_common/components/tags/links.styl +77 -77
  79. package/source/css/_common/components/tags/list.styl +131 -131
  80. package/source/css/_common/components/tags/note.styl +70 -70
  81. package/source/css/_common/components/tags/player.styl +361 -361
  82. package/source/css/_common/components/tags/quiz.styl +200 -200
  83. package/source/css/_common/components/tags/tabs.styl +89 -89
  84. package/source/css/_common/components/tags/tags.styl +9 -9
  85. package/source/css/_common/components/third-party/loading.styl +222 -222
  86. package/source/css/_common/components/third-party/mermaid/class.styl +90 -90
  87. package/source/css/_common/components/third-party/mermaid/flowchart.styl +72 -72
  88. package/source/css/_common/components/third-party/mermaid/gantt.styl +251 -251
  89. package/source/css/_common/components/third-party/mermaid/git.styl +7 -7
  90. package/source/css/_common/components/third-party/mermaid/mermaid.styl +37 -37
  91. package/source/css/_common/components/third-party/mermaid/pie.styl +9 -9
  92. package/source/css/_common/components/third-party/mermaid/sequence.styl +95 -95
  93. package/source/css/_common/components/third-party/mermaid/state.styl +130 -130
  94. package/source/css/_common/components/third-party/pace.styl +18 -18
  95. package/source/css/_common/components/third-party/search.styl +167 -167
  96. package/source/css/_common/components/third-party/theme.styl +151 -151
  97. package/source/css/_common/components/third-party/third-party.styl +22 -22
  98. package/source/css/_common/components/third-party/widgets.styl +57 -57
  99. package/source/css/_common/outline/footer/footer.styl +69 -69
  100. package/source/css/_common/outline/header/brand.styl +77 -77
  101. package/source/css/_common/outline/header/header.styl +20 -20
  102. package/source/css/_common/outline/header/image.styl +85 -85
  103. package/source/css/_common/outline/header/menu.styl +117 -117
  104. package/source/css/_common/outline/header/nav.styl +81 -81
  105. package/source/css/_common/outline/header/right.styl +15 -15
  106. package/source/css/_common/outline/header/tool.styl +207 -207
  107. package/source/css/_common/outline/header/waves.styl +57 -57
  108. package/source/css/_common/outline/mobile.styl +46 -46
  109. package/source/css/_common/outline/outline.styl +78 -78
  110. package/source/css/_common/outline/sidebar/author.styl +59 -59
  111. package/source/css/_common/outline/sidebar/dimmer.styl +23 -23
  112. package/source/css/_common/outline/sidebar/menu.styl +63 -63
  113. package/source/css/_common/outline/sidebar/quick.styl +43 -43
  114. package/source/css/_common/outline/sidebar/related.styl +56 -56
  115. package/source/css/_common/outline/sidebar/sidebar.styl +75 -75
  116. package/source/css/_common/outline/sidebar/social.styl +69 -69
  117. package/source/css/_common/outline/sidebar/state.styl +37 -37
  118. package/source/css/_common/outline/sidebar/tab.styl +71 -71
  119. package/source/css/_common/outline/sidebar/toc.styl +47 -47
  120. package/source/css/_common/scaffolding/animate.styl +322 -322
  121. package/source/css/_common/scaffolding/base.styl +190 -190
  122. package/source/css/_common/scaffolding/buttons.styl +48 -48
  123. package/source/css/_common/scaffolding/divider.styl +36 -36
  124. package/source/css/_common/scaffolding/iconfont.styl +443 -443
  125. package/source/css/_common/scaffolding/normalize.styl +273 -273
  126. package/source/css/_common/scaffolding/pagination.styl +81 -81
  127. package/source/css/_common/scaffolding/ribbon.styl +38 -38
  128. package/source/css/_common/scaffolding/scaffolding.styl +14 -14
  129. package/source/css/_common/scaffolding/scrollbar.styl +37 -37
  130. package/source/css/_common/scaffolding/tables.styl +50 -50
  131. package/source/css/_common/scaffolding/tip.styl +19 -19
  132. package/source/css/_common/scaffolding/toggles.styl +59 -59
  133. package/source/css/_iconfont.styl +455 -455
  134. package/source/css/_mixins.styl +148 -148
  135. package/source/css/_variables.styl +89 -89
  136. package/source/css/app.styl +41 -41
  137. package/source/css/comment.styl +3 -3
  138. package/source/css/mermaid.styl +5 -5
  139. package/source/css/optimize.styl +5 -5
  140. package/source/js/_app/pjax/refresh.js +1 -1
package/layout/page.pug CHANGED
@@ -1,55 +1,55 @@
1
- extends _partials/layout.pug
2
- include _mixin/sidebar.pug
3
- include _mixin/comment.pug
4
-
5
- block title
6
- if page.type === 'categories'
7
- != __('title.all') + __('title.category')
8
- else if page.type === 'tags'
9
- != __('title.all') + __('title.tag')
10
- else if page.type === '404'
11
- != __('title.not_found')
12
- else
13
- != page.title
14
-
15
- block header
16
- h1(itemprop="name headline")
17
- if page.link
18
- - var postTitleIcon = '<i class="ic i-link-alt"></i>'
19
- - var postText = page.title || page.link
20
- != _url(page.link, postText + postTitleIcon, {class: 'link external', itemprop: 'url'})
21
- else
22
- if page.type === 'categories'
23
- != __('title.all') + __('title.category')
24
- else if page.type === 'tags'
25
- != __('title.all') + __('title.tag')
26
- else if page.type === '404'
27
- != __('title.not_found')
28
- else
29
- != page.title
30
-
31
- block content
32
- if page.type === 'categories'
33
- div(class="collapse wrap")
34
- h2(class="item title")
35
- a(href=url_for(site.path))
36
- != __('menu.home')
37
- small
38
- != _p('counter.categories', site.categories.length)
39
- != _list_categories(3)
40
- else if page.type === 'tags'
41
- div(class="collapse wrap")
42
- h2(class="item title")
43
- a(href=url_for(site.path))
44
- != __('menu.home')
45
- small
46
- != _p('counter.tag_cloud', site.tags.length)
47
- div(class="tag cloud")
48
- != tagcloud({min_font: theme.tagcloud.min,max_font: theme.tagcloud.max,amount: theme.tagcloud.amount,color: true,start_color: theme.tagcloud.start,end_color: theme.tagcloud.end})
49
- else
50
- div(class="page wrap")
51
- != partial('_partials/post/post.pug', {post: page})
52
- +CommentRender
53
-
54
- block sidebar
55
- +sidebarRender(true)
1
+ extends _partials/layout.pug
2
+ include _mixin/sidebar.pug
3
+ include _mixin/comment.pug
4
+
5
+ block title
6
+ if page.type === 'categories'
7
+ != __('title.all') + __('title.category')
8
+ else if page.type === 'tags'
9
+ != __('title.all') + __('title.tag')
10
+ else if page.type === '404'
11
+ != __('title.not_found')
12
+ else
13
+ != page.title
14
+
15
+ block header
16
+ h1(itemprop="name headline")
17
+ if page.link
18
+ - var postTitleIcon = '<i class="ic i-link-alt"></i>'
19
+ - var postText = page.title || page.link
20
+ != _url(page.link, postText + postTitleIcon, {class: 'link external', itemprop: 'url'})
21
+ else
22
+ if page.type === 'categories'
23
+ != __('title.all') + __('title.category')
24
+ else if page.type === 'tags'
25
+ != __('title.all') + __('title.tag')
26
+ else if page.type === '404'
27
+ != __('title.not_found')
28
+ else
29
+ != page.title
30
+
31
+ block content
32
+ if page.type === 'categories'
33
+ div(class="collapse wrap")
34
+ h2(class="item title")
35
+ a(href=url_for(site.path))
36
+ != __('menu.home')
37
+ small
38
+ != _p('counter.categories', site.categories.length)
39
+ != _list_categories(3)
40
+ else if page.type === 'tags'
41
+ div(class="collapse wrap")
42
+ h2(class="item title")
43
+ a(href=url_for(site.path))
44
+ != __('menu.home')
45
+ small
46
+ != _p('counter.tag_cloud', site.tags.length)
47
+ div(class="tag cloud")
48
+ != tagcloud({min_font: theme.tagcloud.min,max_font: theme.tagcloud.max,amount: theme.tagcloud.amount,color: true,start_color: theme.tagcloud.start,end_color: theme.tagcloud.end})
49
+ else
50
+ div(class="page wrap")
51
+ != partial('_partials/post/post.pug', {post: page})
52
+ +CommentRender
53
+
54
+ block sidebar
55
+ +sidebarRender(true)
package/layout/post.pug CHANGED
@@ -1,36 +1,36 @@
1
- extends _partials/layout.pug
2
- include _mixin/sidebar.pug
3
- include _mixin/comment.pug
4
- include _mixin/postmeta.pug
5
-
6
- block title
7
- - var page_title = page.title
8
- if page.categories && page.categories.length
9
- - var cat_list = ''
10
- - var comma = ''
11
- each cat in page.categories.toArray()
12
- - var cat_list = cat.name + comma + cat_list
13
- - var comma = ' - '
14
- if cat_list.length !== 0
15
- - var page_title = page.title + ' - ' + cat_list
16
- != `${page_title}`
17
-
18
- block header
19
- h1(itemprop="name headline")
20
- if page.link
21
- - var postTitleIcon = '<i class="ic i-link-alt"></i>'
22
- - var postText = page.title || page.link
23
- != _url(page.link, postText + postTitleIcon, {class: 'link external', itemprop: 'url'})
24
- else
25
- != page.title
26
- +PMRender(page, true)
27
-
28
- block content
29
- div(class="article wrap")
30
- +BCRender(page, true)
31
- != partial('_partials/post/post.pug', {post: page})
32
- != partial('_partials/post/nav.pug', {post: page})
33
- +CommentRender
34
-
35
- block sidebar
36
- +sidebarRender(true)
1
+ extends _partials/layout.pug
2
+ include _mixin/sidebar.pug
3
+ include _mixin/comment.pug
4
+ include _mixin/postmeta.pug
5
+
6
+ block title
7
+ - var page_title = page.title
8
+ if page.categories && page.categories.length
9
+ - var cat_list = ''
10
+ - var comma = ''
11
+ each cat in page.categories.toArray()
12
+ - var cat_list = cat.name + comma + cat_list
13
+ - var comma = ' - '
14
+ if cat_list.length !== 0
15
+ - var page_title = page.title + ' - ' + cat_list
16
+ != `${page_title}`
17
+
18
+ block header
19
+ h1(itemprop="name headline")
20
+ if page.link
21
+ - var postTitleIcon = '<i class="ic i-link-alt"></i>'
22
+ - var postText = page.title || page.link
23
+ != _url(page.link, postText + postTitleIcon, {class: 'link external', itemprop: 'url'})
24
+ else
25
+ != page.title
26
+ +PMRender(page, true)
27
+
28
+ block content
29
+ div(class="article wrap")
30
+ +BCRender(page, true)
31
+ != partial('_partials/post/post.pug', {post: page})
32
+ != partial('_partials/post/nav.pug', {post: page})
33
+ +CommentRender
34
+
35
+ block sidebar
36
+ +sidebarRender(true)
package/layout/tag.pug CHANGED
@@ -1,43 +1,43 @@
1
- extends ./_partials/layout.pug
2
-
3
- block title
4
- != `${__('title.tag')}${__('symbol.colon')}${page.tag}`
5
-
6
- block header
7
- h1(itemprop="name headline")
8
- != _p('title.tag_in', page.tag)
9
-
10
- block content
11
- div(class="collapse wrap")
12
- h2(class="item header")
13
- a(href=url_for(config.tag_dir))
14
- != __('title.all')
15
- small /
16
- != page.tag
17
- small
18
- != __('title.tag')
19
- - var posts = page.posts
20
- each post in posts.toArray()
21
- article(class="item normal" itemscope itemtype="http://schema.org/Article")
22
- div(class="meta")
23
- time(itemprop="dateCreated"
24
- datetime=moment(post.date).format()
25
- content=date(post.date, config.date_format))
26
- != date(post.date, 'YYYY-MM-DD')
27
- if post.categories && post.categories.length
28
- - var cat_length = post.categories.length
29
- each cat,index in post.categories.toArray()
30
- if index === cat_length && cat.name !== page.category
31
- span
32
- a(href=url_for(cat.path))
33
- != cat.name
34
- div(class="title")
35
- if post.link
36
- - var postTitleIcon = '<i class="ic i-link-alt"></i>'
37
- - var postText = post.title || post.link
38
- != _url(post.link, postText + postTitleIcon, {class: 'external', itemprop: 'url'})
39
- else
40
- a(href=url_for(post.path) itemprop="url")
41
- span(itemprop="name")
42
- != post.title || __('post.untitled')
43
- include _partials/pagination.pug
1
+ extends ./_partials/layout.pug
2
+
3
+ block title
4
+ != `${__('title.tag')}${__('symbol.colon')}${page.tag}`
5
+
6
+ block header
7
+ h1(itemprop="name headline")
8
+ != _p('title.tag_in', page.tag)
9
+
10
+ block content
11
+ div(class="collapse wrap")
12
+ h2(class="item header")
13
+ a(href=url_for(config.tag_dir))
14
+ != __('title.all')
15
+ small /
16
+ != page.tag
17
+ small
18
+ != __('title.tag')
19
+ - var posts = page.posts
20
+ each post in posts.toArray()
21
+ article(class="item normal" itemscope itemtype="http://schema.org/Article")
22
+ div(class="meta")
23
+ time(itemprop="dateCreated"
24
+ datetime=moment(post.date).format()
25
+ content=date(post.date, config.date_format))
26
+ != date(post.date, 'YYYY-MM-DD')
27
+ if post.categories && post.categories.length
28
+ - var cat_length = post.categories.length
29
+ each cat,index in post.categories.toArray()
30
+ if index === cat_length && cat.name !== page.category
31
+ span
32
+ a(href=url_for(cat.path))
33
+ != cat.name
34
+ div(class="title")
35
+ if post.link
36
+ - var postTitleIcon = '<i class="ic i-link-alt"></i>'
37
+ - var postText = post.title || post.link
38
+ != _url(post.link, postText + postTitleIcon, {class: 'external', itemprop: 'url'})
39
+ else
40
+ a(href=url_for(post.path) itemprop="url")
41
+ span(itemprop="name")
42
+ != post.title || __('post.untitled')
43
+ include _partials/pagination.pug
package/package.json CHANGED
@@ -1,47 +1,47 @@
1
- {
2
- "name": "hexo-theme-shokax",
3
- "version": "0.3.13",
4
- "description": "a hexo theme based on shoka",
5
- "main": "index.js",
6
- "repository": "https://github.com/theme-shoka-x/hexo-theme-shokaX",
7
- "author": "zkz098",
8
- "license": "AGPL-3.0-or-later",
9
- "packageManager": "pnpm@8.14.1",
10
- "scripts": {
11
- "test": "tsc --build --verbose",
12
- "build": "cd ./source && tsc --build --verbose && cd ../scripts && tsc --build --verbose"
13
- },
14
- "devDependencies": {
15
- "@types/fancybox": "^3.5.6",
16
- "@types/jquery": "^3.5.29",
17
- "@types/js-yaml": "^4.0.9",
18
- "@types/node": "^20.11.10",
19
- "@typescript-eslint/eslint-plugin": "^6.19.1",
20
- "@typescript-eslint/parser": "^6.19.1",
21
- "eslint": "^8.56.0",
22
- "eslint-config-standard": "~17",
23
- "eslint-plugin-import": "^2.29.1",
24
- "eslint-plugin-n": "^16.6.2",
25
- "eslint-plugin-promise": "^6.1.1",
26
- "eslint-plugin-vue": "^9.20.1",
27
- "instantsearch.js": "^4.64.1",
28
- "typescript": "^5.3.3",
29
- "vue": "^3.4.15"
30
- },
31
- "dependencies": {
32
- "esbuild": "^0.20.0",
33
- "hexo": "7.0.0",
34
- "hexo-fs": "^4.1.1",
35
- "hexo-pagination": "^3.0.0",
36
- "hexo-util": "^3.2.0",
37
- "js-yaml": "^4.1.0",
38
- "mouse-firework": "^0.0.5",
39
- "theme-shokax-anime": "^0.0.6",
40
- "theme-shokax-pjax": "^0.0.3",
41
- "unlazy": "^0.10.4"
42
- },
43
- "engines": {
44
- "node": ">=18.0.0"
45
- },
46
- "engineStrict": true
47
- }
1
+ {
2
+ "name": "hexo-theme-shokax",
3
+ "version": "0.3.15",
4
+ "description": "a hexo theme based on shoka",
5
+ "main": "index.js",
6
+ "repository": "https://github.com/theme-shoka-x/hexo-theme-shokaX",
7
+ "author": "zkz098",
8
+ "license": "AGPL-3.0-or-later",
9
+ "packageManager": "pnpm@8.14.1",
10
+ "scripts": {
11
+ "test": "tsc --build --verbose",
12
+ "build": "cd ./source && tsc --build --verbose && cd ../scripts && tsc --build --verbose"
13
+ },
14
+ "devDependencies": {
15
+ "@types/fancybox": "^3.5.6",
16
+ "@types/jquery": "^3.5.29",
17
+ "@types/js-yaml": "^4.0.9",
18
+ "@types/node": "^20.11.10",
19
+ "@typescript-eslint/eslint-plugin": "^6.19.1",
20
+ "@typescript-eslint/parser": "^6.19.1",
21
+ "eslint": "^8.56.0",
22
+ "eslint-config-standard": "~17",
23
+ "eslint-plugin-import": "^2.29.1",
24
+ "eslint-plugin-n": "^16.6.2",
25
+ "eslint-plugin-promise": "^6.1.1",
26
+ "eslint-plugin-vue": "^9.20.1",
27
+ "instantsearch.js": "^4.64.1",
28
+ "typescript": "^5.3.3",
29
+ "vue": "^3.4.15"
30
+ },
31
+ "dependencies": {
32
+ "esbuild": "^0.20.0",
33
+ "hexo": "7.0.0",
34
+ "hexo-fs": "^4.1.1",
35
+ "hexo-pagination": "^3.0.0",
36
+ "hexo-util": "^3.2.0",
37
+ "js-yaml": "^4.1.0",
38
+ "mouse-firework": "^0.0.5",
39
+ "theme-shokax-anime": "^0.0.6",
40
+ "theme-shokax-pjax": "^0.0.3",
41
+ "unlazy": "^0.10.4"
42
+ },
43
+ "engines": {
44
+ "node": ">=18.0.0"
45
+ },
46
+ "engineStrict": true
47
+ }
@@ -10,70 +10,70 @@ const utils_1 = require("../utils");
10
10
  hexo.extend.helper.register('_new_comments', function (mode) {
11
11
  const root = this.config.url.replace(/^(https?:\/\/)?[^\/]*/, '');
12
12
  if (mode === 'twikoo') {
13
- return `<script data-pjax type="module">
14
- let comments = []
15
- twikoo.getRecentComments({
16
- envId: "${hexo.theme.config?.twikoo?.envId}",
17
- pageSize: 10
18
- }).then(function (res) {
19
- res.forEach(function (item) {
20
- let cText = item.commentText
21
- if (item.commentText.length > 50) {
22
- cText = item.commentText.substring(0,50)+'...'
23
- }
24
- const siteLink = item.url + "#" + item.id
25
- comments.push({
26
- href: siteLink,
27
- nick: item.nick,
28
- time: item.relativeTime,
29
- text: cText
30
- })
31
- });
32
- Vue.createApp({
33
- data() {
34
- return {
35
- coms: comments,
36
- root: '${root}'
37
- }
38
- }
39
- }).mount('#new-comment')
40
- }).catch(function (err) {
41
- console.error(err)
42
- })
13
+ return `<script data-pjax type="module">
14
+ let comments = []
15
+ twikoo.getRecentComments({
16
+ envId: "${hexo.theme.config?.twikoo?.envId}",
17
+ pageSize: 10
18
+ }).then(function (res) {
19
+ res.forEach(function (item) {
20
+ let cText = item.commentText
21
+ if (item.commentText.length > 50) {
22
+ cText = item.commentText.substring(0,50)+'...'
23
+ }
24
+ const siteLink = item.url + "#" + item.id
25
+ comments.push({
26
+ href: siteLink,
27
+ nick: item.nick,
28
+ time: item.relativeTime,
29
+ text: cText
30
+ })
31
+ });
32
+ Vue.createApp({
33
+ data() {
34
+ return {
35
+ coms: comments,
36
+ root: '${root}'
37
+ }
38
+ }
39
+ }).mount('#new-comment')
40
+ }).catch(function (err) {
41
+ console.error(err)
42
+ })
43
43
  </script>`;
44
44
  }
45
45
  else if (mode === 'waline') {
46
- return `
47
- <script type="module" data-pjax>
48
- let items = []
49
- import { RecentComments } from 'https://npm.webcache.cn/@waline/client@v2/dist/waline.mjs'
50
- RecentComments({
51
- serverURL: '${hexo.theme.config.waline.serverURL.replace(/\/+$/, '')}',
52
- count: 10,
53
- }).then(({ comments }) => {
54
- comments.forEach(function (item) {
55
- let cText = (item.orig.length > 50) ? item.orig.substring(0,50)+'...' : item.orig
56
- item.url = item.url.startsWith('/') ? item.url : '/' + item.url;
57
- const siteLink = item.url + "#" + item.objectId
58
- items.push({
59
- href: siteLink,
60
- nick: item.nick,
61
- time: item.insertedAt.split('T').shift(),
62
- text: cText
63
- })
64
- })
65
- Vue.createApp({
66
- data() {
67
- return {
68
- coms: items,
69
- root: '${root}'
70
- }
71
- }
72
- }).mount('#new-comment')
73
- }).catch(function (err) {
74
- console.error(err)
75
- })
76
- </script>
46
+ return `
47
+ <script type="module" data-pjax>
48
+ let items = []
49
+ import { RecentComments } from 'https://npm.webcache.cn/@waline/client@v2/dist/waline.mjs'
50
+ RecentComments({
51
+ serverURL: '${hexo.theme.config.waline.serverURL.replace(/\/+$/, '')}',
52
+ count: 10,
53
+ }).then(({ comments }) => {
54
+ comments.forEach(function (item) {
55
+ let cText = (item.orig.length > 50) ? item.orig.substring(0,50)+'...' : item.orig
56
+ item.url = item.url.startsWith('/') ? item.url : '/' + item.url;
57
+ const siteLink = item.url + "#" + item.objectId
58
+ items.push({
59
+ href: siteLink,
60
+ nick: item.nick,
61
+ time: item.insertedAt.split('T').shift(),
62
+ text: cText
63
+ })
64
+ })
65
+ Vue.createApp({
66
+ data() {
67
+ return {
68
+ coms: items,
69
+ root: '${root}'
70
+ }
71
+ }
72
+ }).mount('#new-comment')
73
+ }).catch(function (err) {
74
+ console.error(err)
75
+ })
76
+ </script>
77
77
  `;
78
78
  }
79
79
  else {
@@ -7,7 +7,7 @@ hexo.on('generateBefore', function () {
7
7
  }
8
8
  if (!hexo.config.markdown) {
9
9
  findProblem = true;
10
- hexo.log.error(`[SXEC 102] Critical rendering plugins are missing or incorrectly configured.
10
+ hexo.log.error(`[SXEC 102] Critical rendering plugins are missing or incorrectly configured.
11
11
  Some features will be disabled or render incorrectly`);
12
12
  }
13
13
  if (parseInt(process.version.match(/\d{2,3}/)[0]) < 18) {
@@ -25,7 +25,7 @@ Some features will be disabled or render incorrectly`);
25
25
  });
26
26
  hexo.on('generateAfter', function () {
27
27
  if (findProblem) {
28
- hexo.log.warn(`The environment check found some problems that can lead to rendering errors, effect errors,
28
+ hexo.log.warn(`The environment check found some problems that can lead to rendering errors, effect errors,
29
29
  performance degradation, not working correctly, etc`);
30
30
  hexo.log.warn('ShokaX has output them into console, read them to get more information. You can search error code in docs(For example, SXEC 101)');
31
31
  }
@@ -32,10 +32,10 @@ function linkGrid(args, content) {
32
32
  }
33
33
  item.color = item.color ? ` style="--block-color:${item.color};"` : '';
34
34
  result += `<div class="item" title="${item.owner || item.site}"${item.color}>`;
35
- result += `<a href="${item.url}" class="image" data-background-image="${item_image}"></a>
36
- <div class="info">
37
- <a href="${item.url}" class="title">${item.site}</a>
38
- <p class="desc">${item.desc || item.url}</p>
35
+ result += `<a href="${item.url}" class="image" data-background-image="${item_image}"></a>
36
+ <div class="info">
37
+ <a href="${item.url}" class="title">${item.site}</a>
38
+ <p class="desc">${item.desc || item.url}</p>
39
39
  </div></div>`;
40
40
  });
41
41
  return `<div class="links">${result}</div>`;
@@ -1,9 +1,9 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1366 362">
2
- <linearGradient id="a" x1="428.258" x2="434.145" y1="404.15" y2="409.85" gradientUnits="userSpaceOnUse" gradientTransform="matrix(94.045 0 0 -94.072 -40381.527 38479.52)">
3
- <stop offset="0" stop-color="#00aeff"/>
4
- <stop offset="1" stop-color="#3369e7"/>
5
- </linearGradient>
6
- <path fill="url(#a)" d="M61.8 15.4h242.8c23.9 0 43.4 19.4 43.4 43.4v242.9c0 23.9-19.4 43.4-43.4 43.4H61.8c-23.9 0-43.4-19.4-43.4-43.4v-243c0-23.9 19.4-43.3 43.4-43.3z"/>
7
- <path fill="#FFF" d="M187 98.7c-51.4 0-93.1 41.7-93.1 93.2S135.6 285 187 285s93.1-41.7 93.1-93.2-41.6-93.1-93.1-93.1zm0 158.8c-36.2 0-65.6-29.4-65.6-65.6s29.4-65.6 65.6-65.6 65.6 29.4 65.6 65.6-29.3 65.6-65.6 65.6zm0-117.8v48.9c0 1.4 1.5 2.4 2.8 1.7l43.4-22.5c1-.5 1.3-1.7.8-2.7-9-15.8-25.7-26.6-45-27.3-1 0-2 .8-2 1.9zm-60.8-35.9l-5.7-5.7c-5.6-5.6-14.6-5.6-20.2 0l-6.8 6.8c-5.6 5.6-5.6 14.6 0 20.2l5.6 5.6c.9.9 2.2.7 3-.2 3.3-4.5 6.9-8.8 10.9-12.8 4.1-4.1 8.3-7.7 12.9-11 1-.6 1.1-2 .3-2.9zM217.5 89V77.7c0-7.9-6.4-14.3-14.3-14.3h-33.3c-7.9 0-14.3 6.4-14.3 14.3v11.6c0 1.3 1.2 2.2 2.5 1.9 9.3-2.7 19.1-4.1 29-4.1 9.5 0 18.9 1.3 28 3.8 1.2.3 2.4-.6 2.4-1.9z"/>
8
- <path fill="#182359" d="M842.5 267.6c0 26.7-6.8 46.2-20.5 58.6-13.7 12.4-34.6 18.6-62.8 18.6-10.3 0-31.7-2-48.8-5.8l6.3-31c14.3 3 33.2 3.8 43.1 3.8 15.7 0 26.9-3.2 33.6-9.6s10-15.9 10-28.5v-6.4c-3.9 1.9-9 3.8-15.3 5.8-6.3 1.9-13.6 2.9-21.8 2.9-10.8 0-20.6-1.7-29.5-5.1-8.9-3.4-16.6-8.4-22.9-15-6.3-6.6-11.3-14.9-14.8-24.8s-5.3-27.6-5.3-40.6c0-12.2 1.9-27.5 5.6-37.7 3.8-10.2 9.2-19 16.5-26.3 7.2-7.3 16-12.9 26.3-17s22.4-6.7 35.5-6.7c12.7 0 24.4 1.6 35.8 3.5 11.4 1.9 21.1 3.9 29 6.1v155.2zm-108.7-77.2c0 16.4 3.6 34.6 10.8 42.2 7.2 7.6 16.5 11.4 27.9 11.4 6.2 0 12.1-.9 17.6-2.6 5.5-1.7 9.9-3.7 13.4-6.1v-97.1c-2.8-.6-14.5-3-25.8-3.3-14.2-.4-25 5.4-32.6 14.7-7.5 9.3-11.3 25.6-11.3 40.8zm294.3 0c0 13.2-1.9 23.2-5.8 34.1s-9.4 20.2-16.5 27.9c-7.1 7.7-15.6 13.7-25.6 17.9s-25.4 6.6-33.1 6.6c-7.7-.1-23-2.3-32.9-6.6-9.9-4.3-18.4-10.2-25.5-17.9-7.1-7.7-12.6-17-16.6-27.9s-6-20.9-6-34.1c0-13.2 1.8-25.9 5.8-36.7 4-10.8 9.6-20 16.8-27.7s15.8-13.6 25.6-17.8c9.9-4.2 20.8-6.2 32.6-6.2s22.7 2.1 32.7 6.2c10 4.2 18.6 10.1 25.6 17.8 7.1 7.7 12.6 16.9 16.6 27.7 4.2 10.8 6.3 23.5 6.3 36.7zm-40 .1c0-16.9-3.7-31-10.9-40.8-7.2-9.9-17.3-14.8-30.2-14.8-12.9 0-23 4.9-30.2 14.8-7.2 9.9-10.7 23.9-10.7 40.8 0 17.1 3.6 28.6 10.8 38.5 7.2 10 17.3 14.9 30.2 14.9 12.9 0 23-5 30.2-14.9 7.2-10 10.8-21.4 10.8-38.5zm127.1 86.4c-64.1.3-64.1-51.8-64.1-60.1L1051 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9zm68.9 0h-39.3V108.1l39.3-6.2v175zm-19.7-193.5c13.1 0 23.8-10.6 23.8-23.7S1177.6 36 1164.4 36s-23.8 10.6-23.8 23.7 10.7 23.7 23.8 23.7zm117.4 18.6c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4s8.9 13.5 11.1 21.7c2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6s-25.9 2.7-41.1 2.7c-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8s9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2s-10-3-16.7-3c-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1s19.5-2.6 30.3-2.6zm3.3 141.9c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18 5.9 3.6 13.7 5.3 23.6 5.3zM512.9 103c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4 5.3 5.8 8.9 13.5 11.1 21.7 2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6-12.2 1.8-25.9 2.7-41.1 2.7-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8 4.7.5 9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2-4.4-1.7-10-3-16.7-3-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1 9.4-1.8 19.5-2.6 30.3-2.6zm3.4 142c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18s13.7 5.3 23.6 5.3zm158.5 31.9c-64.1.3-64.1-51.8-64.1-60.1L610.6 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9z"/>
9
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1366 362">
2
+ <linearGradient id="a" x1="428.258" x2="434.145" y1="404.15" y2="409.85" gradientUnits="userSpaceOnUse" gradientTransform="matrix(94.045 0 0 -94.072 -40381.527 38479.52)">
3
+ <stop offset="0" stop-color="#00aeff"/>
4
+ <stop offset="1" stop-color="#3369e7"/>
5
+ </linearGradient>
6
+ <path fill="url(#a)" d="M61.8 15.4h242.8c23.9 0 43.4 19.4 43.4 43.4v242.9c0 23.9-19.4 43.4-43.4 43.4H61.8c-23.9 0-43.4-19.4-43.4-43.4v-243c0-23.9 19.4-43.3 43.4-43.3z"/>
7
+ <path fill="#FFF" d="M187 98.7c-51.4 0-93.1 41.7-93.1 93.2S135.6 285 187 285s93.1-41.7 93.1-93.2-41.6-93.1-93.1-93.1zm0 158.8c-36.2 0-65.6-29.4-65.6-65.6s29.4-65.6 65.6-65.6 65.6 29.4 65.6 65.6-29.3 65.6-65.6 65.6zm0-117.8v48.9c0 1.4 1.5 2.4 2.8 1.7l43.4-22.5c1-.5 1.3-1.7.8-2.7-9-15.8-25.7-26.6-45-27.3-1 0-2 .8-2 1.9zm-60.8-35.9l-5.7-5.7c-5.6-5.6-14.6-5.6-20.2 0l-6.8 6.8c-5.6 5.6-5.6 14.6 0 20.2l5.6 5.6c.9.9 2.2.7 3-.2 3.3-4.5 6.9-8.8 10.9-12.8 4.1-4.1 8.3-7.7 12.9-11 1-.6 1.1-2 .3-2.9zM217.5 89V77.7c0-7.9-6.4-14.3-14.3-14.3h-33.3c-7.9 0-14.3 6.4-14.3 14.3v11.6c0 1.3 1.2 2.2 2.5 1.9 9.3-2.7 19.1-4.1 29-4.1 9.5 0 18.9 1.3 28 3.8 1.2.3 2.4-.6 2.4-1.9z"/>
8
+ <path fill="#182359" d="M842.5 267.6c0 26.7-6.8 46.2-20.5 58.6-13.7 12.4-34.6 18.6-62.8 18.6-10.3 0-31.7-2-48.8-5.8l6.3-31c14.3 3 33.2 3.8 43.1 3.8 15.7 0 26.9-3.2 33.6-9.6s10-15.9 10-28.5v-6.4c-3.9 1.9-9 3.8-15.3 5.8-6.3 1.9-13.6 2.9-21.8 2.9-10.8 0-20.6-1.7-29.5-5.1-8.9-3.4-16.6-8.4-22.9-15-6.3-6.6-11.3-14.9-14.8-24.8s-5.3-27.6-5.3-40.6c0-12.2 1.9-27.5 5.6-37.7 3.8-10.2 9.2-19 16.5-26.3 7.2-7.3 16-12.9 26.3-17s22.4-6.7 35.5-6.7c12.7 0 24.4 1.6 35.8 3.5 11.4 1.9 21.1 3.9 29 6.1v155.2zm-108.7-77.2c0 16.4 3.6 34.6 10.8 42.2 7.2 7.6 16.5 11.4 27.9 11.4 6.2 0 12.1-.9 17.6-2.6 5.5-1.7 9.9-3.7 13.4-6.1v-97.1c-2.8-.6-14.5-3-25.8-3.3-14.2-.4-25 5.4-32.6 14.7-7.5 9.3-11.3 25.6-11.3 40.8zm294.3 0c0 13.2-1.9 23.2-5.8 34.1s-9.4 20.2-16.5 27.9c-7.1 7.7-15.6 13.7-25.6 17.9s-25.4 6.6-33.1 6.6c-7.7-.1-23-2.3-32.9-6.6-9.9-4.3-18.4-10.2-25.5-17.9-7.1-7.7-12.6-17-16.6-27.9s-6-20.9-6-34.1c0-13.2 1.8-25.9 5.8-36.7 4-10.8 9.6-20 16.8-27.7s15.8-13.6 25.6-17.8c9.9-4.2 20.8-6.2 32.6-6.2s22.7 2.1 32.7 6.2c10 4.2 18.6 10.1 25.6 17.8 7.1 7.7 12.6 16.9 16.6 27.7 4.2 10.8 6.3 23.5 6.3 36.7zm-40 .1c0-16.9-3.7-31-10.9-40.8-7.2-9.9-17.3-14.8-30.2-14.8-12.9 0-23 4.9-30.2 14.8-7.2 9.9-10.7 23.9-10.7 40.8 0 17.1 3.6 28.6 10.8 38.5 7.2 10 17.3 14.9 30.2 14.9 12.9 0 23-5 30.2-14.9 7.2-10 10.8-21.4 10.8-38.5zm127.1 86.4c-64.1.3-64.1-51.8-64.1-60.1L1051 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9zm68.9 0h-39.3V108.1l39.3-6.2v175zm-19.7-193.5c13.1 0 23.8-10.6 23.8-23.7S1177.6 36 1164.4 36s-23.8 10.6-23.8 23.7 10.7 23.7 23.8 23.7zm117.4 18.6c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4s8.9 13.5 11.1 21.7c2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6s-25.9 2.7-41.1 2.7c-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8s9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2s-10-3-16.7-3c-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1s19.5-2.6 30.3-2.6zm3.3 141.9c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18 5.9 3.6 13.7 5.3 23.6 5.3zM512.9 103c12.9 0 23.8 1.6 32.6 4.8 8.8 3.2 15.9 7.7 21.1 13.4 5.3 5.8 8.9 13.5 11.1 21.7 2.3 8.2 3.4 17.2 3.4 27.1v100.6c-6 1.3-15.1 2.8-27.3 4.6-12.2 1.8-25.9 2.7-41.1 2.7-10.1 0-19.4-1-27.7-2.9-8.4-1.9-15.5-5-21.5-9.3-5.9-4.3-10.5-9.8-13.9-16.6-3.3-6.8-5-16.4-5-26.4 0-9.6 1.9-15.7 5.6-22.3 3.8-6.6 8.9-12 15.3-16.2 6.5-4.2 13.9-7.2 22.4-9s17.4-2.7 26.6-2.7c4.3 0 8.8.3 13.6.8 4.7.5 9.8 1.4 15.2 2.7v-6.4c0-4.5-.5-8.8-1.6-12.8-1.1-4.1-3-7.6-5.6-10.7-2.7-3.1-6.2-5.5-10.6-7.2-4.4-1.7-10-3-16.7-3-9 0-17.2 1.1-24.7 2.4-7.5 1.3-13.7 2.8-18.4 4.5l-4.7-32.1c4.9-1.7 12.2-3.4 21.6-5.1 9.4-1.8 19.5-2.6 30.3-2.6zm3.4 142c12 0 20.9-.7 27.1-1.9v-39.8c-2.2-.6-5.3-1.3-9.4-1.9-4.1-.6-8.6-1-13.6-1-4.3 0-8.7.3-13.1 1-4.4.6-8.4 1.8-11.9 3.5s-6.4 4.1-8.5 7.2c-2.2 3.1-3.2 4.9-3.2 9.6 0 9.2 3.2 14.5 9 18s13.7 5.3 23.6 5.3zm158.5 31.9c-64.1.3-64.1-51.8-64.1-60.1L610.6 32l39.1-6.2v183.6c0 4.7 0 34.5 25.1 34.6v32.9z"/>
9
+ </svg>