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
@@ -35,8 +35,8 @@
35
35
  border-radius: 64px
36
36
  margin: 1rem 0 0
37
37
  padding: 0.5rem 1rem
38
- background: $color-theme
39
- color: var(--card)
38
+ background: var(--theme)
39
+ color: white
40
40
  font-size: 1rem
41
41
  align-self: stretch
42
42
  text-align: center
@@ -50,7 +50,7 @@
50
50
  height: 1.5em
51
51
  width: auto
52
52
  &:hover
53
- background: $color-hover
53
+ background: var(--accent)
54
54
 
55
55
  .buttons
56
56
  margin: 1rem 0
@@ -7,7 +7,7 @@
7
7
  color: var(--text-p1)
8
8
  trans1 background
9
9
  &.active,&:hover
10
- background: var(--alpha100)
10
+ background: var(--bg-a100)
11
11
  a+a
12
12
  margin-top: 2px
13
13
  a
@@ -2,13 +2,19 @@
2
2
  .widget-body
3
3
  border-radius: $border-card-s
4
4
  padding: .25rem 1rem
5
- background: var(--alpha50)
5
+ background: var(--bg-a50)
6
6
  >*:first-child
7
7
  margin-top: .75rem
8
8
 
9
9
  .widget-wrapper.markdown .linklist
10
10
  margin: 1em 0
11
11
  .link
12
- background: var(--alpha50)
12
+ background: var(--bg-a50)
13
13
  .link:hover
14
- background: var(--alpha100)
14
+ background: var(--bg-a100)
15
+
16
+ .l_right .widget-wrapper.markdown .linklist
17
+ .link
18
+ background: var(--block)
19
+ .link:hover
20
+ background: var(--theme-a20)
@@ -5,7 +5,7 @@
5
5
  margin-top: 8px
6
6
  .item
7
7
  line-height: 1.2
8
- background: var(--alpha20)
8
+ background: var(--bg-a20)
9
9
  padding: 10px 16px
10
10
  border-radius: $border-card-s
11
11
  display: block
@@ -33,6 +33,6 @@
33
33
  .item
34
34
  trans1 background
35
35
  .item.active
36
- background: var(--alpha50)
36
+ background: var(--bg-a50)
37
37
  .item:hover
38
- background: var(--alpha50)
38
+ background: var(--bg-a50)
@@ -1,10 +1,10 @@
1
1
  .widget-wrapper.tagcloud .widget-body
2
2
  border-radius: $border-card-s
3
3
  padding: 12px 16px
4
- background: var(--alpha50)
4
+ background: var(--bg-a50)
5
5
  a
6
6
  word-break: break-word
7
7
  color: var(--text-p2)
8
8
  line-height: 1.5
9
9
  &:hover
10
- color: $color-hover
10
+ color: var(--accent)
@@ -33,7 +33,7 @@
33
33
  padding: 0
34
34
  margin: 0
35
35
  .highlight, pre:not([class]):has(>code)
36
- background: var(--alpha50)
36
+ background: var(--bg-a50)
37
37
 
38
38
 
39
39
  .tag-plugin.timeline[api] .body .footer
@@ -46,4 +46,4 @@
46
46
  content: none
47
47
  .l_left .widget-wrapper.timeline .body
48
48
  box-shadow: none
49
- background: var(--alpha50)
49
+ background: var(--bg-a50)
@@ -1,5 +1,4 @@
1
1
  .widget-wrapper.toc
2
- background: var(--site-bg)
3
2
  z-index 3
4
3
  .widget-body
5
4
  position relative
@@ -12,6 +11,11 @@
12
11
  width: 4px
13
12
  background: var(--block)
14
13
  border-radius: 4px
14
+
15
+ if !$site-background-image
16
+ @media screen and (min-width: $device-laptop)
17
+ background: var(--background)
18
+
15
19
 
16
20
  // 目录基本样式
17
21
  .widget-wrapper.toc .toc
@@ -40,7 +44,7 @@
40
44
  bottom: 6px
41
45
  left: -8px
42
46
  width: 4px
43
- background: $color-theme
47
+ background: var(--theme)
44
48
  border-radius: 4px
45
49
  &:hover
46
50
  background: var(--block-border)
@@ -179,6 +183,6 @@
179
183
  color: var(--text-p2)
180
184
  .widget-wrapper.toc .widget-footer
181
185
  a
