hexo-theme-stellar 1.24.1 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/_config.yml +122 -50
  2. package/_data/icons.yml +33 -0
  3. package/_data/widgets.yml +2 -16
  4. package/languages/en.yml +2 -1
  5. package/languages/zh-CN.yml +3 -2
  6. package/languages/zh-TW.yml +3 -2
  7. package/layout/404.ejs +2 -4
  8. package/layout/_partial/cover/index.ejs +5 -5
  9. package/layout/_partial/cover/post_cover.ejs +1 -1
  10. package/layout/_partial/cover/wiki_cover.ejs +2 -2
  11. package/layout/_partial/head.ejs +6 -9
  12. package/layout/_partial/main/article/article_footer.ejs +16 -24
  13. package/layout/_partial/main/article/read_next.ejs +13 -13
  14. package/layout/_partial/main/article/related_posts.ejs +1 -1
  15. package/layout/_partial/main/footer.ejs +1 -1
  16. package/layout/_partial/main/navbar/article_top_area.ejs +35 -0
  17. package/layout/_partial/main/navbar/author_banner.ejs +1 -3
  18. package/layout/_partial/main/navbar/breadcrumb/blog.ejs +34 -0
  19. package/layout/_partial/main/navbar/breadcrumb/page.ejs +10 -0
  20. package/layout/_partial/main/navbar/breadcrumb/wiki.ejs +20 -0
  21. package/layout/_partial/main/navbar/dateinfo.ejs +32 -0
  22. package/layout/_partial/main/navbar/ghinfo.ejs +25 -0
  23. package/layout/_partial/main/navbar/{list_post.ejs → nav_tabs_blog.ejs} +15 -7
  24. package/layout/_partial/main/navbar/{list_wiki.ejs → nav_tabs_wiki.ejs} +15 -1
  25. package/layout/_partial/main/post_list/paginator.ejs +1 -1
  26. package/layout/_partial/main/post_list/post_card.ejs +4 -15
  27. package/layout/_partial/main/post_list/topic_card.ejs +16 -0
  28. package/layout/_partial/menubtn.ejs +1 -1
  29. package/layout/_partial/plugins/ai/tianli_gpt.ejs +4 -3
  30. package/layout/_partial/plugins/comments/artalk/layout.ejs +1 -1
  31. package/layout/_partial/plugins/comments/artalk/script.ejs +1 -1
  32. package/layout/_partial/plugins/comments/beaudar/layout.ejs +1 -1
  33. package/layout/_partial/plugins/comments/giscus/layout.ejs +1 -1
  34. package/layout/_partial/plugins/comments/layout.ejs +3 -3
  35. package/layout/_partial/plugins/comments/twikoo/layout.ejs +1 -1
  36. package/layout/_partial/plugins/comments/utterances/layout.ejs +1 -1
  37. package/layout/_partial/plugins/comments/waline/layout.ejs +1 -1
  38. package/layout/_partial/sidebar/index.ejs +92 -83
  39. package/layout/_partial/sidebar/logo.ejs +87 -0
  40. package/layout/_partial/sidebar/menu.ejs +23 -18
  41. package/layout/_partial/sidebar/search.ejs +42 -0
  42. package/layout/_partial/widgets/components/link.ejs +21 -0
  43. package/layout/_partial/widgets/components/linklist.ejs +27 -0
  44. package/layout/_partial/widgets/ghissues.ejs +7 -9
  45. package/layout/_partial/widgets/ghrepo.ejs +10 -12
  46. package/layout/_partial/widgets/ghuser.ejs +2 -6
  47. package/layout/_partial/widgets/linklist.ejs +17 -0
  48. package/layout/_partial/widgets/markdown.ejs +5 -2
  49. package/layout/_partial/widgets/recent.ejs +12 -8
  50. package/layout/_partial/widgets/related.ejs +51 -20
  51. package/layout/_partial/widgets/search.ejs +0 -40
  52. package/layout/_partial/widgets/tagcloud.ejs +2 -2
  53. package/layout/_partial/widgets/timeline.ejs +2 -2
  54. package/layout/_partial/widgets/toc.ejs +61 -53
  55. package/layout/archive.ejs +3 -3
  56. package/layout/categories.ejs +2 -2
  57. package/layout/index.ejs +10 -62
  58. package/layout/index_topic.ejs +28 -0
  59. package/layout/index_wiki.ejs +42 -0
  60. package/layout/layout.ejs +53 -21
  61. package/layout/page.ejs +60 -13
  62. package/layout/tags.ejs +2 -2
  63. package/package.json +2 -2
  64. package/scripts/events/index.js +5 -0
  65. package/scripts/events/lib/authors.js +1 -1
  66. package/scripts/events/lib/config.js +28 -24
  67. package/scripts/events/lib/doc_tree.js +27 -19
  68. package/scripts/events/lib/merge_posts.js +46 -0
  69. package/scripts/events/lib/topic_tree.js +45 -0
  70. package/scripts/generators/404.js +8 -3
  71. package/scripts/generators/author.js +4 -2
  72. package/scripts/generators/categories.js +4 -4
  73. package/scripts/generators/tags.js +4 -4
  74. package/scripts/generators/topic.js +21 -0
  75. package/scripts/generators/wiki.js +30 -28
  76. package/scripts/helpers/category_color.js +1 -1
  77. package/scripts/helpers/icon.js +16 -0
  78. package/scripts/helpers/parse_config.js +20 -18
  79. package/scripts/helpers/scrollreveal.js +6 -6
  80. package/scripts/tags/lib/audio.js +9 -4
  81. package/scripts/tags/lib/navbar.js +1 -1
  82. package/scripts/tags/lib/toc.js +1 -1
  83. package/scripts/tags/lib/video.js +8 -8
  84. package/source/css/_common/blur.styl +5 -9
  85. package/source/css/_common/cap.styl +1 -1
  86. package/source/css/_common/device.styl +2 -2
  87. package/source/css/_common/highlight.styl +3 -2
  88. package/source/css/_common/layout.styl +6 -0
  89. package/source/css/_common/svg.styl +3 -0
  90. package/source/css/_custom.styl +9 -2
  91. package/source/css/_defines/theme.styl +10 -0
  92. package/source/css/_layout/layout.styl +17 -4
  93. package/source/css/_layout/list.styl +5 -2
  94. package/source/css/_layout/main.styl +5 -4
  95. package/source/css/_layout/md.styl +12 -11
  96. package/source/css/_layout/partial/paginator.styl +2 -2
  97. package/source/css/_layout/partial/related.styl +3 -0
  98. package/source/css/_layout/sidebar/footer.styl +4 -31
  99. package/source/css/_layout/sidebar/{header.styl → logo.styl} +11 -41
  100. package/source/css/_layout/sidebar/menu.styl +53 -0
  101. package/source/css/_layout/sidebar/nav-area.styl +2 -0
  102. package/source/css/_layout/sidebar/search.styl +106 -0
  103. package/source/css/_layout/sidebar/sidebar.styl +21 -31
  104. package/source/css/_layout/tag-plugins/banner.styl +9 -7
  105. package/source/css/_layout/tag-plugins/frame.styl +1 -1
  106. package/source/css/_layout/tag-plugins/okr.styl +0 -1
  107. package/source/css/_layout/tag-plugins/tabs.styl +2 -2
  108. package/source/css/_layout/tag-plugins/toc.styl +1 -1
  109. package/source/css/_layout/widgets/components.styl +49 -0
  110. package/source/css/_layout/widgets/ghrepo.styl +0 -1
  111. package/source/css/_layout/widgets/ghuser.styl +0 -23
  112. package/source/css/_layout/widgets/list.styl +28 -0
  113. package/source/css/_layout/widgets/markdown.styl +20 -0
  114. package/source/css/_layout/widgets/related.styl +36 -5
  115. package/source/css/_layout/widgets/timeline.styl +21 -2
  116. package/source/css/_layout/widgets/toc_blog.styl +1 -1
  117. package/source/css/_layout/widgets/toc_common.styl +12 -12
  118. package/source/css/_layout/widgets/toc_wiki.styl +38 -25
  119. package/source/css/_layout/widgets/widgets.styl +25 -20
  120. package/source/css/_plugins/comments/twikoo.styl +9 -9
  121. package/source/css/_plugins/scrollreveal.styl +1 -1
  122. package/source/css/_plugins/tianli_gpt.styl +12 -14
  123. package/source/js/main.js +5 -2
  124. package/source/js/plugins/copycode.js +3 -3
  125. package/source/js/plugins/fcircle.js +1 -1
  126. package/source/js/plugins/friends.js +1 -1
  127. package/source/js/plugins/memos.js +1 -1
  128. package/source/js/plugins/sites.js +2 -2
  129. package/source/js/plugins/weibo.js +1 -1
  130. package/layout/_partial/main/header/index.ejs +0 -3
  131. package/layout/_partial/main/navbar/breadcrumb.ejs +0 -139
  132. package/layout/_partial/sidebar/header.ejs +0 -59
  133. package/layout/post.ejs +0 -33
  134. package/layout/wiki.ejs +0 -43
  135. package/source/css/_layout/widgets/recent.styl +0 -15
  136. package/source/css/_layout/widgets/search.styl +0 -102
