hexo-theme-stellar 1.32.0 → 1.32.2

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 (115) hide show
  1. package/_config.yml +47 -41
  2. package/layout/_partial/cover/post_cover.ejs +1 -5
  3. package/layout/_partial/cover/wiki_cover.ejs +1 -1
  4. package/layout/_partial/main/footer.ejs +15 -5
  5. package/layout/_partial/main/navbar/article_banner.ejs +1 -1
  6. package/layout/_partial/main/navbar/ghinfo.ejs +1 -1
  7. package/layout/_partial/scripts/defines.ejs +3 -1
  8. package/layout/_partial/scripts/lazyload.ejs +67 -0
  9. package/layout/_partial/scripts/utils.ejs +1 -0
  10. package/layout/_partial/scripts.ejs +1 -0
  11. package/layout/_partial/sidebar/index_leftbar.ejs +1 -1
  12. package/layout/_partial/sidebar/logo.ejs +1 -1
  13. package/layout/_partial/widgets/author.ejs +1 -1
  14. package/layout/_partial/widgets/ghissues.ejs +1 -1
  15. package/layout/_partial/widgets/ghrepo.ejs +2 -2
  16. package/layout/_partial/widgets/ghuser.ejs +2 -2
  17. package/layout/_partial/widgets/markdown.ejs +1 -1
  18. package/layout/_partial/widgets/recent.ejs +1 -1
  19. package/layout/_partial/widgets/related.ejs +1 -1
  20. package/layout/_partial/widgets/timeline.ejs +1 -1
  21. package/layout/_partial/widgets/tree.ejs +1 -1
  22. package/layout/_plugins/scrollreveal.ejs +3 -3
  23. package/package.json +1 -1
  24. package/scripts/events/lib/get_image_ratios.js +53 -31
  25. package/scripts/tags/index.js +1 -1
  26. package/scripts/tags/lib/albums.js +4 -3
  27. package/scripts/tags/lib/banner.js +1 -1
  28. package/scripts/tags/lib/{quote.js → blockquote.js} +5 -5
  29. package/scripts/tags/lib/chat.js +1 -5
  30. package/scripts/tags/lib/friends.js +1 -1
  31. package/scripts/tags/lib/gallery.js +4 -3
  32. package/scripts/tags/lib/image.js +5 -5
  33. package/scripts/tags/lib/link.js +1 -5
  34. package/scripts/tags/lib/md.js +1 -1
  35. package/scripts/tags/lib/navbar.js +2 -2
  36. package/scripts/tags/lib/posters.js +4 -3
  37. package/scripts/tags/lib/sites.js +7 -1
  38. package/scripts/tags/lib/timeline.js +1 -1
  39. package/source/css/_common/base.styl +17 -9
  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/canonical.styl +1 -1
  44. package/source/css/_common/cap.styl +1 -1
  45. package/source/css/_common/device.styl +4 -4
  46. package/source/css/_common/highlight.styl +7 -2
  47. package/source/css/_common/html.styl +1 -1
  48. package/source/css/_common/svg.styl +1 -1
  49. package/source/css/_common/title.styl +1 -1
  50. package/source/css/_components/layout.styl +2 -2
  51. package/source/css/_components/list.styl +1 -2
  52. package/source/css/_components/main.styl +8 -4
  53. package/source/css/_components/md.styl +2 -2
  54. package/source/css/_components/pages/archives.styl +5 -5
  55. package/source/css/_components/pages/article-story.styl +42 -40
  56. package/source/css/_components/pages/article-tech.styl +2 -2
  57. package/source/css/_components/pages/notebook.styl +2 -2
  58. package/source/css/_components/partial/footer.styl +5 -9
  59. package/source/css/_components/partial/navbar.styl +2 -2
  60. package/source/css/_components/partial/related.styl +6 -6
  61. package/source/css/_components/sidebar/footer.styl +1 -1
  62. package/source/css/_components/sidebar/menu.styl +3 -3
  63. package/source/css/_components/sidebar/search.styl +7 -7
  64. package/source/css/_components/sidebar/sidebar.styl +24 -24
  65. package/source/css/_components/tag-plugins/button.styl +2 -2
  66. package/source/css/_components/tag-plugins/chat.styl +44 -8
  67. package/source/css/_components/tag-plugins/checkbox.styl +1 -1
  68. package/source/css/_components/tag-plugins/copy.styl +13 -8
  69. package/source/css/_components/tag-plugins/friends.styl +5 -6
  70. package/source/css/_components/tag-plugins/friends_posts.styl +8 -7
  71. package/source/css/_components/tag-plugins/gallery.styl +1 -2
  72. package/source/css/_components/tag-plugins/image.styl +1 -1
  73. package/source/css/_components/tag-plugins/inline-labels.styl +3 -3
  74. package/source/css/_components/tag-plugins/navbar.styl +18 -8
  75. package/source/css/_components/tag-plugins/note.styl +0 -3
  76. package/source/css/_components/tag-plugins/okr.styl +2 -3
  77. package/source/css/_components/tag-plugins/override.styl +0 -5
  78. package/source/css/_components/tag-plugins/poetry.styl +1 -1
  79. package/source/css/_components/tag-plugins/quot.styl +1 -25
  80. package/source/css/_components/tag-plugins/quote.styl +1 -1
  81. package/source/css/_components/tag-plugins/read/paper.styl +2 -2
  82. package/source/css/_components/tag-plugins/read/reel.styl +4 -4
  83. package/source/css/_components/tag-plugins/sites.styl +14 -11
  84. package/source/css/_components/tag-plugins/tabs.styl +1 -1
  85. package/source/css/_components/tag-plugins/timeline.styl +10 -4
  86. package/source/css/_components/widgets/components.styl +3 -3
  87. package/source/css/_components/widgets/ghuser.styl +3 -3
  88. package/source/css/_components/widgets/list.styl +2 -2
  89. package/source/css/_components/widgets/markdown.styl +9 -3
  90. package/source/css/_components/widgets/related.styl +3 -3
  91. package/source/css/_components/widgets/tagcloud.styl +2 -2
  92. package/source/css/_components/widgets/timeline.styl +2 -2
  93. package/source/css/_components/widgets/toc.styl +3 -4
  94. package/source/css/_components/widgets/widgets.styl +4 -4
  95. package/source/css/_custom.styl +26 -38
  96. package/source/css/_defines/const.styl +1 -5
  97. package/source/css/_defines/func.styl +4 -4
  98. package/source/css/_defines/theme_base.styl +105 -0
  99. package/source/css/_defines/theme_colorful.styl +117 -0
  100. package/source/css/_plugins/comments/artalk.styl +25 -8
  101. package/source/css/_plugins/comments/twikoo.styl +11 -11
  102. package/source/css/_plugins/comments/waline.styl +2 -2
  103. package/source/css/_plugins/index.styl +1 -2
  104. package/source/css/_plugins/lazyload.styl +40 -50
  105. package/source/css/_plugins/mermaid.styl +1 -1
  106. package/source/css/_plugins/swiper.styl +2 -2
  107. package/source/css/_plugins/tianli_gpt.styl +8 -8
  108. package/source/css/main.styl +2 -1
  109. package/source/js/services/friends.js +1 -0
  110. package/source/js/services/friends_and_posts.js +1 -0
  111. package/source/js/services/sites.js +1 -0
  112. package/source/js/services/timeline.js +1 -0
  113. package/layout/_plugins/lazyload.ejs +0 -21
  114. package/source/css/_components/tag-plugins/common.styl +0 -120
  115. package/source/css/_defines/theme.styl +0 -120
