hexo-theme-stellar 1.32.1 → 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 (106) hide show
  1. package/_config.yml +46 -40
  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/tags/lib/albums.js +4 -3
  25. package/scripts/tags/lib/banner.js +1 -1
  26. package/scripts/tags/lib/chat.js +1 -5
  27. package/scripts/tags/lib/friends.js +1 -1
  28. package/scripts/tags/lib/gallery.js +4 -3
  29. package/scripts/tags/lib/image.js +5 -5
  30. package/scripts/tags/lib/link.js +1 -5
  31. package/scripts/tags/lib/md.js +1 -1
  32. package/scripts/tags/lib/posters.js +4 -3
  33. package/scripts/tags/lib/sites.js +7 -1
  34. package/scripts/tags/lib/timeline.js +1 -1
  35. package/source/css/_common/base.styl +2 -5
  36. package/source/css/_common/blockquote.styl +1 -1
  37. package/source/css/_common/blur.styl +7 -7
  38. package/source/css/_common/button.styl +2 -2
  39. package/source/css/_common/cap.styl +1 -1
  40. package/source/css/_common/device.styl +4 -4
  41. package/source/css/_common/highlight.styl +2 -0
  42. package/source/css/_common/html.styl +1 -1
  43. package/source/css/_common/svg.styl +1 -1
  44. package/source/css/_common/title.styl +1 -1
  45. package/source/css/_components/layout.styl +2 -2
  46. package/source/css/_components/list.styl +1 -2
  47. package/source/css/_components/main.styl +8 -4
  48. package/source/css/_components/md.styl +2 -2
  49. package/source/css/_components/pages/archives.styl +5 -5
  50. package/source/css/_components/pages/article-story.styl +10 -10
  51. package/source/css/_components/pages/article-tech.styl +2 -2
  52. package/source/css/_components/pages/notebook.styl +2 -2
  53. package/source/css/_components/partial/footer.styl +5 -9
  54. package/source/css/_components/partial/navbar.styl +2 -2
  55. package/source/css/_components/partial/related.styl +6 -6
  56. package/source/css/_components/sidebar/footer.styl +1 -1
  57. package/source/css/_components/sidebar/menu.styl +3 -3
  58. package/source/css/_components/sidebar/search.styl +7 -7
  59. package/source/css/_components/sidebar/sidebar.styl +24 -24
  60. package/source/css/_components/tag-plugins/button.styl +2 -2
  61. package/source/css/_components/tag-plugins/chat.styl +44 -8
  62. package/source/css/_components/tag-plugins/checkbox.styl +1 -1
  63. package/source/css/_components/tag-plugins/copy.styl +4 -3
  64. package/source/css/_components/tag-plugins/friends.styl +5 -6
  65. package/source/css/_components/tag-plugins/friends_posts.styl +8 -7
  66. package/source/css/_components/tag-plugins/gallery.styl +1 -2
  67. package/source/css/_components/tag-plugins/image.styl +1 -1
  68. package/source/css/_components/tag-plugins/inline-labels.styl +3 -3
  69. package/source/css/_components/tag-plugins/okr.styl +2 -3
  70. package/source/css/_components/tag-plugins/poetry.styl +1 -1
  71. package/source/css/_components/tag-plugins/quot.styl +1 -25
  72. package/source/css/_components/tag-plugins/read/paper.styl +2 -2
  73. package/source/css/_components/tag-plugins/read/reel.styl +4 -4
  74. package/source/css/_components/tag-plugins/sites.styl +14 -11
  75. package/source/css/_components/tag-plugins/tabs.styl +1 -1
  76. package/source/css/_components/tag-plugins/timeline.styl +10 -4
  77. package/source/css/_components/widgets/components.styl +3 -3
  78. package/source/css/_components/widgets/ghuser.styl +3 -3
  79. package/source/css/_components/widgets/list.styl +1 -1
  80. package/source/css/_components/widgets/markdown.styl +9 -3
  81. package/source/css/_components/widgets/related.styl +3 -3
  82. package/source/css/_components/widgets/tagcloud.styl +2 -2
  83. package/source/css/_components/widgets/timeline.styl +2 -2
  84. package/source/css/_components/widgets/toc.styl +2 -3
  85. package/source/css/_components/widgets/widgets.styl +4 -4
  86. package/source/css/_custom.styl +26 -38
  87. package/source/css/_defines/const.styl +1 -5
  88. package/source/css/_defines/func.styl +4 -4
  89. package/source/css/_defines/theme_base.styl +105 -0
  90. package/source/css/_defines/theme_colorful.styl +117 -0
  91. package/source/css/_plugins/comments/artalk.styl +25 -8
  92. package/source/css/_plugins/comments/twikoo.styl +10 -10
  93. package/source/css/_plugins/comments/waline.styl +2 -2
  94. package/source/css/_plugins/index.styl +1 -2
  95. package/source/css/_plugins/lazyload.styl +40 -50
  96. package/source/css/_plugins/mermaid.styl +1 -1
  97. package/source/css/_plugins/swiper.styl +2 -2
  98. package/source/css/_plugins/tianli_gpt.styl +8 -8
  99. package/source/css/main.styl +2 -1
  100. package/source/js/services/friends.js +1 -0
  101. package/source/js/services/friends_and_posts.js +1 -0
  102. package/source/js/services/sites.js +1 -0
  103. package/source/js/services/timeline.js +1 -0
  104. package/layout/_plugins/lazyload.ejs +0 -21
  105. package/source/css/_components/tag-plugins/common.styl +0 -120
  106. package/source/css/_defines/theme.styl +0 -120