@@ -1,39 +1,41 @@
1
1
  /**
2
- * md_link(theme.sidebar.menu['home']) is '/'
3
- * md_text(theme.sidebar.menu['home']) is 'Home'
2
+ * md_link(theme.menu['home']) is '/'
3
+ * md_text(theme.menu['home']) is 'Home'
4
4
  */
5
5
 
6
6
  'use strict';
7
7
 
8
8
  hexo.extend.helper.register('md_text', function(args) {
9
9
  if (args == undefined) {
10
- return '';
10
+ return ''
11
11
  }
12
- let tmp = args.split('](');
12
+ let tmp = args.split('](')
13
13
  if (tmp.length > 1) {
14
- tmp = tmp[0];
14
+ tmp = tmp[0]
15
15
  if (tmp.length > 1) {
16
- tmp = tmp.substring(1, tmp.length);
16
+ tmp = tmp.substring(1, tmp.length)
17
17
  }
18
18
  }
19
- if (tmp == 'config.title') {
20
- tmp = hexo.config.title;
21
- } else if (tmp == 'config.avatar') {
22
- tmp = hexo.config.avatar;
19
+ if (tmp == 'config.title' || tmp == '${config.title}') {
20
+ tmp = hexo.config.title
21
+ } else if (tmp == 'config.avatar' || tmp == '${config.avatar}') {
22
+ tmp = hexo.config.avatar
23
23
  }
24
- return tmp;
25
- });
24
+ return tmp
25
+ })
26
26
 