182
- background: var(--alpha100)
186
+ background: var(--block)
183
187
  a+a
184
188
  margin-top: 4px
@@ -1,7 +1,7 @@
1
1
  .widgets
2
2
  .loading-wrap
3
3
  margin: 0.5rem 0
4
- background: var(--alpha50)
4
+ background: var(--bg-a50)
5
5
 
6
6
  .widgets
7
7
  overflow: scroll
@@ -43,11 +43,11 @@
43
43
  transform: scale(1.2)
44
44
  fill: var(--text-p2)
45
45
  &:hover
46
- color: $color-hover
47
- background: var(--alpha100)
46
+ color: var(--accent)
47
+ background: var(--bg-a100)
48
48
  opacity 1
49
49
  svg
50
- fill: $color-hover
50
+ fill: var(--accent)
51
51
 
52
52
  .widget-body
53
53
  color: var(--text-p1)
@@ -1,44 +1,10 @@
1
1
  @require('_defines/const')
2
2
 
3
- // 通用主题色
4
- $color-theme = convert(hexo-config('style.color.theme'))
5
- $color-theme-opa = hsla(hue($color-theme), saturation($color-theme), lightness($color-theme), 0.3)
6
- $color-accent = convert(hexo-config('style.color.accent'))
7
- $color-link = convert(hexo-config('style.color.link'))
8
- $color-hover = convert(hexo-config('style.color.hover'))
9
-
10
- // 动态颜色
11
- $color-background = convert(hexo-config('style.color.background'))
12
- $color-block = convert(hexo-config('style.color.block'))
13
- $color-code = convert(hexo-config('style.color.code'))
14
- $color-text = convert(hexo-config('style.color.text'))
15
-
16
- $ff-body = system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif
17
- $ff-codeblock = Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif
18
- $ff-code = $ff-codeblock
19
- $ff-logo = $ff-body
20
-
21
- $iQuoteLeft = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from BoxIcons Solid by Atisa - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' d='M3.691 6.292C5.094 4.771 7.217 4 10 4h1v2.819l-.804.161c-1.37.274-2.323.813-2.833 1.604A2.9 2.9 0 0 0 6.925 10H10a1 1 0 0 1 1 1v7c0 1.103-.897 2-2 2H3a1 1 0 0 1-1-1v-5l.003-2.919c-.009-.111-.199-2.741 1.688-4.789M20 20h-6a1 1 0 0 1-1-1v-5l.003-2.919c-.009-.111-.199-2.741 1.688-4.789C16.094 4.771 18.217 4 21 4h1v2.819l-.804.161c-1.37.274-2.323.813-2.833 1.604A2.9 2.9 0 0 0 17.925 10H21a1 1 0 0 1 1 1v7c0 1.103-.897 2-2 2'/%3E%3C/svg%3E"
22
- $iQuoteRight = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from BoxIcons Solid by Atisa - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' d='M20.309 17.708C22.196 15.66 22.006 13.03 22 13V5a1 1 0 0 0-1-1h-6c-1.103 0-2 .897-2 2v7a1 1 0 0 0 1 1h3.078a2.9 2.9 0 0 1-.429 1.396c-.508.801-1.465 1.348-2.846 1.624l-.803.16V20h1c2.783 0 4.906-.771 6.309-2.292m-11.007 0C11.19 15.66 10.999 13.03 10.993 13V5a1 1 0 0 0-1-1h-6c-1.103 0-2 .897-2 2v7a1 1 0 0 0 1 1h3.078a2.9 2.9 0 0 1-.429 1.396c-.508.801-1.465 1.348-2.846 1.624l-.803.16V20h1c2.783 0 4.906-.771 6.309-2.292'/%3E%3C/svg%3E"
23
-
24
- $h3Left = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from Solar by 480 Design - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M13.488 4.43a.75.75 0 0 1 .081 1.058L7.988 12l5.581 6.512a.75.75 0 1 1-1.138.976l-6-7a.75.75 0 0 1 0-.976l6-7a.75.75 0 0 1 1.057-.081' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M17.75 5a.75.75 0 0 0-1.32-.488l-6 7a.75.75 0 0 0 0 .976l6 7A.75.75 0 0 0 17.75 19z'/%3E%3C/svg%3E"
25
- $h3Right = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from Solar by 480 Design - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.512 4.43a.75.75 0 0 0-.081 1.058L16.012 12l-5.581 6.512a.75.75 0 1 0 1.138.976l6-7a.75.75 0 0 0 0-.976l-6-7a.75.75 0 0 0-1.057-.081' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M6.25 5a.75.75 0 0 1 1.32-.488l6 7a.75.75 0 0 1 0 .976l-6 7A.75.75 0 0 1 6.25 19z'/%3E%3C/svg%3E"
26
-
27
- $loadingIcon = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%231cd0fd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath stroke-dasharray='16' stroke-dashoffset='16' d='M12 3c4.97 0 9 4.03 9 9'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='0.6s' values='16;0'/%3E%3CanimateTransform attributeName='transform' dur='3s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/path%3E%3Cpath stroke-dasharray='64' stroke-dashoffset='64' stroke-opacity='0.3' d='M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='2.4s' values='64;0'/%3E%3C/path%3E%3C/g%3E%3C/svg%3E"
28
-
29
-
30
- if hexo-config('style.font-family.body')
31
- $ff-body = convert(hexo-config('style.font-family.body'))
32
-
33
- if hexo-config('style.font-family.code')
34
- $ff-code = convert(hexo-config('style.font-family.code'))
35
-
36
- if hexo-config('style.font-family.codeblock')
37
- $ff-codeblock = convert(hexo-config('style.font-family.codeblock'))
38
-
39
- if hexo-config('style.font-family.logo')
40
- $ff-logo = convert(hexo-config('style.font-family.logo'))
41
3
 