@@ -23,15 +23,16 @@ module.exports = ctx => function(args) {
23
23
  var el = ''
24
24
  el += `<div class="tag-plugin albums-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="square" ${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 album-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>`
@@ -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
@@ -1,11 +1,11 @@
1
1
  /**
2
- * quote.js v1.1 | https://github.com/xaoxuu/hexo-theme-stellar/
2
+ * blockquote.js v1.1 | https://github.com/xaoxuu/hexo-theme-stellar/
3
3
  * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
4
4
  *
5
- * quote:
6
- * {% quote [indent:true/false] %}
5
+ * blockquote:
6
+ * {% blockquote [indent:true/false] %}
7
7
  * body
8
- * {% endquote %}
8
+ * {% endblockquote %}
9
9
  *
10
10
  */
11
11
 
@@ -15,7 +15,7 @@ module.exports = ctx => function(args, content) {
15
15
  var el = ''
16
16
  args = ctx.args.map(args, ['indent'], [])
17
17
 
18
- el += `<div class="tag-plugin quote" indent="${args.indent}">`
18
+ el += `<div class="tag-plugin blockquote" indent="${args.indent}">`
19
19
  el += ctx.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')
20
20
  el += `</div>`
21
21
  return el
@@ -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">'
@@ -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
  }
@@ -18,7 +18,7 @@ module.exports = ctx => function(args) {
18
18
  if (args.links) {
19
19
  args.links = args.links.split(' ')
20
20
  }
21
- var el = `<div class="tag-plugin navbar"><nav>`
21
+ var el = `<div class="tag-plugin navbar">`
22
22
  for (let link of args.links) {
23
23
  const matches = link.match(/\[(.*?)\]\((.*?)\)/i)
24
24
  if (matches?.length > 2) {
@@ -33,6 +33,6 @@ module.exports = ctx => function(args) {
33
33
  el += `<a class="link" href="#${link}">${link}</a>`
34
34
  }
35
35
  }
36
- el += `</nav></div>`
36
+ el += `</div>`
37
37
  return el
38
38
  }
@@ -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 += `<div class="lazy-box snapshot">`
34
35
  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;;"/>`
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">`
39
+ el += `<div class="lazy-box icon">`
36
40
  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;;"/>`
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'))
@@ -35,24 +35,32 @@ ul,ol
35
35
  table:not([class])
36
36
  border-collapse: collapse
37
37
  overflow: auto
38
- display: block
39
38
  margin: 1rem 0
40
39
  max-width: 100%
41
40
  vertical-align: text-top
42
41
  --fsp: $fsp2
43
42
  font-size: var(--fsp)
43
+ scrollbar(0,0)
44
+ display: table
44
45
  th
45
46
  background: var(--block)
47
+ border-top: 1px solid var(--block-border)
48
+ border-bottom: 1px solid var(--block-border)
46
49
  td,th
47
- padding: 0.5em 1em
48
- border: 1px solid var(--block-border)
50
+ padding: 4px 1em
49
51
  line-height: 1.5
50
52
  tr
51
- word-break: keep-all
52
- white-space:nowrap
53
+ border-bottom: 1px dashed var(--block-border)
53
54
  trans()
54
55
  &:hover
55
56
  background: var(--block)
56
57
 
57
- *[ff=title]
58
- font-family: $ff-logo
58
+ @media screen and (min-width: $device-mobile-max)
59
+ width 100%
60
+
61
+ @media screen and (max-width: $device-mobile-max)
62
+ display: block
63
+ tr
64
+ word-break: keep-all
65
+ white-space:nowrap
66
+
@@ -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)
@@ -5,7 +5,7 @@
5
5
  left: 50%
6
6
  transform: translateX(-50%)
7
7
  max-width: 90%
8
- background-color: var(--block-border)
8
+ background-color: var(--card)
9
9
  color: var(--text-p1)
10
10
  font-size: 1rem
11
11
  font-family: #fff8e1
@@ -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
@@ -36,7 +37,7 @@ p>code:not([class]),li>code:not([class])
36
37
  display: block
37
38
  border-bottom-left-radius: $border-button
38
39
  border-bottom-right-radius: $border-button
39
- background: var(--block-border)
40
+ background: var(--block)
40
41
  >table
41
42
  overflow: auto
42
43
  display: block
@@ -50,6 +51,7 @@ p>code:not([class]),li>code:not([class])
50
51
  scrollbar-codeblock(convert(hexo-config('style.codeblock.scrollbar')))
51
52
  tr
52
53
  background: transparent
54
+ border: none
53
55
  &:hover
54
56
  background: transparent
55
57
 
@@ -80,6 +82,7 @@ p>code:not([class]),li>code:not([class])
80
82
  border-radius: $border-card
81
83
  overflow: hidden
82
84
  .gist-data
85
+ --bgColor-default: var(--block)
83
86
  border-bottom: 1px solid var(--block-border)
84
87
  .highlight
85
88
  display: inherit
@@ -88,11 +91,13 @@ p>code:not([class]),li>code:not([class])
88
91
  background: var(--block)
89
92
  margin: 0
90
93
  padding: 1em 0
94
+ pre
95
+ background: none
91
96
  .blob-code-inner
92
97
  color: var(--text-p1)
93
98
  font-family: $ff-codeblock
94
99
  .gist-meta
95
- background: var(--block-border)
100
+ background: var(--block)
96
101
 
97
102
 
98
103
  table:not([class])
@@ -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
24
+ background-image: convert($site-background)
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)