@@ -1,7 +1,7 @@
1
1
  :root
2
2
  --ai-font-color var(--text-p2)
3
3
  --ai-post-bg var(--block)
4
- --ai-content-bg var(--site-bg)
4
+ --ai-content-bg var(--background)
5
5
  --ai-content-border 1px solid var(--block-border)
6
6
  --ai-border 1px solid var(--block-border)
7
7
  --ai-tag-bg var(--card)
@@ -100,7 +100,7 @@
100
100
  cursor pointer
101
101
 
102
102
  #post-ai .ai-btn-item:hover
103
- background var(--theme-link)
103
+ background var(--link)
104
104
 
105
105
  #post-ai .ai-recommend
106
106
  display flex
@@ -112,9 +112,9 @@
112
112
  margin-top 2px
113
113
 
114
114
  #post-ai .ai-recommend-item a
115
- border-bottom 2px solid var(--theme-link)
115
+ border-bottom 2px solid var(--link)
116
116
  padding 0 .2em
117
- color var(--theme-link)
117
+ color var(--link)
118
118
  font-weight 700
119
119
  text-decoration none
120
120
  transition all 0.3s
@@ -124,8 +124,8 @@
124
124
  -o-transition all 0.3s
125
125
 
126
126
  #post-ai .ai-recommend-item a:hover
127
- background-color var(--theme-link)
128
- border-bottom 2px solid var(--theme-link)
127
+ background-color var(--link)
128
+ border-bottom 2px solid var(--link)
129
129
  color #fff
130
130
  border-radius 5px
131
131
 
@@ -159,7 +159,7 @@
159
159
  opacity 0
160
160
 
161
161
  #post-ai .ai-Toggle:hover
162
- background $color-theme
162
+ background var(--theme)
163
163
 
164
164
  #post-ai .ai-speech-box
165
165
  width 21px
@@ -193,7 +193,7 @@
193
193
  transition .3s
194
194
 
195
195
  #post-ai .ai-speech-box:hover .ai-speech-content
196
- background $color-theme
196
+ background var(--theme)
197
197
 
198
198
  @keyframes ai_breathe
199
199
  0%
@@ -5,7 +5,8 @@
5
5
  @import '_custom'
6
6
 
7
7
  // 含自定义参数的常量以及函数