4
+ // font family
5
+ $ff-body = convert(hexo-config('style.font-family.body'))
6
+ $ff-code = convert(hexo-config('style.font-family.code'))
7
+ $ff-codeblock = convert(hexo-config('style.font-family.codeblock'))
42
8
 
43
9
  // font size
44
10
  $fs-root = convert(hexo-config('style.font-size.root'))
@@ -62,6 +28,28 @@ $fsp1 = 'calc(%s - 1px)' % $fs-body
62
28
  $fsp2 = 'calc(%s - 2px)' % $fs-body
63
29
  $fsp3 = 'calc(%s - 3px)' % $fs-body
64
30
 
31
+ // site main
32
+ $site-background-image = hexo-config('style.site.background-image')
33
+ $leftbar-background-image = hexo-config('style.leftbar.background-image')
34
+ $leftbar-background-color = hexo-config('style.leftbar.background-color')
35
+
36
+
37
+ // colors
38
+ $c-theme = hsl(192deg, 98%, 55%)
39
+ $c-accent = hsl(14deg, 100%, 57%)
40
+ $c-base-hue = 210deg // 背景/文本颜色的主基调(一般看不出来不需要修改)
41
+
42
+ // icons
43
+
44
+ $iQuoteLeft = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from BoxIcons Solid by Atisa - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' d='M3.691 6.292C5.094 4.771 7.217 4 10 4h1v2.819l-.804.161c-1.37.274-2.323.813-2.833 1.604A2.9 2.9 0 0 0 6.925 10H10a1 1 0 0 1 1 1v7c0 1.103-.897 2-2 2H3a1 1 0 0 1-1-1v-5l.003-2.919c-.009-.111-.199-2.741 1.688-4.789M20 20h-6a1 1 0 0 1-1-1v-5l.003-2.919c-.009-.111-.199-2.741 1.688-4.789C16.094 4.771 18.217 4 21 4h1v2.819l-.804.161c-1.37.274-2.323.813-2.833 1.604A2.9 2.9 0 0 0 17.925 10H21a1 1 0 0 1 1 1v7c0 1.103-.897 2-2 2'/%3E%3C/svg%3E"
45
+ $iQuoteRight = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from BoxIcons Solid by Atisa - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' d='M20.309 17.708C22.196 15.66 22.006 13.03 22 13V5a1 1 0 0 0-1-1h-6c-1.103 0-2 .897-2 2v7a1 1 0 0 0 1 1h3.078a2.9 2.9 0 0 1-.429 1.396c-.508.801-1.465 1.348-2.846 1.624l-.803.16V20h1c2.783 0 4.906-.771 6.309-2.292m-11.007 0C11.19 15.66 10.999 13.03 10.993 13V5a1 1 0 0 0-1-1h-6c-1.103 0-2 .897-2 2v7a1 1 0 0 0 1 1h3.078a2.9 2.9 0 0 1-.429 1.396c-.508.801-1.465 1.348-2.846 1.624l-.803.16V20h1c2.783 0 4.906-.771 6.309-2.292'/%3E%3C/svg%3E"
46
+
47
+ $iH3Left = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from Solar by 480 Design - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M13.488 4.43a.75.75 0 0 1 .081 1.058L7.988 12l5.581 6.512a.75.75 0 1 1-1.138.976l-6-7a.75.75 0 0 1 0-.976l6-7a.75.75 0 0 1 1.057-.081' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M17.75 5a.75.75 0 0 0-1.32-.488l-6 7a.75.75 0 0 0 0 .976l6 7A.75.75 0 0 0 17.75 19z'/%3E%3C/svg%3E"
48
+ $iH3Right = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from Solar by 480 Design - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.512 4.43a.75.75 0 0 0-.081 1.058L16.012 12l-5.581 6.512a.75.75 0 1 0 1.138.976l6-7a.75.75 0 0 0 0-.976l-6-7a.75.75 0 0 0-1.057-.081' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M6.25 5a.75.75 0 0 1 1.32-.488l6 7a.75.75 0 0 1 0 .976l-6 7A.75.75 0 0 1 6.25 19z'/%3E%3C/svg%3E"
49
+
50
+ $iLoadingIcon = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%231cd0fd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath stroke-dasharray='16' stroke-dashoffset='16' d='M12 3c4.97 0 9 4.03 9 9'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='0.6s' values='16;0'/%3E%3CanimateTransform attributeName='transform' dur='3s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/path%3E%3Cpath stroke-dasharray='64' stroke-dashoffset='64' stroke-opacity='0.3' d='M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='2.4s' values='64;0'/%3E%3C/path%3E%3C/g%3E%3C/svg%3E"
51
+
52
+
65
53
  $border-card-l = convert(hexo-config('style.border-radius.card-l'))
