hexo-theme-stellar 1.32.1 → 1.32.3

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 (110) hide show
  1. package/README.md +22 -4
  2. package/_config.yml +55 -41
  3. package/layout/_partial/comments/artalk/layout.ejs +1 -1
  4. package/layout/_partial/comments/artalk/script.ejs +22 -1
  5. package/layout/_partial/cover/post_cover.ejs +1 -5
  6. package/layout/_partial/cover/wiki_cover.ejs +1 -1
  7. package/layout/_partial/main/footer.ejs +15 -5
  8. package/layout/_partial/main/navbar/article_banner.ejs +3 -3
  9. package/layout/_partial/main/navbar/ghinfo.ejs +1 -1
  10. package/layout/_partial/scripts/defines.ejs +3 -1
  11. package/layout/_partial/scripts/lazyload.ejs +67 -0
  12. package/layout/_partial/scripts/utils.ejs +1 -0
  13. package/layout/_partial/scripts.ejs +1 -0
  14. package/layout/_partial/sidebar/index_leftbar.ejs +1 -1
  15. package/layout/_partial/sidebar/logo.ejs +1 -1
  16. package/layout/_partial/widgets/author.ejs +1 -1
  17. package/layout/_partial/widgets/ghissues.ejs +1 -1
  18. package/layout/_partial/widgets/ghrepo.ejs +2 -2
  19. package/layout/_partial/widgets/ghuser.ejs +2 -2
  20. package/layout/_partial/widgets/markdown.ejs +1 -1
  21. package/layout/_partial/widgets/recent.ejs +1 -1
  22. package/layout/_partial/widgets/related.ejs +1 -1
  23. package/layout/_partial/widgets/timeline.ejs +1 -1
  24. package/layout/_partial/widgets/tree.ejs +1 -1
  25. package/layout/_plugins/fancybox.ejs +7 -3
  26. package/layout/_plugins/scrollreveal.ejs +3 -3
  27. package/package.json +1 -1
  28. package/scripts/tags/lib/albums.js +4 -3
  29. package/scripts/tags/lib/banner.js +1 -1
  30. package/scripts/tags/lib/chat.js +1 -5
  31. package/scripts/tags/lib/friends.js +5 -2
  32. package/scripts/tags/lib/gallery.js +4 -3
  33. package/scripts/tags/lib/image.js +5 -5
  34. package/scripts/tags/lib/link.js +1 -5
  35. package/scripts/tags/lib/md.js +1 -1
  36. package/scripts/tags/lib/posters.js +5 -4
  37. package/scripts/tags/lib/sites.js +9 -3
  38. package/scripts/tags/lib/timeline.js +1 -1
  39. package/source/css/_common/base.styl +2 -5
  40. package/source/css/_common/blockquote.styl +1 -1
  41. package/source/css/_common/blur.styl +7 -7
  42. package/source/css/_common/button.styl +2 -2
  43. package/source/css/_common/cap.styl +1 -1
  44. package/source/css/_common/device.styl +4 -4
  45. package/source/css/_common/highlight.styl +2 -0
  46. package/source/css/_common/html.styl +1 -1
  47. package/source/css/_common/svg.styl +1 -1
  48. package/source/css/_common/title.styl +1 -1
  49. package/source/css/_components/layout.styl +2 -2
  50. package/source/css/_components/list.styl +1 -2
  51. package/source/css/_components/main.styl +8 -4
  52. package/source/css/_components/md.styl +2 -2
  53. package/source/css/_components/pages/archives.styl +5 -5
  54. package/source/css/_components/pages/article-story.styl +11 -11
  55. package/source/css/_components/pages/article-tech.styl +2 -2
  56. package/source/css/_components/pages/notebook.styl +2 -2
  57. package/source/css/_components/partial/footer.styl +5 -9
  58. package/source/css/_components/partial/navbar.styl +2 -2
  59. package/source/css/_components/partial/related.styl +6 -6
  60. package/source/css/_components/sidebar/footer.styl +1 -1
  61. package/source/css/_components/sidebar/menu.styl +3 -3
  62. package/source/css/_components/sidebar/search.styl +7 -7
  63. package/source/css/_components/sidebar/sidebar.styl +24 -24
  64. package/source/css/_components/tag-plugins/button.styl +2 -2
  65. package/source/css/_components/tag-plugins/chat.styl +44 -8
  66. package/source/css/_components/tag-plugins/checkbox.styl +1 -1
  67. package/source/css/_components/tag-plugins/copy.styl +4 -3
  68. package/source/css/_components/tag-plugins/friends.styl +5 -6
  69. package/source/css/_components/tag-plugins/friends_posts.styl +8 -7
  70. package/source/css/_components/tag-plugins/gallery.styl +1 -2
  71. package/source/css/_components/tag-plugins/image.styl +1 -1
  72. package/source/css/_components/tag-plugins/inline-labels.styl +3 -3
  73. package/source/css/_components/tag-plugins/okr.styl +2 -3
  74. package/source/css/_components/tag-plugins/poetry.styl +1 -1
  75. package/source/css/_components/tag-plugins/quot.styl +2 -25
  76. package/source/css/_components/tag-plugins/read/paper.styl +2 -2
  77. package/source/css/_components/tag-plugins/read/reel.styl +4 -4
  78. package/source/css/_components/tag-plugins/sites.styl +14 -11
  79. package/source/css/_components/tag-plugins/tabs.styl +1 -1
  80. package/source/css/_components/tag-plugins/timeline.styl +10 -4
  81. package/source/css/_components/widgets/components.styl +3 -3
  82. package/source/css/_components/widgets/ghuser.styl +3 -3
  83. package/source/css/_components/widgets/list.styl +1 -1
  84. package/source/css/_components/widgets/markdown.styl +9 -3
  85. package/source/css/_components/widgets/related.styl +3 -3
  86. package/source/css/_components/widgets/tagcloud.styl +2 -2
  87. package/source/css/_components/widgets/timeline.styl +2 -2
  88. package/source/css/_components/widgets/toc.styl +7 -3
  89. package/source/css/_components/widgets/widgets.styl +4 -4
  90. package/source/css/_custom.styl +26 -38
  91. package/source/css/_defines/const.styl +1 -5
  92. package/source/css/_defines/func.styl +4 -4
  93. package/source/css/_defines/theme_base.styl +105 -0
  94. package/source/css/_defines/theme_colorful.styl +117 -0
  95. package/source/css/_plugins/comments/artalk.styl +28 -8
  96. package/source/css/_plugins/comments/twikoo.styl +10 -10
  97. package/source/css/_plugins/comments/waline.styl +2 -2
  98. package/source/css/_plugins/index.styl +1 -2
  99. package/source/css/_plugins/lazyload.styl +40 -50
  100. package/source/css/_plugins/mermaid.styl +1 -1
  101. package/source/css/_plugins/swiper.styl +2 -2
  102. package/source/css/_plugins/tianli_gpt.styl +8 -8
  103. package/source/css/main.styl +2 -1
  104. package/source/js/services/friends.js +1 -0
  105. package/source/js/services/friends_and_posts.js +1 -0
  106. package/source/js/services/sites.js +1 -0
  107. package/source/js/services/timeline.js +1 -0
  108. package/layout/_plugins/lazyload.ejs +0 -21
  109. package/source/css/_components/tag-plugins/common.styl +0 -120
  110. package/source/css/_defines/theme.styl +0 -120