8
- @import '_defines/theme'
8
+ @import '_defines/theme_base'
9
+ @import '_defines/theme_colorful'
9
10
  @import '_defines/func'
10
11
 
11
12
  // 通用组件
@@ -26,6 +26,7 @@ utils.jq(() => {
26
26
  cell += `</div>`;
27
27
  $(el).find('.grid-box').append(cell);
28
28
  }
29
+ window.wrapLazyloadImages(el);
29
30
  });
30
31
  }
31
32
  });
@@ -52,6 +52,7 @@ utils.jq(() => {
52
52
  cell += `</div>`;
53
53
  $(el).find('.grid-box').append(cell);
54
54
  }
55
+ window.wrapLazyloadImages(el);
55
56
  });
56
57
  }
57
58
  });
@@ -36,6 +36,7 @@ utils.jq(() => {
36
36
  cell += `</div>`;
37
37
  $(el).find('.grid-box').append(cell);
38
38
  }
39
+ window.wrapLazyloadImages(el);
39
40
  });
40
41
  }
41
42
  });
@@ -101,6 +101,7 @@ utils.jq(() => {
101
101
  cell += '</div>';
102
102
  $(el).append(cell);
103
103
  });
104
+ window.wrapLazyloadImages(el);
104
105
  });
105
106
  }
106
107
  });
