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
@@ -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
-