@@ -14,7 +14,7 @@ module.exports = ctx => function(args, content) {
14
14
  var el = ''
15
15
  el += `<div class="tag-plugin banner">`
16
16
  // bg
17
- el += `<img class="bg" src="${args.bg ? args.bg : ctx.theme.config.default.banner}">`
17
+ el += `<img class="lazy bg" data-src="${args.bg ? args.bg : ctx.theme.config.default.banner}">`
18
18
  // content
19
19
  el += `<div class="content">`
20
20
  // content.top
@@ -110,11 +110,7 @@ module.exports = ctx => function(args, content) {
110
110
 
111
111
  function loadIcon(url) {
112
112
  var el = ''
113
- if (ctx.theme.config.plugins.lazyload && ctx.theme.config.plugins.lazyload.enable) {
114
- el += '<div class="lazy img" data-bg="' + ctx.theme.config.default.link + '"></div>'
115
- } else {
116
- el += '<div class="img" style="background-image:url(&quot;' + ctx.theme.config.default.link + '&quot;)"></div>'
117
- }
113
+ el += '<div class="lazy img" data-bg="' + ctx.theme.config.default.link + '"></div>'
118
114
  return el
119
115
  }
120
116
 
@@ -19,7 +19,7 @@ module.exports = ctx => function(args) {
19
19
 
20
20
  var el = `<div class="tag-plugin ${args.posts ? 'users-posts-wrap' : 'users-wrap'}">`
21
21
  if (api) {
22
- el += `<div class="ds-friends${args.posts ? '_and_posts' : ''}" ${ctx.args.joinTags(args, ['size']).join(' ')} api="${api}"><div class="grid-box"></div></div>`
22
+ el += `<div class="data-service ds-friends${args.posts ? '_and_posts' : ''}" ${ctx.args.joinTags(args, ['size']).join(' ')} api="${api}"><div class="grid-box"></div></div>`
23
23
  } else if (args.group) {
24
24
  const links = ctx.theme.config.links || {}
25
25
  el += '<div class="grid-box">'
@@ -27,7 +27,10 @@ module.exports = ctx => function(args) {
27
27
  if (item?.url && item?.title) {
28
28
  el += `<div class="grid-cell user-card">`
29
29
  el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
30
- el += `<img src="${item.icon || item.avatar || ctx.theme.config.default.avatar}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.avatar}&quot;;"/>`
30
+ el += `<div class="lazy-box icon">`
31
+ el += `<img class="lazy" data-src="${item.icon || item.avatar || ctx.theme.config.default.avatar}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.avatar}&quot;;"/>`
32
+ el += `<div class="lazy-icon" style="background-image:url(&quot;${ctx.theme.config.default.loading}&quot;);"></div>`
33
+ el += `</div>`
31
34
  el += `<div class="name">`
32
35
  el += `<span>${item.title}</span>`
33
36
  el += `</div>`
@@ -17,13 +17,14 @@
17
17
 
18
18
  var index = 0
19
19
 
20
- function img(src, alt) {
20
+ function img(src, alt, loading) {
21
21
  let img = ''
22
- img += `<img data-fancybox="gallery-${index}" src="${src}"`
22
+ img += `<img class="lazy" data-fancybox="gallery-${index}" data-src="${src}"`
23
23
  if (alt?.length > 0) {
24
24
  img += ` alt="${alt}"`
25
25
  }
26
26
  img += `/>`
27
+ img += `<div class="lazy-icon" style="background-image:url(${loading});"></div>`
27
28
  // cap
28
29
  img += `<div class="image-meta">`
29
30
  if (alt?.length > 0) {
@@ -54,7 +55,7 @@ module.exports = ctx => function(args, content) {
54
55
  if (matches?.length > 2) {
55
56
  let alt = matches[1]
56
57
  let src = matches[2]
57
- el += `<div class="${layoutType}-cell">${img(src, alt)}</div>`
58
+ el += `<div class="${layoutType}-cell lazy-box">${img(src, alt, ctx.theme.config.default.loading)}</div>`
58
59
  }
59
60
  }
60
61
  el += `</div>`
@@ -38,11 +38,11 @@ module.exports = ctx => function(args) {
38
38
  }
39
39
 
40
40
  function img(src, alt, style) {
41
- let img = ''
42
- img += `<img src="${src}" data-src="${src}"`
43
41
  let a = '<a data-fancybox'
42
+ let img = ''
43
+ img += `<img class="lazy" src="${src}" data-src="${src}"`
44
44
  if (alt) {
45
- img += ' alt="' + alt + '"'
45
+ img += ` alt="${alt}"`
46
46
  a += ` data-caption="${alt}"`
47
47
  }
48
48
  if (fancybox && !fancyboxHref) {
@@ -53,12 +53,12 @@ module.exports = ctx => function(args) {
53
53
  }
54
54
  img += `onerror="this.src=&quot;${ctx.theme.config.default.image_onerror}&quot;"`
55
55
  img += '/>'
56
-
56
+ // loading
57
+ img += `<div class="lazy-icon" style="background-image:url(${ctx.theme.config.default.loading});"></div>`
57
58
  if (fancyboxHref) {
58
59
  a += ` href="${fancyboxHref}">${img}</a>`
59
60
  return a
60
61
  }
61
-
62
62
  return img
63
63
  }
64
64
 
@@ -45,11 +45,7 @@ module.exports = ctx => function(args) {
45
45
 
46
46
  function loadIcon() {
47
47
  var el = ''
48
- if (ctx.theme.config.plugins.lazyload && ctx.theme.config.plugins.lazyload.enable) {
49
- el += '<div class="lazy img" data-bg="' + (args.icon || ctx.theme.config.default.link) + '"></div>'
50
- } else {
51
- el += '<div class="lazy img" style="background-image:url(&quot;' + (args.icon || ctx.theme.config.default.link) + '&quot;)"></div>'
52
- }
48
+ el += '<div class="lazy img" data-bg="' + (args.icon || ctx.theme.config.default.link) + '"></div>'
53
49
  return el
54
50
  }
55
51
  function loadTitle() {
@@ -15,6 +15,6 @@ module.exports = ctx => function(args) {
15
15
  args = ctx.args.map(args, [''], ['src'])
16
16
  const md_id = "md_" + ++md_index
17
17
  return `
18
- <div class="ds-mdrender" src="${args.src}" id="${md_id}"></div>
18
+ <div class="data-service ds-mdrender" src="${args.src}" id="${md_id}"></div>
19
19
  `
20
20
  }
@@ -11,7 +11,7 @@ module.exports = ctx => function(args) {
11
11
  var args = ctx.args.map(args, ['repo', 'api', 'size'], ['group'])
12
12
  const host = ctx.theme.config.api_host.ghraw
13
13
  if (args.size == null) {
14
- args.size = 'm'
14
+ args.size = 'xs'
15
15
  }
16
16
  var api
17
17
  if (args.api) {
@@ -23,15 +23,16 @@ module.exports = ctx => function(args) {
23
23
  var el = ''
24
24
  el += `<div class="tag-plugin posters-wrap">`
25
25
  if (api) {
26
- el += `<div class="ds-friends" api="${api}"><div class="tag-plugin gallery grid-box" layout="grid" ratio="square" ${ctx.args.joinTags(args, ['size']).join(' ')}></div></div>`
26
+ el += `<div class="data-service ds-friends" api="${api}"><div class="tag-plugin gallery grid-box" layout="grid" ratio="square" ${ctx.args.joinTags(args, ['size']).join(' ')}></div></div>`
27
27
  } else if (args.group) {
28
28
  const links = ctx.theme.config.links || {}
29
29
  el += `<div class="tag-plugin gallery grid-box" layout="grid" ratio="portrait" ${ctx.args.joinTags(args, ['size']).join(' ')}>`
30
30
  for (let item of (links[args.group] || [])) {
31
31
  if (item?.url) {
32
32
  el += `<div class="grid-cell poster-card">`
33
- el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
34
- el += `<img src="${item.cover || item.icon || item.avatar || ctx.theme.config.default.cover}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.cover}&quot;;"/>`
33
+ el += `<a class="card-link lazy-box" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
34
+ el += `<img class="lazy" data-src="${item.cover || item.icon || item.avatar || ctx.theme.config.default.cover}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.cover}&quot;;"/>`
35
+ el += `<div class="lazy-icon" style="background-image:url(${ctx.theme.config.default.loading});"></div>`
35
36
  el += `<div class="image-meta">`
36
37
  if (item.title) {
37
38
  el += `<span class="image-caption">${item.title}</span>`
@@ -19,7 +19,7 @@ module.exports = ctx => function(args) {
19
19
 
20
20
  var el = '<div class="tag-plugin sites-wrap">'
21
21
  if (api) {
22
- el += '<div class="ds-sites"'
22
+ el += '<div class="data-service ds-sites"'
23
23
  el += ' api="' + api + '"'
24
24
  el += '>'
25
25
  el += '<div class="grid-box"></div>'
@@ -31,9 +31,15 @@ module.exports = ctx => function(args) {
31
31
  if (item?.url && item?.title) {
32
32
  el += `<div class="grid-cell site-card">`
33
33
  el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
34
- el += `<img src="${item.cover || item.snapshot || item.screenshot || ('https://image.thum.io/get/width/1280/crop/720/' + item.url)}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.cover}&quot;;"/>`
34
+ el += `<div class="lazy-box snapshot">`
35
+ el += `<img class="lazy" data-src="${item.cover || item.snapshot || item.screenshot || ('https://image.thum.io/get/width/1280/crop/720/' + item.url)}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.cover}&quot;;"/>`
36
+ el += `<div class="lazy-icon" style="background-image:url(&quot;${ctx.theme.config.default.loading}&quot;);"></div>`
37
+ el += `</div>`
35
38
  el += `<div class="info">`
36
- el += `<img src="${item.icon || item.avatar || ctx.theme.config.default.link}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${item.icon || item.avatar || ctx.theme.config.default.link}&quot;;"/>`
39
+ el += `<div class="lazy-box icon">`
40
+ el += `<img class="lazy" data-src="${item.icon || item.avatar || ctx.theme.config.default.link}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${item.icon || item.avatar || ctx.theme.config.default.link}&quot;;"/>`
41
+ el += `<div class="lazy-icon" style="background-image:url(&quot;${ctx.theme.config.default.loading}&quot;);"></div>`
42
+ el += `</div>`
37
43
  el += `<span class="title">${item.title}</span>`
38
44
  el += `<span class="desc">${item.description || item.url}</span>`
39
45
  el += `</div>`
@@ -41,7 +41,7 @@ module.exports = ctx => function(args, content = '') {
41
41
  args.type = 'timeline'
42
42
  }
43
43
  if (args.api && args.api.length > 0) {
44
- el += `<div class="tag-plugin timeline ds-${args.type}"`
44
+ el += `<div class="tag-plugin timeline data-service ds-${args.type}"`
45
45
  el += ' ' + ctx.args.joinTags(args, ['api', 'user', 'limit', 'hide', 'avatar']).join(' ')
46
46
  el += '>'
47
47
  } else {
@@ -8,9 +8,9 @@ pre
8
8
 
9
9
  a
10
10
  text-decoration: none
11
- color: var(--theme-link)
11
+ color: var(--link)
12
12
  &:hover
13
- color: $color-hover
13
+ color: var(--accent)
14
14
 
15
15
  .md-text p:not([class])
16
16
  text-align: convert(hexo-config('style.text-align'))
@@ -64,6 +64,3 @@ table:not([class])
64
64
  word-break: keep-all
65
65
  white-space:nowrap
66
66
 
67
-
68
- *[ff=title]
69
- font-family: $ff-logo
@@ -18,4 +18,4 @@ blockquote
18
18
  opacity: 0.5
19
19
  background: var(--text-meta)
20
20
  &:hover:before
21
- background: $color-theme
21
+ background: var(--theme)
@@ -1,15 +1,15 @@
1
1
  :root
2
2
  --blur-px: 12px
3
- --blur-bg: var(--alpha50)
4
-
3
+ --blur-bg: var(--bg-a50)
4
+ --blur-sat: 300%
5
5
  blur-effect()
6
- background: var(--blur-bg)
6
+ background-color: var(--blur-bg)
7
7
  @supports ((-webkit-backdrop-filter:blur(var(--blur-px))) or (backdrop-filter:blur(var(--blur-px))))
8
- background: var(--blur-bg) !important
9
- backdrop-filter: saturate(300%) blur(var(--blur-px))
10
- -webkit-backdrop-filter: saturate(300%) blur(var(--blur-px))
8
+ background-color: var(--blur-bg) !important
9
+ backdrop-filter: saturate(var(--blur-sat)) blur(var(--blur-px))
10
+ -webkit-backdrop-filter: saturate(var(--blur-sat)) blur(var(--blur-px))
11
11
  &:hover
12
- background: var(--card)
12
+ background-color: var(--card)
13
13
 
14
14
  .blur
15
15
  blur-effect()
@@ -13,10 +13,10 @@ a.button
13
13
  font-size: $fs-15
14
14
  user-select: none
15
15
  &.theme
16
- background: $color-theme
16
+ background: var(--theme)
17
17
  color: var(--card)
18
18
  &:hover
19
- background: $color-hover
19
+ background: var(--accent)
20
20
  &.start
21
21
  border-radius: 100px
22
22
  background: var(--text-p1)
@@ -8,4 +8,4 @@
8
8
  &.cyan
9
9
  color: darken($color-mac-cyan, 6)
10
10
  &.theme
11
- color: darken($color-theme, 5)
11
+ color: var(--theme)
@@ -50,12 +50,12 @@
50
50
 
51
51
  // 侧边栏弹出后
52
52
  .l_body[leftbar] .float-panel, .l_body[rightbar] .float-panel
53
- box-shadow: 0 0 4px -1px $color-theme, 0 0 16px -4px $color-theme, 0 0 32px -12px $color-theme, 0 0 128px -32px $color-theme
53
+ box-shadow: 0 0 4px -1px var(--theme), 0 0 16px -4px var(--theme), 0 0 32px -12px var(--theme), 0 0 128px -32px var(--theme)
54
54
  &:before
55
- background: var(--alpha50)
55
+ background: var(--bg-a50)
56
56
 
57
57
  .l_body[leftbar] .float-panel button.leftbar-toggle
58
- color: $color-theme
58
+ color: var(--theme)
59
59
  svg g
60
60
  fill: currentColor
61
61
  fill-opacity: 0.3
@@ -68,7 +68,7 @@
68
68
  display: none !important
69
69
 
70
70
  .l_body[rightbar] .float-panel button.rightbar-toggle
71
- color: $color-theme
71
+ color: var(--theme)
72
72
  svg g
73
73
  fill: currentColor
74
74
  fill-opacity: 0.3
@@ -11,6 +11,7 @@ p>code:not([class]),li>code:not([class])
11
11
  color: var(--text-code)
12
12
 
13
13
  .md-text .highlight, pre:not([class]):has(>code)
14
+ --theme: var(--text-p3)
14
15
  margin: var(--gap-p) 0
15
16
  border-radius: $border-card
16
17
  overflow: hidden
@@ -81,6 +82,7 @@ p>code:not([class]),li>code:not([class])
81
82
  border-radius: $border-card
82
83
  overflow: hidden
83
84
  .gist-data
85
+ --bgColor-default: var(--block)
84
86
  border-bottom: 1px solid var(--block-border)
85
87
  .highlight
86
88
  display: inherit
@@ -9,7 +9,7 @@ html
9
9
  if hexo-config('style.smooth_scroll')
10
10
  scroll-behavior: smooth
11
11
  body
12
- background: var(--site-bg)
12
+ background: var(--background)
13
13
  margin: 0
14
14
  -webkit-font-smoothing: antialiased
15
15
  -moz-osx-font-smoothing: grayscale
@@ -6,4 +6,4 @@ svg.icon
6
6
  overflow: hidden
7
7
 
8
8
  svg.active-icon
9
- color: $color-theme
9
+ color: var(--theme)
@@ -40,4 +40,4 @@ h6
40
40
  color: inherit
41
41
  font-weight: 500
42
42
  &:hover
43
- color: $color-hover
43
+ color: var(--accent)
@@ -45,10 +45,10 @@
45
45
  max-height: 'calc(%s - %s * 2 - %s)' % (100vh var(--gap-margin) $rightbar-bottom-margin)
46
46
  box-shadow: $boxshadow-card-float
47
47
  z-index: 10
48
- background: var(--site-bg)
48
+ background: var(--background)
49
49
  overflow: auto
50
50
  scrollbar(0, 0)
51
- --blur-bg: var(--alpha60)
51
+ --blur-bg: var(--bg-a60)
52
52
  --blur-px: 50px
53
53
  .l_body[rightbar]
54
54
  .l_right
@@ -187,8 +187,7 @@
187
187
  width: 96px
188
188
  max-height: 96px
189
189
  object-fit: contain
190
- &:not(.lazy)
191
- trans1: transform 0.75s
190
+ trans1: all 0.75s
192
191
  .post-list .post-card.wiki article .excerpt
193
192
  margin: 1rem .5rem
194
193
  @media screen and (min-width: 950px)
@@ -20,13 +20,17 @@ body>.sitebg
20
20
  right: 0
21
21
  bottom: 0
22
22
  background-size: cover
23
- if hexo-config('style.site') && hexo-config('style.site.background-image')
24
- background-image: convert(hexo-config('style.site.background-image'))
23
+ if $site-background-image
24
+ background-image: convert($site-background-image)
25
25
  .siteblur
26
26
  width: 100%
27
27
  height: 100%
28
+ --blur-px: 0
29
+ --blur-sat: 200%
28
30
  blur-effect()
29
- if hexo-config('style.site') && hexo-config('style.site.blur-px')
31
+ if hexo-config('style.site.blur-sat')
32
+ --blur-sat: convert(hexo-config('style.site.blur-sat'))
33
+ if hexo-config('style.site.blur-px')
30
34
  --blur-px: convert(hexo-config('style.site.blur-px'))
31
- if hexo-config('style.site') && hexo-config('style.site.blur-bg')
35
+ if hexo-config('style.site.blur-bg')
32
36
  --blur-bg: convert(hexo-config('style.site.blur-bg'))
@@ -92,9 +92,9 @@ table a:not([class])
92
92
  background: linear-gradient(0deg,var(--block-border),var(--block-border)) no-repeat left 100%/100% 2px
93
93
  &:hover
94
94
  text-decoration: none
95
- color: var(--theme-link)
95
+ color: var(--link)
96
96
  border-radius: 4px
97
- background: linear-gradient(0deg,var(--theme-link-opa),var(--theme-link-opa)) no-repeat left 100%/100% 100%
97
+ background: linear-gradient(0deg,var(--link-a20),var(--link-a20)) no-repeat left 100%/100% 100%
98
98
  &:has(img)
99
99
  background: none
100
100
  &:hover
@@ -18,7 +18,7 @@
18
18
  right: 0
19
19
  z-index: -1
20
20
  border-radius: 4px
21
- background: $color-theme
21
+ background: var(--theme)
22
22
  a.post
23
23
  display: inline-flex
24
24
  align-items: baseline
@@ -33,10 +33,10 @@
33
33
  flex-shrink: 0
34
34
  color: var(--text-p4)
35
35
  &:hover
36
- border-bottom: 1px solid $color-theme
36
+ border-bottom: 1px solid var(--theme)
37
37
  color: var(--text)
38
38
  time
39
- color: $color-theme
39
+ color: var(--theme)
40
40
 
41
41
 
42
42
 
@@ -71,7 +71,7 @@
71
71
  color: var(--text)
72
72
  .badge
73
73
  opacity: 1
74
- color: $color-theme
74
+ color: var(--theme)
75
75
 
76
76
  .post-list #tags
77
77
  display: flex
@@ -96,7 +96,7 @@
96
96
  opacity: .4
97
97
  &:hover
98
98
  &:before
99
- color $color-theme
99
+ color var(--theme)
100
100
  opacity: 1
101
101
  color: var(--text)
102
102
  background: var(--block-border)
@@ -1,7 +1,7 @@
1
1
  .l_body[type=story] .md-text.content
2
2
  --fsp: 'calc(%s + 1px)' % $fs-body
3
3
  --gap-p: 2rem
4
- div.tag-plugin,p>img
4
+ >div.tag-plugin,>p>img
5
5
  margin-top: 2.4rem
6
6
  margin-bottom: 2.4rem
7
7
  // 段落标题
@@ -9,13 +9,13 @@
9
9
  color: var(--text)
10
10
  line-height: 1.2
11
11
  >a:first-child
12
- background: $color-theme
12
+ background: var(--theme)
13
13
  border-radius: 2px
14
14
  margin-right: 8px
15
15
  padding: 0 2px
16
16
  trans1 all
17
17
  &:hover
18
- background: $color-hover
18
+ background: var(--accent)
19
19
  &:before,&:after
20
20
  color: white
21
21
  font-weight: 700
@@ -30,7 +30,7 @@
30
30
  display: inline-block
31
31
  width: 12px
32
32
  height: 1.2em
33
- background: $cDeepOrange
33
+ background: $c-accent
34
34
  transform: skewX(-20deg)
35
35
  margin: 0 0.5em
36
36
  vertical-align: top
@@ -41,7 +41,7 @@
41
41
  &:before,&:after
42
42
  position absolute
43
43
  font-size: 1.2em
44
- background-color: hsla($color-theme, 0.5)
44
+ background-color: x-theme-alpha(0.5)
45
45
  width: 1em
46
46
  height: 1em
47
47
  content: ''
@@ -51,9 +51,9 @@
51
51
  vertical-align: middle
52
52
  &:before
53
53
  margin-left: -1em
54
- svg-mask-icon($h3Left)
54
+ svg-mask-icon($iH3Left)
55
55
  &:after
56
- svg-mask-icon($h3Right)
56
+ svg-mask-icon($iH3Right)
57
57
 
58
58
  h4:not([class])
59
59
  position: relative
@@ -64,7 +64,7 @@
64
64
  height: 32px
65
65
  margin-left: -16px
66
66
  margin-top: -12px
67
- background: hsla($color-theme, 0.3)
67
+ background: x-theme-alpha(0.3)
68
68
  border-radius: 50%
69
69
  --blur-px: 8px
70
70
  filter: blur(var(--blur-px))
@@ -73,7 +73,7 @@
73
73
  trans1 all 0.5s
74
74
  &:hover:before
75
75
  --blur-px: 24px
76
- background: hsla($color-theme, 1)
76
+ background: x-theme-alpha(1)
77
77
 
78
78
  ol,ul
79
79
  margin-left: 'calc(%s * 2)' % var(--fsp)
@@ -104,7 +104,7 @@
104
104
  &:before,&:after
105
105
  position: absolute
106
106
  font-size: 2rem
107
- background-color: hsla($color-theme, 0.25)
107
+ background-color: x-theme-alpha(0.25)
108
108
  top: -0.3em
109
109
  width: 1em
110
110
  height: 1em
@@ -123,7 +123,7 @@
123
123
  text-indent: 2em
124
124
  &:hover
125
125
  &:before,&:after
126
- background-color: hsla($color-theme, 0.5)
126
+ background-color: x-theme-alpha(0.5)
127
127
 
128
128
 
129
129
  .l_body[type=story] .article.banner .content .bottom.only-title
@@ -3,13 +3,13 @@
3
3
  color: var(--text)
4
4
  line-height: 1.8
5
5
  >a:first-child
6
- background: $color-theme
6
+ background: var(--theme)
7
7
  border-radius: 2px
8
8
  margin-right: 8px
9
9
  padding: 0 2px
10
10
  trans1 all
11
11
  &:hover
12
- background: $color-hover
12
+ background: var(--accent)
13
13
  &:before,&:after
14
14
  color: white
15
15
  font-weight: 700
@@ -21,7 +21,7 @@
21
21
  opacity: .4
22
22
  &:hover
23
23
  &:before
24
- color $color-theme
24
+ color var(--theme)
25
25
  opacity: 1
26
26
  color: var(--text)
27
27
  background: var(--block-border)
@@ -40,7 +40,7 @@
40
40
  justify-content: end
41
41
  align-items: center
42
42
  &:hover
43
- color: $color-theme
43
+ color: var(--theme)
44
44
 
45
45
  .widget-body.tag-tree .tag-subtree.parent-tag > a .tag-switcher
46
46
  display: inline-block
@@ -10,24 +10,19 @@
10
10
  background: var(--block-border)
11
11
 
12
12
  .page-footer .sitemap
13
- margin: .5rem -4px 2rem
14
- display: grid
15
- scrollbar-width: none
13
+ margin: .5rem -4px
16
14
  grid-gap: 1rem 1rem
17
- grid-auto-flow: column dense
18
- // grid-template-columns: repeat(auto-fill, minmax(80px, 1fr))
19
- grid-template-columns: repeat(4, 1fr)
20
- overflow: scroll
21
15
  scrollbar(0, 0)
22
-
16
+ column-count: 4
23
17
 
24
18
  .page-footer .sitemap .sitemap-group
19
+ break-inside: avoid
25
20
  display: flex
26
21
  flex-direction: column
27
22
  align-items: flex-start
23
+ padding-bottom: 1rem
28
24
  >span,>a
29
25
  text-decoration: none
30
- txt-ellipsis()
31
26
  padding: 4px
32
27
  >span
33
28
  font-weight: 500
@@ -36,6 +31,7 @@
36
31
 
37
32
 
38
33
  .page-footer .text
34
+ margin-top: .5rem
39
35
  p
40
36
  margin: 4px 0
41
37
  line-height: 1.5
@@ -35,11 +35,11 @@
35
35
  z-index: 1
36
36
  trans1 all
37
37
  &:hover
38
- background: var(--alpha100)
38
+ background: var(--bg-a100)
39
39
  &.active, &:hover
40
40
  color: var(--text)
41
41
  &.active
42
- background: var(--alpha60)
42
+ background: var(--bg-a60)
43
43
  @media (prefers-color-scheme: dark)
44
44
  background: rgba(white, 0.25)
45
45
  box-shadow: $boxshadow-button
@@ -49,11 +49,11 @@ article.md-text.content+.related-wrap
49
49
  -webkit-line-clamp: 2
50
50
  &.active
51
51
  .title
52
- border-bottom: 1px dashed $color-theme
52
+ border-bottom: 1px dashed var(--theme)
53
53
  &:hover
54
54
  .title
55
- color: $color-hover
56
- border-bottom: 1px solid $color-hover
55
+ color: var(--accent)
56
+ border-bottom: 1px solid var(--accent)
57
57
 
58
58
 
59
59
  .related-wrap#read-next
@@ -76,7 +76,7 @@ article.md-text.content+.related-wrap
76
76
  color: var(--text-p1)
77
77
  font-size: $fsh5
78
78
  &:hover
79
- color: $color-hover !important
79
+ color: var(--accent) !important
80
80
  #next
81
81
  text-align: right
82
82
  .wiki+.related-wrap#read-next
@@ -94,8 +94,8 @@ article.md-text.content+.related-wrap
94
94
  margin: 0
95
95
  font-size: inherit
96
96
  a
97
- --theme-link: $color-theme
98
- --theme-link-opa: rgba($color-theme, 0.2)
97
+ --link: var(--theme)
98
+ --link-a20: x-theme-alpha(0.2)
99
99
  .cmt-body
100
100
  min-height: 150px
101
101
  position: relative