66
54
  $border-card = convert(hexo-config('style.border-radius.card'))
67
55
  $border-card-s = convert(hexo-config('style.border-radius.card-s'))
@@ -44,15 +44,11 @@ $color-google-red = #E8453C
44
44
  $c-red = #F44336
45
45
  $c-orange = #FA6400
46
46
  $c-amber = #FFBD2B
47
- $c-yellow = #f2e03d
47
+ $c-yellow = #ffe659
48
48
  $c-green = #3DC550
49
49
  $c-cyan = #1BCDFC
50
50
  $c-blue = #2196f3
51
51
  $c-purple = #9c27b0
52
52
 
53
- $hue-yellow = 50
54
- $cDeepOrange = hsl(14 100% 57%)
55
-
56
-
57
53
  $leftbar-bottom-margin = 96px
58
54
  $rightbar-bottom-margin = 96px
@@ -123,7 +123,7 @@ hoverable-card()
123
123
  floatable-float()
124
124
  ondark()
125
125
  &:hover
126
- box-shadow: 0 0 4px -2px $color-theme, 0 0 24px -8px $color-theme
126
+ box-shadow: 0 0 4px -2px var(--theme), 0 0 24px -8px var(--theme)
127
127
  :root[data-theme="light"] &
128
128
  onlight()
129
129
  :root[data-theme="dark"] &
@@ -149,11 +149,11 @@ newblur()
149
149
  &:before
150
150
  backdrop-filter: blur(8px)
151
151
  -webkit-backdrop-filter: blur(8px)
152
- background: var(--alpha20)
152
+ background: var(--bg-a20)
153
153
  &:after
154
154
  --blur-px: 24px
155
155
  --blur-sat: 500%
156
- background: var(--alpha50)
156
+ background: var(--bg-a50)
157
157
  backdrop-filter: saturate(var(--blur-sat)) blur(var(--blur-px))
158
158
  -webkit-backdrop-filter: saturate(var(--blur-sat)) blur(var(--blur-px))
159
159
  mask: linear-gradient(rgba(white, 1), 10%, rgba(white, 0.05), 90%, rgba(white, 1)), linear-gradient(90deg, rgba(white, 1), 10%, rgba(white, 0.05), 90%, rgba(white, 1))
@@ -162,4 +162,4 @@ newblur()
162
162
  trans1 all
163
163
  @media (prefers-color-scheme: dark)
164
164
  opacity 0.4