27
27
  hexo.extend.helper.register('md_link', function(args) {
28
28
  if (args == undefined) {
29
- return '';
29
+ return ''
30
30
  }
31
- let tmp = args.split('](');
31
+ let tmp = args.split('](')
32
32
  if (tmp.length > 1) {
33
- tmp = tmp[1];
33
+ tmp = tmp[1]
34
34
  if (tmp.length > 1) {
35
- tmp = tmp.substring(0, tmp.length-1);
35
+ tmp = tmp.substring(0, tmp.length-1)
36
36
  }
37
+ } else {
38
+ return ''
37
39
  }
38
- return tmp;
39
- });
40
+ return tmp
41
+ })
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- hexo.extend.helper.register('scrollreveal', function(args){
4
- const cfg = hexo.theme.config;
5
- if (cfg.plugins.scrollreveal && cfg.plugins.scrollreveal.enable) {
6
- return ' reveal';
3
+ hexo.extend.helper.register('scrollreveal', function(args) {
4
+ if (hexo.theme.config.plugins.scrollreveal?.enable) {
5
+ return `${args ? args : ''}slide-up`
6
+ } else {
7
+ return ''
7
8
  }
8
- return '';
9
- });
9
+ })
@@ -9,14 +9,19 @@
9
9
  'use strict';
10
10
 
11
11
  module.exports = ctx => function(args) {
12
- args = ctx.args.map(args, ['type'], ['src'])
13
- if (args.type == null) {
14
- args.type = 'audio/mp3'
12
+ args = ctx.args.map(args, ['type', 'netease', 'autoplay'], ['src'])
13
+ if (args.netease) {
14
+ return `
15
+ <div class="tag-plugin audio">
16
+ <iframe src="//music.163.com/outchain/player?type=${args.type || '2'}&id=${args.netease}&auto=${args.autoplay == 'true' ? '1' : '0'}&height=32" frameborder="no" border="0" marginwidth="0" marginheight="0" width=288px height=52>
17
+ </iframe>
18
+ </div>
19
+ `
15
20
  }
16
21
  return `
17
22
  <div class="tag-plugin audio">
18
23
  <audio controls preload>
19
- <source src="${args.src}" type="${args.type}">Your browser does not support the audio tag.
24
+ <source src="${args.src}" type="${args.type || 'audio/mp3'}">Your browser does not support the audio tag.
20
25
  </audio>
21
26
  </div>
22
27
  `
@@ -25,7 +25,7 @@ module.exports = ctx => function(args) {
25
25
  let text = matches[1]
26
26
  let href = matches[2]
27
27
  if (href == args.active) {
28
- el += `<a class="link blur active" href="${href}">${text}</a>`
28
+ el += `<a class="link active" href="${href}">${text}</a>`
29
29
  } else {
30
30
  el += `<a class="link" href="${href}">${text}</a>`
31
31
  }
@@ -14,7 +14,7 @@ function layoutDocTree(ctx, pages) {
14
14
  pages.forEach((p, i) => {
15
15
  el += '<li>'
16
16
  el += '<a class="list-link" href="' + url_for(p.path) + '">'
17
- el += '<span>' + (p.title || p.seo_title) + '</span>'
17
+ el += '<span>' + p.title + '</span>'
18
18
  el += '</a>'
19
19
  el += '</li>'
20
20
  })
@@ -9,22 +9,22 @@
9
9
  'use strict';
10
10
 
11
11
  module.exports = ctx => function(args) {
12
- args = ctx.args.map(args, ['type', 'bilibili', 'ratio'], ['src'])
12
+ args = ctx.args.map(args, ['type', 'bilibili', 'ratio', 'width', 'autoplay'], ['src'])
13
+ if (args.width == null) {
14
+ args.width = '100%'
15
+ }
13
16
  if (args.bilibili) {
14
17
  return `
15
- <div class="tag-plugin video" style="aspect-ratio:${args.ratio || 16/9}">
16
- <iframe src="https://player.bilibili.com/player.html?bvid=${args.bilibili}" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true">
18
+ <div class="tag-plugin video" style="aspect-ratio:${args.ratio || 16/9};max-width:${args.width};">
19
+ <iframe src="https://player.bilibili.com/player.html?bvid=${args.bilibili}&autoplay=${args.autoplay || 'false'}" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true">
17
20
  </iframe>
18
21
  </div>
19
22
  `
20
23
  }
21
- if (args.type == null) {
22
- args.type = 'video/mp4'
23
- }
24
24
  return `
25
- <div class="tag-plugin video">
25
+ <div class="tag-plugin video" style="max-width:${args.width};">
26
26
  <video controls preload>
27
- <source src="${args.src}" type="${args.type}">Your browser does not support the video tag.
27
+ <source src="${args.src}" type="${args.type || 'video/mp4'}">Your browser does not support the video tag.
28
28
  </video>
29
29
  </div>
30
30
  `
@@ -1,15 +1,8 @@
1
1
  :root
2
2
  --blur-px: 12px
3
- --blur-bg: alpha(white, .5)
4
- if hexo-config('style.darkmode') == 'auto'
5
- @media (prefers-color-scheme: dark)
6
- :root
7
- --blur-bg: alpha(black, .5)
8
- if hexo-config('style.darkmode') == 'always'
9
- :root
10
- --blur-bg: alpha(black, .5)
3
+ --blur-bg: var(--alpha50)
11
4
 
12
- .blur
5
+ blur-effect()
13
6
  background: var(--blur-bg)
14
7
  @supports ((-webkit-backdrop-filter:blur(var(--blur-px))) or (backdrop-filter:blur(var(--blur-px))))
15
8
  background: var(--blur-bg) !important
@@ -17,3 +10,6 @@ if hexo-config('style.darkmode') == 'always'
17
10
  -webkit-backdrop-filter: saturate(200%) blur(var(--blur-px))
18
11
  &:hover
19
12
  background: var(--card)
13
+
14
+ .blur
15
+ blur-effect()
@@ -2,7 +2,7 @@
2
2
  font-weight: 500
3
3
  font-size: $fs-12
4
4
  scrollbar-width: none
5
- color: var(--text-p3)
5
+ color: var(--text-p2)
6
6
  &.blue
7
7
  color: darken($color-md-blue, 6)
8
8
  &.cyan
@@ -30,9 +30,9 @@
30
30
  cursor: pointer
31
31
  color: var(--text-p0)
32
32
  background: none
33
- padding: 0.5rem
33
+ padding: 8px
34
34
  line-height: 0
35
- font-size: 20px
35
+ font-size: 24px
36
36
  margin: 0
37
37
 
38
38
 
@@ -34,8 +34,8 @@ p>code:not([class]),li>code:not([class])
34
34
  span
35
35
  padding: 4px 0.5rem
36
36
  display: block
37
- border-bottom-left-radius: $border-bar
38
- border-bottom-right-radius: $border-bar
37
+ border-bottom-left-radius: $border-button
38
+ border-bottom-right-radius: $border-button
39
39
  background: var(--block-hover)
40
40
  >table
41
41
  overflow: auto
@@ -75,6 +75,7 @@ p>code:not([class]),li>code:not([class])
75
75
  padding-left: 0.25em
76
76
 
77
77
  .md-text .gist
78
+ --fgColor-default: var(--text-p1)
78
79
  .gist-file
79
80
  border: 1px solid var(--block-border)
80
81
  border-radius: $border-block
@@ -0,0 +1,6 @@
1
+ .flex
2
+ display: flex
3
+ align-items: center
4
+
5
+ .flex.column
6
+ flex-direction: column
@@ -4,3 +4,6 @@ svg.icon
4
4
  vertical-align: middle
5
5
  fill: currentColor
6
6
  overflow: hidden
7
+
8
+ svg.active-icon
9
+ color: $c-green
@@ -50,7 +50,7 @@ $fs-h3 = 1.375rem // 22px
50
50
  $fs-h4 = 1.125rem // 18px
51
51
  $fs-h5 = $fs-15
52
52
  $fs-h6 = $fs-12
53
- $fs-p = convert(hexo-config('style.font-size.body'))
53
+ $fs-body = convert(hexo-config('style.font-size.body'))
54
54
  $fs-code = convert(hexo-config('style.font-size.code'))
55
55
  $fs-codeblock = convert(hexo-config('style.font-size.codeblock'))
56
56
 
@@ -65,6 +65,7 @@ $border-button = 4px
65
65
  :root
66
66
  --width-left: 288px
67
67
  --width-main: 720px
68
+ --fs-p: $fs-body
68
69
  --gap-l: 16px
69
70
  --gap-p: 1rem // gap for paragraph
70
71
  --gap-p-compact: 0.75rem
@@ -84,7 +85,13 @@ $border-button = 4px
84
85
  @media screen and (max-width: $device-mobile-max)
85
86
  --width-left: 288px
86
87
 
87
-
88
+ // 文章布局风格
89
+ .l_body.story
90
+ --fs-p: 'calc(%s + 2px)' % $fs-body
91
+ --gap-p: 1.5rem
92
+ .tag-plugin,p>img
93
+ margin-top: 2.4rem
94
+ margin-bottom: 2.4rem
88
95
 
89
96
  // shadow
90
97
  $boxshadow-card = 0 1px 2px 0px rgba(0, 0, 0, 0.1)
@@ -35,6 +35,11 @@ set_text_light()
35
35
  :root
36
36
  --site-bg: hsl($color-background-h, $color-background-s, $color-background-l)
37
37
  --card: hsl($color-block-h, $color-block-s, 100)
38
+ --alpha20: rgba(white, 0.2)
39
+ --alpha50: rgba(white, 0.5)
40
+ --alpha60: rgba(white, 0.6)
41
+ --alpha100: white
42
+ --sidebar-bg: rgba(white, 0.5)
38
43
  --block: hsl($color-block-h, $color-block-s, 95)
39
44
  --block-border: hsl($color-block-h, $color-block-s, 90)
40
45
  --block-hover: hsl($color-block-h, $color-block-s, 92)
@@ -48,6 +53,11 @@ set_darkmode()
48
53
  --block: hsl($color-block-h, $color-block-s, 16)
49
54
  --block-border: hsl($color-block-h, $color-block-s, 24)
50
55
  --block-hover: hsl($color-block-h, $color-block-s, 20)
56
+ --alpha20: rgba(black, 0.2)
57
+ --alpha50: rgba(black, 0.5)
58
+ --alpha60: rgba(black, 0.6)
59
+ --alpha100: black
60
+ --sidebar-bg: rgba(black, 0.64)
51
61
  set_text_light()
52
62
  @media screen and (max-width: $device-mobile-max)
53
63
  --site-bg: black
@@ -10,7 +10,7 @@
10
10
  flex-shrink: 0
11
11
  position: sticky
12
12
  position: -webkit-sticky
13
- top: 0
13
+ top: 8px
14
14
 
15
15
  .l_body .l_main
16
16
  flex-shrink: 1
@@ -20,6 +20,17 @@
20
20
 
21
21
 
22
22
  // 手机布局
23
+ .main-mask
24
+ position: fixed
25
+ pointer-events: none
26
+ top: 0
27
+ left: 0
28
+ width: 100%
29
+ height: 100%
30
+ background: rgba(black, 0.5)
31
+ z-index: 9
32
+ opacity 0
33
+ trans1 opacity
23
34
  @media screen and (max-width: $device-mobile-max)
24
35
  .mobile-only
25
36
  display: block !important
@@ -29,10 +40,9 @@
29
40
  position: fixed
30
41
  transform: translateX(-320px)
31
42
  margin: 0
32
- left: 0
33
- background: var(--site-bg)
43
+ left: 8px
34
44
  box-shadow: $boxshadow-card-float
35
- z-index: 9
45
+ z-index: 10
36
46
  .l_main
37
47
  max-width: 100%
38
48
  .l_body.mobile
@@ -41,3 +51,6 @@
41
51
  .l_body.mobile.sidebar
42
52
  .l_left
43
53
  transform: translateX(0px)
54
+ .main-mask
55
+ opacity 1
56
+ pointer-events: inherit
@@ -1,10 +1,10 @@
1
1
  // list
2
- .post-list
2
+ .l_main .post-list
3
3
  margin: 1rem
4
4
  .post-title:first-child
5
5
  margin-top: .5rem
6
6
 
7
- .post-list
7
+ .l_main .post-list
8
8
  .post-title
9
9
  font-weight: 500
10
10
  margin: 1.25rem 0 .75rem 0
@@ -52,6 +52,9 @@
52
52
  img
53
53
  object-fit: contain
54
54
  height: 1.5em
55
+ svg
56
+ height: 1.5rem
57
+ color: $c-red
55
58
 
56
59
  .post-list .post-card:hover
57
60
  img
@@ -5,7 +5,7 @@
5
5
  margin-left: "calc(2 * %s)" % var(--gap-l)
6
6
  margin-right: "calc(2 * %s + %s / 2)" % (var(--gap-l) var(--width-left))
7
7
  @media screen and (min-width: $device-mobile-max)
8
- padding-top: "calc(2 * %s)" % var(--gap-l)
8
+ padding-top: 8px
9
9
  @media screen and (max-width: $device-mobile-max)
10
10
  padding-top: 1rem
11
11
  header
@@ -13,6 +13,7 @@
13
13
  .logo-wrap
14
14
  margin: 0
15
15
 
16
- .l_main.list
17
- @media screen and (max-width: $device-mobile-max)
18
- padding-top: 0
16
+ .l_body.index
17
+ .l_main
18
+ @media screen and (max-width: $device-mobile-max)
19
+ padding-top: 0
@@ -22,16 +22,6 @@ h1.article-title
22
22
  position: relative
23
23
  padding-bottom: 2rem
24
24
  overflow: hidden
25
- &.indent
26
- >p:not([class])
27
- text-indent: 'calc(%s * 2)' % $fs-p
28
- text-align: convert(hexo-config('style.text-align'))
29
- a
30
- text-indent: 0
31
- h1,h2,h3,h4,h5,h6
32
- text-align: center
33
- >h2:not([class])
34
- border-bottom: none
35
25
  >:first-child:not(h1)
36
26
  margin-top: 0
37
27
  h1:not(:first-child)
@@ -53,6 +43,17 @@ h1.article-title
53
43
  margin-bottom: 0.25em
54
44
  padding-top: 0
55
45
 
46
+ .l_body[text-indent] .md-text.content
47
+ >p:not([class])
48
+ text-indent: 'calc(%s * 2)' % var(--fs-p)
49
+ text-align: convert(hexo-config('style.text-align'))
50
+ a
51
+ text-indent: 0
52
+ h1,h2,h3,h4,h5,h6
53
+ text-align: center
54
+ >h2:not([class])
55
+ border-bottom: none
56
+
56
57
  .md-text.content:first-child
57
58
  padding-top: 0
58
59
 
@@ -109,7 +110,7 @@ h1.article-title
109
110
  margin-top: -0.5rem
110
111
 
111
112
  .md-text p
112
- font-size: $fs-p
113
+ font-size: var(--fs-p)
113
114
 
114
115
  .md-text pre
115
116
  -webkit-font-smoothing: auto
@@ -28,10 +28,10 @@
28
28
  background-clip: content-box
29
29
  &.next
30
30
  border-left: 1px dashed var(--block-border)
31
- background-image: url('https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/arrow/064b95430caf4.svg')
31
+ background-image: url(hexo-config('style.paginator.next'))
32
32
  &.prev
33
33
  border-right: 1px dashed var(--block-border)
34
- background-image: url('https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/arrow/f049bbd4e88ec.svg')
34
+ background-image: url(hexo-config('style.paginator.prev'))
35
35
  .current
36
36
  font-family: $ff-code
37
37
  background: var(--block)
@@ -45,6 +45,9 @@ article.md-text.content+.related-wrap
45
45
  -webkit-box-orient: vertical
46
46
  overflow: hidden
47
47
  -webkit-line-clamp: 2
48
+ &.active
49
+ .title
50
+ border-bottom: 1px dashed $color-theme
48
51
  &:hover
49
52
  .title
50
53
  color: $color-hover
@@ -1,47 +1,20 @@
1
- .l_left>.footer
1
+ .l_left footer.footer
2
2
  margin: 0.5rem var(--gap-l) 1rem
3
3
 
4
4
  .social-wrap
5
5
  display: grid
6
6
  grid-gap: 0.25rem 0.25rem
7
7
  grid-template-columns: repeat(auto-fill, 32px)
8
- a.social
8
+ .social
9
9
  line-height: 0
10
10
  display: inline-block
11
11
  padding: 6px
12
- border-radius: 4px
12
+ border-radius: 32px
13
13
  filter: grayscale(100%)
14
14
  overflow: hidden
15
15
  background: transparent
16
16
  trans3: box-shadow background transform
17
17
  &:hover
18
- color: $color-hover
19
18
  z-index: 1
20
19
  filter: unset
21
- transform: translateY(-1px)
22
- background: linear-gradient(145deg, #ddd, #fff)
23
- box-shadow: 2px 4px 8px #ddd, -2px -4px 8px #fff
24
- if hexo-config('style.darkmode') == 'auto'
25
- @media (prefers-color-scheme: dark)
26
- box-shadow: none
27
- if hexo-config('style.darkmode') == 'always'
28
- box-shadow: none
29
-
30
- .proj-wrap
31
- display: grid
32
- grid-gap: 0.25rem 0.25rem
33
- a.item
34
- border-radius: 4px
35
- font-size: $fs-13
36
- font-weight: 500
37
- color: var(--text-p2)
38
- background: var(--block)
39
- border: 1px solid var(--block-border)
40
- overflow: hidden
41
- padding: .75em
42
- text-align: center
43
- svg
44
- margin-right: .5em
45
- &:hover
46
- color: $color-hover
47
- background: var(--card)
20
+ background: var(--alpha100)
@@ -1,44 +1,15 @@
1
- .l_left
2
- nav.menu
3
- margin-bottom: 0
4
-
5
- nav.menu
6
- margin: 1rem 0
7
- background: var(--block)
8
- border: 1px solid var(--block-border)
9
- border-radius: 6px
10
- display: flex
11
- flex-wrap: wrap
12
- &::-webkit-scrollbar
13
- display: none
14
- &::-webkit-scrollbar-track-piece
15
- background: transparent
16
- &::-webkit-scrollbar-thumb
17
- display: none
18
- a.nav-item
19
- text-overflow: ellipsis
20
- word-break: keep-all
21
- margin: 1px
22
- border-radius: 4px
23
- font-size: $fs-14
24
- font-weight: 500
25
- overflow: hidden
26
- padding: 0.375rem 0.5rem
27
- color: var(--text-p3)
28
- text-align: center
29
- &.active, &:hover
30
- color: var(--text-p1)
31
- background: var(--card)
32
- box-shadow: $boxshadow-button
33
-
34
- .l_left .menu a.nav-item
35
- flex-grow: 1
36
-
37
-
38
1
  .logo-wrap
39
2
  display: flex
40
3
  align-items: center
41
4
  overflow: hidden
5
+ min-height: 48px
6
+ img
7
+ object-fit: cover
8
+ .icon
9
+ width: 48px
10
+ height: 48px
11
+ margin-right: 1rem
12
+ border-radius: 4px
42
13
  a
43
14
  color: inherit
44
15
  display: flex
@@ -46,10 +17,10 @@ nav.menu
46
17
  a.avatar
47
18
  display: block
48
19
  position: relative
49
- width: 50px
50
- height: 50px
20
+ width: 48px
21
+ height: 48px
51
22
  flex-shrink: 0
52
- border-radius: 50px
23
+ border-radius: 48px
53
24
  overflow: hidden
54
25
  margin-right: 1rem
55
26
  div.bg
@@ -58,7 +29,6 @@ nav.menu
58
29
  background-size: cover
59
30
  img.avatar
60
31
  margin: 2px
61
- object-fit: cover
62
32
  width: "calc(100% - 2 * %s)" % @margin
63
33
  height: "calc(100% - 2 * %s)" % @margin
64
34
  border-radius: @width
@@ -0,0 +1,53 @@
1
+ .nav-area .menu
2
+ width: 100%
3
+ display: grid
4
+ margin: 8px 0
5
+ grid-template-columns: repeat(hexo-config('menubar.columns'), 1fr)
6
+ grid-gap: 8px
7
+ &::-webkit-scrollbar
8
+ display: none
9
+ &::-webkit-scrollbar-track-piece
10
+ background: transparent
11
+ &::-webkit-scrollbar-thumb
12
+ display: none
13
+
14
+ .nav-item
15
+ box-sizing: border-box
16
+ width: 100%
17
+ min-height: 40px
18
+ border-radius: $border-bar
19
+ font-size: $fs-15
20
+ font-weight: 500
21
+ color: var(--text-p3)
22
+ text-align: center
23
+ background: var(--alpha50)
24
+ trans1 background
25
+ position: relative
26
+ display: flex
27
+ flex-direction: column
28
+ align-items: center
29
+ justify-content: center
30
+ img,svg
31
+ height: 28px
32
+ object-fit: contain
33
+ filter: grayscale(100%) brightness(0.8) opacity(0.8)
34
+ trans1 all
35
+ span
36
+ text-overflow: ellipsis
37
+ word-break: keep-all
38
+ &.active, &:hover
39
+ color: var(--text-p1)
40
+ background: var(--alpha100)
41
+ img,svg
42
+ filter: unset
43
+ &.active:after
44
+ content: ''
45
+ position absolute
46
+ width: 16px
47
+ height: 2px
48
+ left: 50%
49
+ transform: translateX(-50%)
50
+ border-radius: 2px
51
+ bottom: 2px
52
+ background: var(--text-p1)
53
+
@@ -0,0 +1,2 @@
1
+ .nav-area
2
+ margin: 32px var(--gap-l) 0