hexo-theme-stellar 1.28.0 → 1.29.0
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.
- package/_config.yml +55 -6
- package/_data/icons.yml +3 -1
- package/_data/widgets.yml +6 -0
- package/languages/en.yml +7 -0
- package/languages/zh-CN.yml +7 -0
- package/languages/zh-TW.yml +7 -0
- package/layout/_partial/comments/artalk/script.ejs +9 -13
- package/layout/_partial/comments/beaudar/script.ejs +20 -23
- package/layout/_partial/comments/giscus/script.ejs +11 -11
- package/layout/_partial/comments/twikoo/script.ejs +12 -17
- package/layout/_partial/comments/utterances/script.ejs +20 -23
- package/layout/_partial/comments/waline/script.ejs +9 -16
- package/layout/_partial/head.ejs +1 -1
- package/layout/_partial/main/article/article_footer.ejs +6 -2
- package/layout/_partial/main/article/related_posts.ejs +1 -1
- package/layout/_partial/main/navbar/article_banner.ejs +2 -0
- package/layout/_partial/main/navbar/breadcrumb/note.ejs +8 -0
- package/layout/_partial/main/navbar/dateinfo.ejs +11 -0
- package/layout/_partial/main/notebook/note_card.ejs +36 -0
- package/layout/_partial/main/notebook/note_tags.ejs +9 -0
- package/layout/_partial/main/notebook/notebook_card.ejs +10 -0
- package/layout/_partial/main/notebook/paginator.ejs +9 -0
- package/layout/_partial/scripts/tagtree.ejs +29 -0
- package/layout/_partial/scripts/theme.ejs +62 -0
- package/layout/_partial/scripts.ejs +4 -1
- package/layout/_partial/sidebar/index_leftbar.ejs +10 -0
- package/layout/_partial/sidebar/index_rightbar.ejs +10 -0
- package/layout/_partial/sidebar/search.ejs +4 -0
- package/layout/_partial/widgets/recent.ejs +10 -0
- package/layout/_partial/widgets/tagtree.ejs +59 -0
- package/layout/_partial/widgets/toc.ejs +7 -5
- package/layout/_plugins/fancybox.ejs +2 -2
- package/layout/_plugins/tianli_gpt.ejs +1 -1
- package/layout/layout.ejs +5 -1
- package/layout/notebooks.ejs +8 -0
- package/layout/notes.ejs +12 -0
- package/layout/page.ejs +11 -1
- package/package.json +1 -1
- package/scripts/events/index.js +1 -0
- package/scripts/events/lib/notebooks.js +153 -0
- package/scripts/generators/notebooks.js +71 -0
- package/scripts/tags/index.js +5 -0
- package/scripts/tags/lib/image.js +16 -4
- package/scripts/tags/lib/quot.js +1 -2
- package/scripts/tags/lib/read/paper.js +90 -0
- package/scripts/tags/lib/read/reel.js +43 -0
- package/scripts/tags/lib/video.js +11 -6
- package/source/css/_common/button.styl +3 -3
- package/source/css/_common/device.styl +3 -3
- package/source/css/_common/highlight.styl +4 -2
- package/source/css/{_layout → _components}/md.styl +21 -19
- package/source/css/_components/pages/notebook.styl +65 -0
- package/source/css/{_layout → _components}/partial/article-banner.styl +4 -4
- package/source/css/{_layout → _components}/tag-plugins/common.styl +2 -2
- package/source/css/_components/tag-plugins/index.styl +1 -0
- package/source/css/{_layout → _components}/tag-plugins/media.styl +1 -1
- package/source/css/{_layout → _components}/tag-plugins/quot.styl +0 -2
- package/source/css/_components/tag-plugins/read/paper.styl +98 -0
- package/source/css/_components/tag-plugins/read/reel.styl +103 -0
- package/source/css/_defines/func.styl +4 -6
- package/source/css/_defines/theme.styl +36 -38
- package/source/css/_plugins/comments/waline.styl +3 -3
- package/source/css/_plugins/fancybox.styl +1 -1
- package/source/css/_plugins/mermaid.styl +2 -2
- package/source/css/main.styl +1 -1
- package/source/js/main.js +14 -0
- package/source/js/plugins/copycode.js +1 -1
- package/source/js/search/local-search.js +2 -2
- /package/source/css/{_layout → _components}/index.styl +0 -0
- /package/source/css/{_layout → _components}/layout.styl +0 -0
- /package/source/css/{_layout → _components}/list.styl +0 -0
- /package/source/css/{_layout → _components}/main.styl +0 -0
- /package/source/css/{_layout → _components}/pages/archives.styl +0 -0
- /package/source/css/{_layout → _components}/pages/error.styl +0 -0
- /package/source/css/{_layout → _components}/partial/article-footer.styl +0 -0
- /package/source/css/{_layout → _components}/partial/bread-nav.styl +0 -0
- /package/source/css/{_layout → _components}/partial/cover.styl +0 -0
- /package/source/css/{_layout → _components}/partial/footer.styl +0 -0
- /package/source/css/{_layout → _components}/partial/navbar.styl +0 -0
- /package/source/css/{_layout → _components}/partial/paginator.styl +0 -0
- /package/source/css/{_layout → _components}/partial/related.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/footer.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/logo.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/menu.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/nav-area.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/search.styl +0 -0
- /package/source/css/{_layout → _components}/sidebar/sidebar.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/about.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/banner.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/button.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/checkbox.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/copy.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/emoji.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/folders.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/folding.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/frame.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/friends.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/gallery.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/ghcard.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/grid.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/hashtag.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/icon.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/image.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/inline-labels.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/link.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/mark.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/navbar.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/note.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/okr.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/override.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/poetry.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/sites.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/tabs.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/timeline.styl +0 -0
- /package/source/css/{_layout → _components}/tag-plugins/toc.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/components.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/ghrepo.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/ghuser.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/list.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/markdown.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/related.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/tagcloud.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/timeline.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/toc.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/tree.styl +0 -0
- /package/source/css/{_layout → _components}/widgets/widgets.styl +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
.md-text .tag-plugin.reel
|
|
2
|
+
display: flex
|
|
3
|
+
flex-direction: column
|
|
4
|
+
align-items: center
|
|
5
|
+
padding-top: var(--gap-padding)
|
|
6
|
+
padding-bottom: var(--gap-padding)
|
|
7
|
+
>.content
|
|
8
|
+
display: flex
|
|
9
|
+
flex-direction: column
|
|
10
|
+
writing-mode: vertical-rl
|
|
11
|
+
border-top: 1px dashed var(--text-meta)
|
|
12
|
+
border-bottom: 1px dashed var(--text-meta)
|
|
13
|
+
max-width: calc(100% - 80px)
|
|
14
|
+
padding: 1rem
|
|
15
|
+
>.title
|
|
16
|
+
font-weight: 500
|
|
17
|
+
font-size: 1rem
|
|
18
|
+
>.meta
|
|
19
|
+
color: var(--text-p2)
|
|
20
|
+
font-size: $fs-12
|
|
21
|
+
font-weight: 500
|
|
22
|
+
>.body
|
|
23
|
+
overflow: auto
|
|
24
|
+
scrollbar()
|
|
25
|
+
margin: 'calc(%s - 4px) %s' % var(--gap-padding)
|
|
26
|
+
.main
|
|
27
|
+
p
|
|
28
|
+
margin: 0;
|
|
29
|
+
font-size: $fs-14
|
|
30
|
+
>.date
|
|
31
|
+
color: var(--text-p2)
|
|
32
|
+
font-size: $fs-12
|
|
33
|
+
font-weight: 500
|
|
34
|
+
text-align: right
|
|
35
|
+
// margin-left: var(--gap-p)
|
|
36
|
+
>.footer
|
|
37
|
+
color: var(--text-p4)
|
|
38
|
+
font-size: $fs-12
|
|
39
|
+
text-align: right
|
|
40
|
+
|
|
41
|
+
// 描边修饰
|
|
42
|
+
.md-text .tag-plugin.reel>.content
|
|
43
|
+
position: relative
|
|
44
|
+
&:before
|
|
45
|
+
content: ''
|
|
46
|
+
position: absolute
|
|
47
|
+
width: 4px
|
|
48
|
+
left: -4px
|
|
49
|
+
top: -16px
|
|
50
|
+
bottom: -16px
|
|
51
|
+
border-radius: 4px
|
|
52
|
+
background: var(--block)
|
|
53
|
+
&:after
|
|
54
|
+
content: ''
|
|
55
|
+
position: absolute
|
|
56
|
+
width: 4px
|
|
57
|
+
left: calc(100%)
|
|
58
|
+
top: -16px
|
|
59
|
+
bottom: -16px
|
|
60
|
+
border-radius: 4px
|
|
61
|
+
background: var(--block)
|
|
62
|
+
>.title
|
|
63
|
+
position: relative
|
|
64
|
+
&:before
|
|
65
|
+
content: ''
|
|
66
|
+
position: absolute
|
|
67
|
+
width: 4px
|
|
68
|
+
right: calc(-1rem - 4px)
|
|
69
|
+
top: calc(-1rem - 6px)
|
|
70
|
+
bottom: calc(100% + 1rem - 6px)
|
|
71
|
+
border-radius: 4px
|
|
72
|
+
background: $color-accent
|
|
73
|
+
z-index: 1
|
|
74
|
+
&:after
|
|
75
|
+
content: ''
|
|
76
|
+
position: absolute
|
|
77
|
+
width: 4px
|
|
78
|
+
right: calc(-1rem - 4px)
|
|
79
|
+
top: calc(100% + 1rem - 6px)
|
|
80
|
+
bottom: calc(-1rem - 6px)
|
|
81
|
+
border-radius: 4px
|
|
82
|
+
background: $color-accent
|
|
83
|
+
z-index: 1
|
|
84
|
+
>.footer
|
|
85
|
+
position: relative
|
|
86
|
+
&:before
|
|
87
|
+
content: ''
|
|
88
|
+
position: absolute
|
|
89
|
+
width: 4px
|
|
90
|
+
left: calc(-1rem - 4px)
|
|
91
|
+
top: calc(-1rem - 6px)
|
|
92
|
+
bottom: calc(100% + 1rem - 6px)
|
|
93
|
+
border-radius: 4px
|
|
94
|
+
background: $color-accent
|
|
95
|
+
&:after
|
|
96
|
+
content: ''
|
|
97
|
+
position: absolute
|
|
98
|
+
width: 4px
|
|
99
|
+
left: calc(-1rem - 4px)
|
|
100
|
+
top: calc(100% + 1rem - 6px)
|
|
101
|
+
bottom: calc(-1rem - 6px)
|
|
102
|
+
border-radius: 4px
|
|
103
|
+
background: $color-accent
|
|
@@ -113,13 +113,11 @@ hoverable-card()
|
|
|
113
113
|
ondark()
|
|
114
114
|
&:hover
|
|
115
115
|
box-shadow: 0 0 4px -2px $color-theme, 0 0 24px -8px $color-theme
|
|
116
|
-
|
|
116
|
+
:root[data-theme="light"] &
|
|
117
117
|
onlight()
|
|
118
|
-
|
|
118
|
+
:root[data-theme="dark"] &
|
|
119
119
|
ondark()
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
onlight()
|
|
120
|
+
:root:not([data-theme]) &
|
|
121
|
+
onlight()
|
|
123
122
|
@media (prefers-color-scheme: dark)
|
|
124
123
|
ondark()
|
|
125
|
-
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// Deprecated function. Keep for compatibility.
|
|
1
2
|
theme($t)
|
|
2
3
|
convert(hexo-config('style.prefers_theme')) == $t
|
|
3
4
|
|
|
@@ -40,47 +41,44 @@ _common_root()
|
|
|
40
41
|
--theme-link: $color-link
|
|
41
42
|
|
|
42
43
|
_light_root()
|
|
43
|
-
:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
--site-bg: hsl($color-background-h, $color-background-s, $color-background-l)
|
|
45
|
+
--card: hsl($color-block-h, $color-block-s, 100)
|
|
46
|
+
--block: hsl($color-block-h, $color-block-s, 95)
|
|
47
|
+
--block-border: hsl($color-block-h, $color-block-s, 90)
|
|
48
|
+
--block-hover: hsl($color-block-h, $color-block-s, 92)
|
|
49
|
+
--theme-link-opa: rgba($color-link, 0.2)
|
|
50
|
+
--leftbar-bg: hsl($color-block-h, $color-block-s, 90)
|
|
51
|
+
--alpha20: rgba(white, 0.2)
|
|
52
|
+
--alpha50: rgba(white, 0.5)
|
|
53
|
+
--alpha60: rgba(white, 0.6)
|
|
54
|
+
--alpha75: rgba(white, 0.75)
|
|
55
|
+
--alpha100: white
|
|
56
|
+
_dark_text()
|
|
57
|
+
|
|
58
58
|
_dark_root()
|
|
59
|
-
:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
--site-bg: black
|
|
59
|
+
--site-bg: hsl($color-background-h, $color-background-s * 0.5, (100 - $color-background-l) * 2 + 8)
|
|
60
|
+
--card: hsl($color-block-h, $color-block-s * 1.2, 24)
|
|
61
|
+
--block: hsl($color-block-h, $color-block-s, 16)
|
|
62
|
+
--block-border: hsl($color-block-h, $color-block-s, 24)
|
|
63
|
+
--block-hover: hsl($color-block-h, $color-block-s, 20)
|
|
64
|
+
--theme-link-opa: rgba($color-link, 0.4)
|
|
65
|
+
--leftbar-bg: hsl($color-block-h, $color-block-s, 24)
|
|
66
|
+
--alpha20: rgba(black, 0.2)
|
|
67
|
+
--alpha50: rgba(black, 0.5)
|
|
68
|
+
--alpha60: rgba(black, 0.6)
|
|
69
|
+
--alpha75: rgba(black, 0.75)
|
|
70
|
+
--alpha100: black
|
|
71
|
+
_light_text()
|
|
72
|
+
@media screen and (max-width: $device-mobile-max)
|
|
73
|
+
--site-bg: black
|
|
75
74
|
|
|
76
75
|
_common_root()
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
|
|
77
|
+
:root[data-theme="light"]
|
|
79
78
|
_light_root()
|
|
80
|
-
|
|
79
|
+
:root[data-theme="dark"]
|
|
81
80
|
_dark_root()
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
_light_root()
|
|
81
|
+
:root:not([data-theme])
|
|
82
|
+
_light_root()
|
|
85
83
|
@media (prefers-color-scheme: dark)
|
|
86
|
-
_dark_root()
|
|
84
|
+
_dark_root()
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
--waline-border: 1px solid var(--waline-border-color);
|
|
37
37
|
--waline-avatar-radius: 50%;
|
|
38
38
|
--waline-box-shadow: none;
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
.cmt-body.waline
|
|
41
41
|
ondark()
|
|
42
42
|
--waline-white: #000;
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
font-size: 1.25em;
|
|
62
62
|
color: #fff;
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
:root[data-theme="dark"] &
|
|
65
65
|
ondark()
|
|
66
|
-
|
|
66
|
+
:root:not([data-theme]) &
|
|
67
67
|
@media (prefers-color-scheme: dark)
|
|
68
68
|
ondark()
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
img[data-fancybox]
|
|
1
|
+
img[data-fancybox], a[data-fancybox]
|
|
2
2
|
cursor: zoom-in
|
package/source/css/main.styl
CHANGED
package/source/js/main.js
CHANGED
|
@@ -58,6 +58,20 @@ const util = {
|
|
|
58
58
|
scrollComment: () => {
|
|
59
59
|
document.getElementById('comments').scrollIntoView({behavior: "smooth"});
|
|
60
60
|
},
|
|
61
|
+
|
|
62
|
+
viewportLazyload: (target, func, enabled = true) => {
|
|
63
|
+
if (!enabled || !("IntersectionObserver" in window)) {
|
|
64
|
+
func();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const observer = new IntersectionObserver((entries) => {
|
|
68
|
+
if (entries[0].intersectionRatio > 0) {
|
|
69
|
+
func();
|
|
70
|
+
observer.disconnect();
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
observer.observe(target);
|
|
74
|
+
}
|
|
61
75
|
}
|
|
62
76
|
|
|
63
77
|
const hud = {
|
|
@@ -7,7 +7,7 @@ window.codeElements.forEach((codeElement) => {
|
|
|
7
7
|
|
|
8
8
|
// 添加点击事件监听
|
|
9
9
|
codeCopyBtn.addEventListener('click', async () => {
|
|
10
|
-
const codeToCopy = codeElement.querySelector('
|
|
10
|
+
const codeToCopy = codeElement.querySelector('pre')?.innerText || '';
|
|
11
11
|
if (navigator.clipboard) {
|
|
12
12
|
try {
|
|
13
13
|
await navigator.clipboard.writeText(codeToCopy);
|
|
@@ -64,7 +64,7 @@ var searchFunc = function(path, filter, wrapperId, searchId, contentId) {
|
|
|
64
64
|
var dataTitleLowerCase = dataTitle.toLowerCase();
|
|
65
65
|
var dataContent = data.content;
|
|
66
66
|
var dataContentLowerCase = dataContent.toLowerCase();
|
|
67
|
-
var dataUrl = data.path;
|
|
67
|
+
var dataUrl = data.path.startsWith('//') ? data.path.slice(1) : data.path; // 避免文章设置永久链接导致点击打开失败
|
|
68
68
|
var indexTitle = -1;
|
|
69
69
|
var indexContent = -1;
|
|
70
70
|
var firstOccur = -1;
|
|
@@ -167,4 +167,4 @@ utils.jq(() => {
|
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
169
|
observer.observe($resultArea, { childList: true });
|
|
170
|
-
});
|
|
170
|
+
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|