165
- background: var(--alpha20)
165
+ background: var(--bg-a20)
@@ -0,0 +1,105 @@
1
+ // 通用 hsla 函数
2
+ x-hsla(h = var(--hue), s = var(--sat), l = var(--light), a = var(--alpha))
3
+ return unquote('hsla(%s %s %s / %s)' % (h s l a))
4
+
5
+ // 设置不同透明度的主题色
6
+ x-theme-alpha(a = 1)
7
+ return unquote('hsla(%s %s %s / %s)' % (var(--hue) var(--sat) var(--light) a))
8
+
9
+ // 设置基础主题色
10
+ x-set-theme-with-color($color)
11
+ --hue: hue($color)
12
+ --sat: saturation($color)
13
+ --light: lightness($color)
14
+ --alpha: alpha($color)
15
+ --theme: x-theme-alpha(1)
16
+ --theme-a20: x-theme-alpha(0.2)
17
+ --theme-a30: x-theme-alpha(0.3)
18
+
19
+ // 设置链接颜色
20
+ x-set-link-with-color($color)
21
+ $hue = hue($color)
22
+ $sat = saturation($color)
23
+ $light = lightness($color)
24
+ --link: x-hsla($hue, $sat, $light, 1)
25
+ --link-a20: x-hsla($hue, $sat, $light, 0.2)
26
+
27
+ // 设置背景色
28
+ x-set-bg-colors($scheme)
29
+ $hue = $c-base-hue
30
+ $sat = 0%
31
+ $light = $scheme == 'dark' ? 0% : 100%
32
+ --bg-a20: x-hsla($hue, $sat, $light, 0.2)
33
+ --bg-a50: x-hsla($hue, $sat, $light, 0.5)
34
+ --bg-a60: x-hsla($hue, $sat, $light, 0.6)
35
+ --bg-a75: x-hsla($hue, $sat, $light, 0.75)
36
+ --bg-a100: x-hsla($hue, $sat, $light, 1)
37
+
38
+ // 设置文本及相关色
39
+ x-set-text-colors($scheme, $p0 = 1, $p1 = 0.8, $p2 = 0.7, $p3 = 0.5, $p4 = 0.4)
40
+ $hue = $c-base-hue
41
+ $sat = 0%
42
+ $light = $scheme == 'dark' ? 100% : 0%
43
+
44
+ --text: x-hsla($hue, $sat, $light, $p0)
45
+ --text-reverse: x-hsla($hue, $sat, $scheme == 'dark' ? 0% : 100%, $p0)
46
+ --text-p1: x-hsla($hue, $sat, $light, $p1)
47
+ --text-p2: x-hsla($hue, $sat, $light, $p2)
48
+ --text-p3: x-hsla($hue, $sat, $light, $p3)
49
+ --text-p4: x-hsla($hue, $sat, $light, $p4)
50
+
51
+ --text-meta: x-hsla($hue, $sat, $light, 0.2)
52
+ --text-code: x-hsla($hue, $sat, $light, 0.9)
53
+
54
+ --text-a10: x-hsla($hue, $sat, $light, 0.1)
55
+ --text-a20: x-hsla($hue, $sat, $light, 0.2)
56
+
57
+ $sat = $scheme == 'dark' ? 24% : 50%
58
+ $light = $scheme == 'dark' ? 72% : 12%
59
+ $alpha = $scheme == 'dark' ? 0.08 : 0.04
60
+ --block: x-hsla($hue, $sat, $light, $alpha)
61
+ --block-border: x-hsla($hue, $sat, $light, $alpha * 1.5)
62
+
63
+
64
+ // ---------------- apply theme ----------------
65
+ // 设置浅色模式
66
+ dynamic-theme-light()
67
+ $hue = $c-base-hue
68
+ --background: x-hsla($hue, 20%, 98%, 1)
69
+ --card: $site-background-image ? hsla(white, 0.5) : white
70
+
71
+ x-set-bg-colors('light')
72
+ x-set-text-colors('light')
73
+
74
+ // 设置深色模式
75
+ dynamic-theme-dark()
76
+ $hue = $c-base-hue
77
+ --background: x-hsla($hue, 8%, 12%, 1)
78
+ @media screen and (max-width: $device-mobile-max)
79
+ --background: black
80
+ --card: $site-background-image ? hsla(white, 0.25) : x-hsla($hue, 10%, 24%, 1)
81
+
82
+ x-set-bg-colors('dark')
83
+ x-set-text-colors('dark')
84
+ --text-code: x-hsla(20, 75, 60, 1)
85
+
86
+
87
+ :root
88
+ // 主题色
89
+ x-set-theme-with-color($c-theme)
90
+ // 强调色
91
+ --accent: $c-accent
92
+ // 链接
93
+ x-set-link-with-color(hsl(207deg, 90%, 54%))
94
+
95
+ // dynamic colors
96
+ dynamic-theme-light()
97
+ @media (prefers-color-scheme: dark)
98
+ dynamic-theme-dark()
99
+
100
+
101
+ :root[data-theme="light"]
102
+ dynamic-theme-light()
103
+ :root[data-theme="dark"]
104
+ dynamic-theme-dark()
105
+
@@ -0,0 +1,117 @@
1
+ // 多彩扩展(文字、链接、边框等都变成彩色)
2
+ x-set-theme-colorful($scheme = 'light', $color, $text = true)
3
+ $hue = hue($color)
4
+ x-set-theme-with-color($color)
5
+ x-set-link-with-color($color)
6
+ if $scheme == 'dark'
7
+ --theme-border: x-hsla($hue, 40%, 24%)
8
+ --theme-block: x-hsla($hue, 24%, 24%)
9
+ --theme-mark: x-hsla($hue, 24%, 24%)
10
+ --theme-codeblock: x-hsla($hue, 12%, 24%)
11
+ if text
12
+ --text: x-hsla($hue, 50%, 75%, 1)
13
+ --text-p1: x-hsla($hue, 80%, 80%, 1)
14
+ --text-p2: x-hsla($hue, 80%, 80%, 0.8)
15
+ --text-p3: x-hsla($hue, 80%, 80%, 0.6)
16
+ --text-p4: x-hsla($hue, 80%, 80%, 0.4)
17
+ --link: x-hsla($hue, 80%, 60%, 1)
18
+ --link-a20: x-hsla($hue, 80%, 60%, 0.2)
19
+ else
20
+ --theme-border: x-hsla($hue, 50%, 80%)
21
+ --theme-block: x-hsla($hue, 90%, 92%)
22
+ --theme-mark: x-hsla($hue, 95%, 80%)
23
+ --theme-codeblock: x-hsla($hue, 50%, 95%)
24
+ if text
25
+ --text: x-hsla($hue, 55%, 16%, 1)
26
+ --text-p1: x-hsla($hue, 90%, 20%, 1)
27
+ --text-p2: x-hsla($hue, 90%, 20%, 0.8)
28
+ --text-p3: x-hsla($hue, 90%, 20%, 0.6)
29
+ --text-p4: x-hsla($hue, 90%, 20%, 0.4)
30
+ --link: x-hsla($hue, 95%, 32%, 1)
31
+ --link-a20: x-hsla($hue, 95%, 32%, 0.2)
32
+
33
+ .tag-plugin
34
+ --theme-border: var(--block-border)
35
+ --theme-block: var(--block)
36
+ --theme-mark: var(--block)
37
+ --theme-codeblock: var(--block)
38
+
39
+ .colorful[color='red']
40
+ x-set-theme-colorful('light', $c-red)
41
+ .colorful[color='orange']
42
+ x-set-theme-colorful('light', $c-orange)
43
+ .colorful[color='amber']
44
+ x-set-theme-colorful('light', $c-amber)
45
+ .colorful[color='yellow']
46
+ x-set-theme-colorful('light', $c-yellow)
47
+ .colorful[color='green']
48
+ x-set-theme-colorful('light', $c-green)
49
+ .colorful[color='cyan']
50
+ x-set-theme-colorful('light', $c-cyan)
51
+ .colorful[color='blue']
52
+ x-set-theme-colorful('light', $c-blue)
53
+ .colorful[color='purple']
54
+ x-set-theme-colorful('light', $c-purple)
55
+ .colorful[color='theme']
56
+ x-set-theme-colorful('light', $c-theme)
57
+ .colorful[color='accent']
58
+ x-set-theme-colorful('light', $c-accent)
59
+
60
+ .colorful[color='light']
61
+ --theme: white
62
+ --theme-block: var(--theme)
63
+ --theme-mark: var(--theme)
64
+ --theme-codeblock: var(--theme)
65
+ dynamic-theme-light()
66
+
67
+ .colorful[color='dark']
68
+ dynamic-theme-dark()
69
+ --theme: #111
70
+ --theme-border: none
71
+ --theme-block: var(--theme)
72
+ --theme-mark: var(--theme)
73
+ --theme-codeblock: var(--theme)
74
+
75
+ .colorful[color='warning']
76
+ x-set-theme-colorful('light', $c-yellow, false)
77
+ dynamic-theme-light()
78
+ x-set-link-with-color($c-red)
79
+ --theme-border: none
80
+ --theme-block: var(--theme)
81
+ --text-code: var(--text-p1)
82
+
83
+ .colorful[color='error']
84
+ x-set-theme-colorful('dark', $c-red, false)
85
+ dynamic-theme-dark()
86
+ x-set-link-with-color($c-yellow)
87
+ --theme-border: none
88
+ --theme-block: var(--theme)
89
+ --text-code: var(--text-p1)
90
+
91
+ _dark_tags()
92
+ .tag-plugin.tag
93
+ x-set-theme-colorful('dark', $c-theme)
94
+ .colorful[color='red']
95
+ x-set-theme-colorful('dark', $c-red)
96
+ .colorful[color='orange']
97
+ x-set-theme-colorful('dark', $c-orange)
98
+ .colorful[color='amber']
99
+ x-set-theme-colorful('dark', $c-amber)
100
+ .colorful[color='yellow']
101
+ x-set-theme-colorful('dark', $c-yellow)
102
+ .colorful[color='green']
103
+ x-set-theme-colorful('dark', $c-green)
104
+ .colorful[color='cyan']
105
+ x-set-theme-colorful('dark', $c-cyan)
106
+ .colorful[color='blue']
107
+ x-set-theme-colorful('dark', $c-blue)
108
+ .colorful[color='purple']
109
+ x-set-theme-colorful('dark', $c-purple)
110
+
111
+
112
+ :root[data-theme="dark"]
113
+ _dark_tags()
114
+ :root:not([data-theme])
115
+ @media (prefers-color-scheme: dark)
116
+ _dark_tags()
117
+
@@ -7,11 +7,17 @@
7
7
  .atk-header,.atk-editor-user-wrap