@@ -1,21 +0,0 @@
1
- <script defer src="<%- conf.js %>"></script>
2
- <script>
3
- // https://www.npmjs.com/package/vanilla-lazyload
4
- // Set the options globally
5
- // to make LazyLoad self-initialize
6
- window.lazyLoadOptions = {
7
- elements_selector: ".lazy",
8
- };
9
- // Listen to the initialization event
10
- // and get the instance of LazyLoad
11
- window.addEventListener(
12
- "LazyLoad::Initialized",
13
- function (event) {
14
- window.lazyLoadInstance = event.detail.instance;
15
- },
16
- false
17
- );
18
- document.addEventListener('DOMContentLoaded', function () {
19
- window.lazyLoadInstance?.update();
20
- });
21
- </script>
@@ -1,120 +0,0 @@
1
- set_text_white()
2
- --text: white
3
- --text-p1: white
4
- --text-p2: hsl(0 0 88%)
5
- --text-p3: #ddd
6
- --text-code: white
7
- set_text_black()
8
- --text: black
9
- --text-p1: #111
10
- --text-p2: hsl(0 0 12%)
11
- --text-p3: #555
12
- --text-code: white
13
-
14
- set_dynamic_color($theme)
15
- --theme: $theme
16
- --theme-border: hsl(hue($theme), 50, 80)
17
- --theme-block: hsl(hue($theme), 90, 92)
18
- --theme-mark: hsl(hue($theme), 95, 80)
19
- --theme-codeblock: hsl(hue($theme), 50, 95)
20
- --text: hsl(hue($theme), 55, 16)
21
- --text-p1: hsl(hue($theme), 55, 20)
22
- --text-p2: hsl(hue($theme), 90, 24)
23
-
24
- .tag-plugin
25
- --theme: var(--text-p1)
26
- --theme-border: var(--block-border)
27
- --theme-block: var(--block)
28
- --theme-mark: var(--theme-block)
29
- --theme-codeblock: var(--block)
30
-
31
- .colorful[color='red']
32
- set_dynamic_color($c-red)
33
- .colorful[color='orange']
34
- set_dynamic_color($c-orange)
35
- .colorful[color='amber']
36
- set_dynamic_color($c-amber)
37
- .colorful[color='yellow']
38
- set_dynamic_color($c-yellow)
39
- .colorful[color='green']
40
- set_dynamic_color($c-green)
41
- .colorful[color='cyan']
42
- set_dynamic_color($c-cyan)
43
- .colorful[color='blue']
44
- set_dynamic_color($c-blue)
45
- .colorful[color='purple']
46
- set_dynamic_color($c-purple)
47
- .colorful[color='theme']
48
- set_dynamic_color($color-theme)
49
- .colorful[color='accent']
50
- set_dynamic_color($color-accent)
51
-
52
- .colorful[color='light']
53
- --theme-block: white
54
- set_text_black()
55
-
56
- .colorful[color='dark']
57
- --theme-block: #333
58
- set_text_white()
59
-
60
- .colorful[color='warning']
61
- --theme: $c-yellow
62
- --theme-border: #ffe659
63
- --theme-block: #ffe659
64
- --theme-link: #ff453a
65
-
66
- .colorful[color='error']
67
- --theme: $c-yellow
68
- --theme-border: #ff453a
69
- --theme-block: #ff453a
70
- --theme-link: #ffe659
71
- set_text_white()
72
-
73
- _dark_tags()
74
- set_dynamic_color($theme)
75
- --theme: $theme
76
- --theme-border: hsl(hue($theme), 50, 24)
77
- --theme-block: hsl(hue($theme), 24, 24)
78
- --theme-mark: hsl(hue($theme), 24, 24)
79
- --theme-codeblock: hsl(hue($theme), 12, 18)
80
- --text: hsl(hue($theme), 100, 80)
81
- --text-p1: hsl(hue($theme), 50, 72)
82
- --text-p2: hsl(hue($theme), 80, 64)
83
- .tag-plugin.tag
84
- set_dynamic_color($color-theme)
85
- .colorful[color='red']
86
- set_dynamic_color($c-red)
87
- .colorful[color='orange']
88
- set_dynamic_color($c-orange)
89
- .colorful[color='amber']
90
- set_dynamic_color($c-amber)
91
- .colorful[color='yellow']
92
- set_dynamic_color($c-yellow)
93
- .colorful[color='green']
94
- set_dynamic_color($c-green)
95
- .colorful[color='cyan']
96
- set_dynamic_color($c-cyan)
97
- .colorful[color='blue']
98
- set_dynamic_color($c-blue)
99
- .colorful[color='purple']
100
- set_dynamic_color($c-purple)
101
- .colorful[color='light']
102
- --theme-border: white
103
- --theme-block: #fff
104
- set_text_black()
105
-
106
- .colorful[color='dark']
107
- --theme-border: black
108
- --theme-block: #111
109
- set_text_white()
110
-
111
- .colorful[color='warning'],.colorful[color='light']
112
- set_text_black()
113
-
114
-
115
- :root[data-theme="dark"]
116
- _dark_tags()
117
- :root:not([data-theme])
118
- @media (prefers-color-scheme: dark)
119
- _dark_tags()
120
-
@@ -1,120 +0,0 @@
1
- // 通用 hsla 函数
2
- hsla-var(h = var(--hue), s = var(--sat), l = var(--light), a = 1)
3
- return unquote('hsla(%s, %s, %s, %s)' % (h s l a))
4
-
5
- // Deprecated function. Keep for compatibility.
6
- theme($t)
7
- convert(hexo-config('style.prefers_theme')) == $t
8
-
9
- $color-background-h = hue($color-background)
10
- $color-background-s = saturation($color-background)
11
- $color-background-l = lightness($color-background)
12
-
13
- $color-block-h = hue($color-block)
14
- $color-block-s = saturation($color-block)
15
- $color-block-l = lightness($color-block)
16
-
17
- $color-code-h = hue($color-code)
18
- $color-code-s = saturation($color-code)
19
- $color-code-l = lightness($color-code)
20
-
21
- $color-text-h = hue($color-text)
22
- $color-text-s = saturation($color-text)
23
- $color-text-l = lightness($color-text)
24
-
25
- _dark_text()
26
- --text: hsl($color-text-h, $color-text-s, 0)
27
- --text-p1: hsl($color-text-h, $color-text-s, $color-text-l)
28
- --text-p2: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 0.75)
29
- --text-p3: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 1.25)
30
- --text-p3-opa: hsla($color-text-h, $color-text-s, $color-text-l / 0.5 * 1.25, 0.3)
31
- --text-p4: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 1.5)
32
- --text-meta: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 2)
33
- --text-code: hsl($color-code-h, $color-code-s, $color-code-l)
34
-
35
- _light_text()
36
- --text: hsl($color-text-h, $color-text-s, 100)
37
- --text-p1: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 0.5)
38
- --text-p2: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 0.75)
39
- --text-p3: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 1.2)
40
- --text-p3-opa: hsla($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 1.2, 0.3)
41
- --text-p4: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 1.4)
42
- --text-meta: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 1.75)
43
- --text-code: hsl($color-code-h, $color-code-s, (100 - $color-code-l) * 1.2)
44
-
45
- _common_root()
46
- :root
47
- --theme-link: $color-link
48
- --theme-color: $color-theme
49
- --theme-color-opa: $color-theme-opa
50
- // new
51
- --hue: 50
52
- --sat: 90%
53
- --light: 80%
54
- --dynamic-color: hsla-var()
55
-
56
- _light_root()
57
- --site-bg: hsl($color-background-h, $color-background-s, $color-background-l)
58
- --card: hsl($color-block-h, $color-block-s, 100)
59
- --block: hsla(black, 0.04)
60
- --block-border: hsla(black, 0.08)
61
- --theme-link-opa: rgba($color-link, 0.2)
62
- --leftbar-bg: hsl($color-block-h, $color-block-s, 90)
63
- --alpha20: rgba(white, 0.2)
64
- --alpha50: rgba(white, 0.5)
65
- --alpha60: rgba(white, 0.6)
66
- --alpha75: rgba(white, 0.75)
67
- --alpha100: white
68
- // chat 标签
69
- --chat-bg: #f1f2f5
70
- --chat-block: #ffffff
71
- --chat-border: #f2f2f2
72
- --chat-qq-right-bg: #0099FF
73
- --chat-qq-right-text: #ffffff
74
- --chat-wechat-news-num: #d8dadf
75
- --chat-video-button: #ffffffE6
76
- --chat-wechat-right-bg: #91ED61
77
- --chat-quote-blink-color: #185c6d1a
78
- --chat-wechat-quote-color: #808080
79
- --chat-wechat-quote-bg: #8080801a
80
- _dark_text()
81
-
82
- _dark_root()
83
- --site-bg: hsl($color-background-h, $color-background-s * 0.5, (100 - $color-background-l) * 2 + 8)
84
- --card: hsl($color-block-h, $color-block-s * 1.2, 16)
85
- --block: hsl($color-block-h, $color-block-s, 20)
86
- --block-border: hsl($color-block-h, $color-block-s, 24)
87
- --theme-link-opa: rgba($color-link, 0.4)
88
- --leftbar-bg: hsl($color-block-h, $color-block-s, 24)
89
- --alpha20: rgba(black, 0.2)
90
- --alpha50: rgba(black, 0.5)
91
- --alpha60: rgba(black, 0.6)
92
- --alpha75: rgba(black, 0.75)
93
- --alpha100: black
94
- // chat 标签
95
- --chat-bg: #1f2224 // #111111
96
- --chat-block: #25282a // #191919
97
- --chat-border: #303437 // #222222
98
- --chat-qq-right-bg: #0099ff80
99
- --chat-qq-right-text: #ffffff99
100
- --chat-wechat-news-num: #25282a
101
- --chat-video-button: #25282ad9 // #191919E6
102
- --chat-wechat-right-bg: hsl(hue($c-green), 25, 25)
103
- --chat-quote-blink-color: #185c6d26
104
- --chat-wechat-quote-color: #858585
105
- --chat-wechat-quote-bg: #8585851a
106
- _light_text()
107
- @media screen and (max-width: $device-mobile-max)
108
- --site-bg: black
109
-
110
- _common_root()
111
-
112
- :root[data-theme="light"]
113
- _light_root()
114
- :root[data-theme="dark"]
115
- _dark_root()
116
- :root:not([data-theme])
117
- _light_root()
118
- @media (prefers-color-scheme: dark)
119
- _dark_root()
120
-