8
8
  border-bottom: 1px dashed var(--block-border)
9
9
  padding: 0.5rem 1rem
10
+ margin: 0
10
11
  .atk-editor-user-wrap:empty
11
12
  visibility: hidden
12
13
  padding: 0
13
14
  >.atk-bottom
14
15
  padding: 8px
16
+ .atk-state-btn
17
+ height: 2rem
18
+ border-radius: 100px
19
+ .atk-cancel
20
+ background: none
15
21
  .atk-plug-btn
16
22
  border-radius: 32px
17
23
  height: 2rem
@@ -22,7 +28,7 @@
22
28
  min-width: 5em
23
29
  trans1 all
24
30
  &:hover
25
- --at-color-main: $color-hover
31
+ --at-color-main: var(--accent)
26
32
  &:empty
27
33
  display: none
28
34
  .atk-list-comments-wrap>.atk-comment-wrap
@@ -64,6 +70,9 @@
64
70
  .atk-error-layer
65
71
  background: none
66
72
 
73
+ .with-fancybox .atk-content img:not([atk-emoticon])
74
+ cursor: zoom-in
75
+
67
76
  .cmt-body
68
77
  .artalk, .atk-layer-wrap, .artalk.atk-dark-mode, .atk-layer-wrap.atk-dark-mode
69
78
  --at-color-font: var(--text-p1)
@@ -71,20 +80,31 @@
71
80
  --at-color-sub: var(--text-p3)
72
81
  --at-color-grey: var(--text-p4)
73
82
  --at-color-meta: var(--text-p4)
74
- --at-color-border: var(--block-border)
75
- --at-color-light: var(--theme-link)
83
+ if $site-background-image
84
+ --at-color-border: transparent
85
+ else
86
+ --at-color-border: var(--block-border)
87
+ --at-color-light: var(--link)
76
88
  --at-color-bg: var(--card)
77
- --at-color-bg-transl: var(--block-border)
89
+ --at-color-bg-transl: var(--card)
78
90
  --at-color-bg-grey: var(--block)
79
- --at-color-bg-grey-transl: orange
80
- --at-color-bg-light: rgba(29, 161, 242, 1)
81
- --at-color-main: $color-theme
91
+ --at-color-bg-grey-transl: var(--block-border)
92
+ --at-color-bg-light: var(--theme)
93
+ --at-color-main: var(--theme)
82
94
  --at-color-red: $c-red
83
95
  --at-color-green: $c-green
84
96
  --at-color-gradient: linear-gradient(180deg, transparent, var(--card), 50%, var(--card))
85
97
 
86
98
  .md-text .atk-comment>.atk-main>.atk-body
87
99
  overflow: visible
100
+ .md-text .artalk pre code, .atk-layer-wrap pre code
101
+ background: none
102
+ .md-text .atk-main-editor>.atk-textarea-wrap>.atk-textarea
103
+ background: none
104
+
105
+ .md-text .atk-notify-wrap .atk-notify
106
+ border-radius: $border-bar
107
+ margin: 8px
88
108
 
89
109
 
90
110
  // override
@@ -113,4 +133,4 @@
113
133
  p
114
134
  color: var(--text-p3)
115
135
  .atk-content a
116
- --at-color-main: var(--theme-link)
136
+ --at-color-main: var(--link)
@@ -1,5 +1,5 @@
1
1
  .cmt-body.twikoo
2
- --twikoo-theme: $color-theme
2
+ --twikoo-theme: var(--theme)
3
3
  margin-top: 1.5rem
4
4
 
5
5
  .tk-content
@@ -38,15 +38,15 @@
38
38
  .el-button:not(.el-button--primary):not(.el-button--text):focus,
39
39
  .el-button:not(.el-button--primary):not(.el-button--text):hover
40
40
  color: var(--twikoo-theme) !important
41
- border-color: var(--theme-link-opa) !important
41
+ border-color: var(--link-a20) !important
42
42
  background-color: var(--block) !important
43
43
  .el-button--primary.is-disabled:active,
44
44
  .el-button--primary.is-disabled:focus,
45
45
  .el-button--primary.is-disabled:hover
46
- background-color: var(--theme-link-opa) !important
46
+ background-color: var(--link-a20) !important
47
47
 
48
48
  .el-button:focus,.el-button:hover
49
- border-color: var(--theme-link-opa)
49
+ border-color: var(--link-a20)
50
50
  .el-button:active
51
51
  color: var(--twikoo-theme)
52
52
  border-color: var(--twikoo-theme)
@@ -58,8 +58,8 @@
58
58
  background-color: var(--twikoo-theme)
59
59
  border-color: var(--twikoo-theme) !important
60
60
  .el-button--primary:focus,.el-button--primary:hover
61
- background: $color-hover
62
- border-color: $color-hover !important
61
+ background: var(--accent)
62
+ border-color: var(--accent) !important
63
63
  .el-button--primary:active
64
64
  background: var(--twikoo-theme)
65
65
  border-color: var(--twikoo-theme)
@@ -70,11 +70,11 @@
70
70
  .el-button--primary.is-disabled:active,
71
71
  .el-button--primary.is-disabled:focus,
72
72
  .el-button--primary.is-disabled:hover
73
- background-color: var(--theme-link-opa) !important
74
- border-color: var(--theme-link-opa) !important
73
+ background-color: var(--link-a20) !important
74
+ border-color: var(--link-a20) !important
75
75
  .el-button--primary.is-plain
76
76
  color: var(--twikoo-theme) !important
77
- border-color: var(--theme-link-opa)
77
+ border-color: var(--link-a20)
78
78
  .el-button--primary.is-plain:focus,
79
79
  .el-button--primary.is-plain:hover
80
80
  background: var(--twikoo-theme) !important
@@ -146,7 +146,7 @@
146
146
 
147
147
  .tk-tag-green
148
148
  border: none
149
- background-color: var(--theme-link-opa)
149
+ background-color: var(--link-a20)
150
150
  color: var(--twikoo-theme)
151
151
 
152
152
  .tk-comments-title .tk-comments-count
@@ -9,8 +9,8 @@
9
9
  --waline-light-grey: #999;
10
10
  --waline-dark-grey: #666;
11
11
  /* 主题色 */
12
- --waline-theme-color: $color-theme;
13
- --waline-active-color: $color-hover;
12
+ --waline-theme-color: var(--theme);
13
+ --waline-active-color: var(--accent);
14
14
  /* 布局颜色 */
15
15
  --waline-color: #444;
16
16
  --waline-bgcolor: #fff;