hexo-theme-stellar 1.24.1 → 1.26.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.
Files changed (136) hide show
  1. package/_config.yml +122 -50
  2. package/_data/icons.yml +33 -0
  3. package/_data/widgets.yml +2 -16
  4. package/languages/en.yml +2 -1
  5. package/languages/zh-CN.yml +3 -2
  6. package/languages/zh-TW.yml +3 -2
  7. package/layout/404.ejs +2 -4
  8. package/layout/_partial/cover/index.ejs +5 -5
  9. package/layout/_partial/cover/post_cover.ejs +1 -1
  10. package/layout/_partial/cover/wiki_cover.ejs +2 -2
  11. package/layout/_partial/head.ejs +6 -9
  12. package/layout/_partial/main/article/article_footer.ejs +16 -24
  13. package/layout/_partial/main/article/read_next.ejs +13 -13
  14. package/layout/_partial/main/article/related_posts.ejs +1 -1
  15. package/layout/_partial/main/footer.ejs +1 -1
  16. package/layout/_partial/main/navbar/article_top_area.ejs +35 -0
  17. package/layout/_partial/main/navbar/author_banner.ejs +1 -3
  18. package/layout/_partial/main/navbar/breadcrumb/blog.ejs +34 -0
  19. package/layout/_partial/main/navbar/breadcrumb/page.ejs +10 -0
  20. package/layout/_partial/main/navbar/breadcrumb/wiki.ejs +20 -0
  21. package/layout/_partial/main/navbar/dateinfo.ejs +32 -0
  22. package/layout/_partial/main/navbar/ghinfo.ejs +25 -0
  23. package/layout/_partial/main/navbar/{list_post.ejs → nav_tabs_blog.ejs} +15 -7
  24. package/layout/_partial/main/navbar/{list_wiki.ejs → nav_tabs_wiki.ejs} +15 -1
  25. package/layout/_partial/main/post_list/paginator.ejs +1 -1
  26. package/layout/_partial/main/post_list/post_card.ejs +4 -15
  27. package/layout/_partial/main/post_list/topic_card.ejs +16 -0
  28. package/layout/_partial/menubtn.ejs +1 -1
  29. package/layout/_partial/plugins/ai/tianli_gpt.ejs +4 -3
  30. package/layout/_partial/plugins/comments/artalk/layout.ejs +1 -1
  31. package/layout/_partial/plugins/comments/artalk/script.ejs +1 -1
  32. package/layout/_partial/plugins/comments/beaudar/layout.ejs +1 -1
  33. package/layout/_partial/plugins/comments/giscus/layout.ejs +1 -1
  34. package/layout/_partial/plugins/comments/layout.ejs +3 -3
  35. package/layout/_partial/plugins/comments/twikoo/layout.ejs +1 -1
  36. package/layout/_partial/plugins/comments/utterances/layout.ejs +1 -1
  37. package/layout/_partial/plugins/comments/waline/layout.ejs +1 -1
  38. package/layout/_partial/sidebar/index.ejs +92 -83
  39. package/layout/_partial/sidebar/logo.ejs +87 -0
  40. package/layout/_partial/sidebar/menu.ejs +23 -18
  41. package/layout/_partial/sidebar/search.ejs +42 -0
  42. package/layout/_partial/widgets/components/link.ejs +21 -0
  43. package/layout/_partial/widgets/components/linklist.ejs +27 -0
  44. package/layout/_partial/widgets/ghissues.ejs +7 -9
  45. package/layout/_partial/widgets/ghrepo.ejs +10 -12
  46. package/layout/_partial/widgets/ghuser.ejs +2 -6
  47. package/layout/_partial/widgets/linklist.ejs +17 -0
  48. package/layout/_partial/widgets/markdown.ejs +5 -2
  49. package/layout/_partial/widgets/recent.ejs +12 -8
  50. package/layout/_partial/widgets/related.ejs +51 -20
  51. package/layout/_partial/widgets/search.ejs +0 -40
  52. package/layout/_partial/widgets/tagcloud.ejs +2 -2
  53. package/layout/_partial/widgets/timeline.ejs +2 -2
  54. package/layout/_partial/widgets/toc.ejs +61 -53
  55. package/layout/archive.ejs +3 -3
  56. package/layout/categories.ejs +2 -2
  57. package/layout/index.ejs +10 -62
  58. package/layout/index_topic.ejs +28 -0
  59. package/layout/index_wiki.ejs +42 -0
  60. package/layout/layout.ejs +53 -21
  61. package/layout/page.ejs +60 -13
  62. package/layout/tags.ejs +2 -2
  63. package/package.json +2 -2
  64. package/scripts/events/index.js +5 -0
  65. package/scripts/events/lib/authors.js +1 -1
  66. package/scripts/events/lib/config.js +28 -24
  67. package/scripts/events/lib/doc_tree.js +27 -19
  68. package/scripts/events/lib/merge_posts.js +46 -0
  69. package/scripts/events/lib/topic_tree.js +45 -0
  70. package/scripts/generators/404.js +8 -3
  71. package/scripts/generators/author.js +4 -2
  72. package/scripts/generators/categories.js +4 -4
  73. package/scripts/generators/tags.js +4 -4
  74. package/scripts/generators/topic.js +21 -0
  75. package/scripts/generators/wiki.js +30 -28
  76. package/scripts/helpers/category_color.js +1 -1
  77. package/scripts/helpers/icon.js +16 -0
  78. package/scripts/helpers/parse_config.js +20 -18
  79. package/scripts/helpers/scrollreveal.js +6 -6
  80. package/scripts/tags/lib/audio.js +9 -4
  81. package/scripts/tags/lib/navbar.js +1 -1
  82. package/scripts/tags/lib/toc.js +1 -1
  83. package/scripts/tags/lib/video.js +8 -8
  84. package/source/css/_common/blur.styl +5 -9
  85. package/source/css/_common/cap.styl +1 -1
  86. package/source/css/_common/device.styl +2 -2
  87. package/source/css/_common/highlight.styl +3 -2
  88. package/source/css/_common/layout.styl +6 -0
  89. package/source/css/_common/svg.styl +3 -0
  90. package/source/css/_custom.styl +9 -2
  91. package/source/css/_defines/theme.styl +10 -0
  92. package/source/css/_layout/layout.styl +17 -4
  93. package/source/css/_layout/list.styl +5 -2
  94. package/source/css/_layout/main.styl +5 -4
  95. package/source/css/_layout/md.styl +12 -11
  96. package/source/css/_layout/partial/paginator.styl +2 -2
  97. package/source/css/_layout/partial/related.styl +3 -0
  98. package/source/css/_layout/sidebar/footer.styl +4 -31
  99. package/source/css/_layout/sidebar/{header.styl → logo.styl} +11 -41
  100. package/source/css/_layout/sidebar/menu.styl +53 -0
  101. package/source/css/_layout/sidebar/nav-area.styl +2 -0
  102. package/source/css/_layout/sidebar/search.styl +106 -0
  103. package/source/css/_layout/sidebar/sidebar.styl +21 -31
  104. package/source/css/_layout/tag-plugins/banner.styl +9 -7
  105. package/source/css/_layout/tag-plugins/frame.styl +1 -1
  106. package/source/css/_layout/tag-plugins/okr.styl +0 -1
  107. package/source/css/_layout/tag-plugins/tabs.styl +2 -2
  108. package/source/css/_layout/tag-plugins/toc.styl +1 -1
  109. package/source/css/_layout/widgets/components.styl +49 -0
  110. package/source/css/_layout/widgets/ghrepo.styl +0 -1
  111. package/source/css/_layout/widgets/ghuser.styl +0 -23
  112. package/source/css/_layout/widgets/list.styl +28 -0
  113. package/source/css/_layout/widgets/markdown.styl +20 -0
  114. package/source/css/_layout/widgets/related.styl +36 -5
  115. package/source/css/_layout/widgets/timeline.styl +21 -2
  116. package/source/css/_layout/widgets/toc_blog.styl +1 -1
  117. package/source/css/_layout/widgets/toc_common.styl +12 -12
  118. package/source/css/_layout/widgets/toc_wiki.styl +38 -25
  119. package/source/css/_layout/widgets/widgets.styl +25 -20
  120. package/source/css/_plugins/comments/twikoo.styl +9 -9
  121. package/source/css/_plugins/scrollreveal.styl +1 -1
  122. package/source/css/_plugins/tianli_gpt.styl +12 -14
  123. package/source/js/main.js +5 -2
  124. package/source/js/plugins/copycode.js +3 -3
  125. package/source/js/plugins/fcircle.js +1 -1
  126. package/source/js/plugins/friends.js +1 -1
  127. package/source/js/plugins/memos.js +1 -1
  128. package/source/js/plugins/sites.js +2 -2
  129. package/source/js/plugins/weibo.js +1 -1
  130. package/layout/_partial/main/header/index.ejs +0 -3
  131. package/layout/_partial/main/navbar/breadcrumb.ejs +0 -139
  132. package/layout/_partial/sidebar/header.ejs +0 -59
  133. package/layout/post.ejs +0 -33
  134. package/layout/wiki.ejs +0 -43
  135. package/source/css/_layout/widgets/recent.styl +0 -15
  136. package/source/css/_layout/widgets/search.styl +0 -102
@@ -0,0 +1,106 @@
1
+
2
+ .search-wrapper
3
+ width: 100%
4
+ >.search-form
5
+ position: sticky
6
+ margin-bottom: 8px
7
+ top: 1rem
8
+ height: 40px
9
+ display: flex
10
+ flex-direction: row
11
+ align-items: center
12
+ transition: 0.38s ease-out
13
+ z-index: 0
14
+ border-radius: $border-bar
15
+ color: var(--text-p0)
16
+ background: var(--alpha50)
17
+ &:has(input:focus)
18
+ background: var(--alpha100)
19
+ .search-input
20
+ width: 100%
21
+ line-height: 16px
22
+ box-sizing: border-box
23
+ font-family: $ff-body
24
+ font-size: $fs-13
25
+ padding: 12px 0
26
+ color: var(--text-p0)
27
+ .search-button
28
+ border-radius: $border-bar
29
+ line-height: 40px
30
+ .search-icon
31
+ width: 44px
32
+ margin-left: 4px
33
+ color: var(--text-p2)
34
+ margin-bottom: 2px
35
+ path[p-id="1562"]
36
+ color: $color-theme
37
+
38
+ &[searching='true']
39
+ .search-icon
40
+ path[p-id="1562"]
41
+ color: $c-green
42
+ &.noresult[searching='true']
43
+ .search-icon
44
+ path[p-id="1562"]
45
+ color: $c-red
46
+
47
+ .search-no-result
48
+ display: none
49
+ color: var(--text-p1)
50
+ text-align: center
51
+ font-size: $fs-14
52
+ padding: 2rem
53
+ background: var(--alpha20)
54
+ border-radius: $border-card
55
+
56
+
57
+ #search-result
58
+ max-height: 60vh
59
+ overflow: scroll
60
+ scrollbar-width: none
61
+ scrollbar(0, 0)
62
+ border-radius: $border-card
63
+ &:empty
64
+ display: none
65
+ .search-result-list
66
+ padding: 0
67
+ margin: 0
68
+ list-style-type: none
69
+ li a
70
+ display: block
71
+ background: var(--alpha20)
72
+ line-height: 1.2
73
+ padding: 0.75rem 1rem
74
+ border-radius: $border-card
75
+ trans1 background
76
+ &:hover
77
+ background: var(--alpha100)
78
+ li+li
79
+ margin-top: 8px
80
+ .search-result-title
81
+ color: var(--text-p1)
82
+ font-weight: 700
83
+
84
+ .search-result-content
85
+ overflow: hidden
86
+ color: var(--text-p3)
87
+ margin: 4px 0 0
88
+ max-height: 13em
89
+ text-align: justify
90
+ font-size: $fs-12
91
+ display: -webkit-box
92
+ -webkit-box-orient: vertical
93
+ overflow: hidden
94
+ -webkit-line-clamp: 2
95
+
96
+ .search-keyword
97
+ color: $c-red
98
+ border-bottom: 1px dashed $c-red
99
+ font-weight: bold
100
+ filter grayscale(25%)
101
+
102
+
103
+ .search-wrapper.noresult[searching='true']
104
+ .search-no-result
105
+ display: block
106
+ margin-bottom: 8px
@@ -1,39 +1,29 @@
1
1
  .l_left
2
- display: flex
3
- flex-direction: column
4
- word-break: break-all
5
- text-align: justify
6
- height: 100vh
2
+ margin: 8px
3
+ height: 'calc(%s - 16px)' % 100vh
4
+ border-radius: $border-card
5
+ overflow: hidden
7
6
  .header
8
7
  margin: var(--gap-l) var(--gap-l) 0
9
8
  margin-top: "calc(2 * %s)" % var(--gap-l)
10
9
  @media screen and (min-width: $device-mobile-max)
11
10
  >.widgets:first-child>.widget-wrapper:first-child
12
11
  margin-top: "calc(2 * %s)" % var(--gap-l)
13
- @media screen and (max-width: $device-mobile-max)
14
- height: 100vh
15
12
 
16
-
17
- .l_left[layout=wiki]
18
- padding-bottom: 0
19
- height: 100vh
20
- @media screen and (max-width: $device-mobile-max)
21
- height: 100vh
22
- .widgets >:last-child
23
- margin-bottom: 6rem
24
-
25
-
26
- .l_left .widgets .widget-wrapper.logo-wrap.wiki .widget-body
27
- display: flex
28
- margin-bottom: 1.5rem
29
- flex-direction: column
30
- align-items: flex-start
31
- a.wiki-home
32
- margin-bottom: 0.5rem
33
- color: var(--text-p1)
34
- svg
35
- margin-right: 2px
36
- &:hover
37
- color: $color-hover
38
- filter: unset !important
39
-
13
+ .l_left
14
+ background-size: cover
15
+ if hexo-config('style.sidebar.background')
16
+ background-image: convert(hexo-config('style.sidebar.background'))
17
+ .sidebar-container
18
+ height: 100%
19
+ display: flex
20
+ flex-direction: column
21
+ word-break: break-all
22
+ text-align: justify
23
+ .sidebar-blur
24
+ --blur-px: 100px
25
+ --blur-bg: var(--sidebar-bg)
26
+ @supports ((-webkit-backdrop-filter:blur(var(--blur-px))) or (backdrop-filter:blur(var(--blur-px))))
27
+ background: var(--blur-bg)
28
+ backdrop-filter: saturate(240%) blur(var(--blur-px))
29
+ -webkit-backdrop-filter: saturate(240%) blur(var(--blur-px))
@@ -111,11 +111,13 @@
111
111
  img.bg
112
112
  transform: scale(1.01)
113
113
 
114
- .l_main.list .tag-plugin.banner
115
- background: var(--block-hover)
116
- .content .top
117
- margin-top: 1.5rem
118
- margin: 0 1rem
119
- @media screen and (max-width: $device-mobile)
120
- margin: 0
114
+ .tag-plugin.banner .navbar a.active
115
+ blur-effect()
116
+
117
+
118
+ .tag-plugin.banner.author
119
+ @media screen and (min-width: $device-mobile-max)
120
+ margin-left: var(--gap-l)
121
+ margin-right: var(--gap-l)
122
+ @media screen and (max-width: $device-mobile-max)
121
123
  border-radius: 0
@@ -27,7 +27,7 @@
27
27
  margin-top: 19px
28
28
  margin-bottom: 20px
29
29
  .frame
30
- background-image: url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/frame/iphone11.svg);
30
+ background-image: url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/frame/iphone11.svg);
31
31
  width: 329px
32
32
  height: 658px
33
33
  &[focus='top']
@@ -2,7 +2,6 @@
2
2
  position: relative
3
3
  border-radius: $border-block
4
4
  background: var(--theme-block)
5
- border: 1px solid var(--theme-border)
6
5
  if hexo-config('tag_plugins.okr.border') == true
7
6
  border: 1px solid var(--theme-border)
8
7
  overflow: hidden
@@ -82,7 +82,7 @@
82
82
  .tab-content:has(.grid-box)
83
83
  width: 100%
84
84
 
85
- .md-text.indent .tag-plugin.tabs .tab-content p:not([class])
86
- text-indent: 'calc(%s * 2)' % $fs-p
85
+ .l_body[text-indent] .md-text .tag-plugin.tabs .tab-content p:not([class])
86
+ text-indent: 'calc(%s * 2)' % var(--fs-p)
87
87
  a
88
88
  text-indent: 0
@@ -1,7 +1,7 @@
1
1
  details.toc
2
2
  background: var(--block)
3
3
  border: 1px solid var(--block-border)
4
- border-radius: $border-bar
4
+ border-radius: $border-card
5
5
  overflow: hidden
6
6
  color: var(--text-p2)
7
7
  summary
@@ -0,0 +1,49 @@
1
+ .widget-body .linklist
2
+ display: grid
3
+ grid-gap: 8px
4
+
5
+ .linklist .link
6
+ border-radius: $border-bar
7
+ color: var(--text-p2)
8
+ min-height: 32px
9
+ padding: 0 4px
10
+ trans1 background
11
+ display: flex
12
+ justify-content: center
13
+ align-items: center
14
+ txt-ellipsis()
15
+ &.active
16
+ background: var(--alpha50)
17
+ svg,img
18
+ filter: unset
19
+
20
+ .linklist .link span
21
+ padding: 0 4px
22
+ txt-ellipsis()
23
+ .linklist .link svg, .linklist .link img
24
+ $size = 16px
25
+ padding: 0 2px
26
+ &:not([class='active-icon'])
27
+ color: $color-theme
28
+ max-height: 18px
29
+ width: auto
30
+ filter: grayscale(100%) brightness(0.8) opacity(0.8)
31
+ trans1 filter
32
+ flex-shrink: 0
33
+
34
+ .widget-body .linklist.left
35
+ grid-gap: 2px
36
+ .linklist.left .link
37
+ justify-content: space-between
38
+ padding: 0 16px
39
+ img,svg
40
+ width: 1em
41
+ height: 1em
42
+ transform: scale(1.2)
43
+ span
44
+ padding: 0 8px
45
+
46
+ .linklist .link:hover
47
+ background: var(--alpha100)
48
+ svg
49
+ filter: unset
@@ -6,7 +6,6 @@
6
6
  background: var(--card)
7
7
  border-radius: $border-block
8
8
  box-shadow: $boxshadow-card
9
- hover-float()
10
9
  >div+div
11
10
  margin-top: 0.5rem
12
11
  span
@@ -48,29 +48,6 @@
48
48
  &:hover
49
49
  background: $color-hover
50
50
 
51
- .menu
52
- margin-bottom: 0
53
- background: none
54
- border: 0
55
- a
56
- margin: 0
57
- &.active
58
- box-shadow: none
59
- position: relative
60
- background: none
61
- &:after
62
- content: ''
63
- position: absolute
64
- height: 3px
65
- bottom: 0
66
- width: 32px
67
- left: 'calc(50% - 0.5 * %s)' % @width
68
- border-radius: 4px
69
- background: $color-theme
70
- &:hover
71
- box-shadow: none
72
- background: var(--block)
73
-
74
51
  .buttons
75
52
  margin: 1rem 0
76
53
  align-self: stretch
@@ -0,0 +1,28 @@
1
+ .widget-wrapper.post-list .widget-body
2
+ margin-top: 0.25rem
3
+ a
4
+ line-height: 1
5
+ font-size: $fs-14
6
+ padding: 8px 16px
7
+ display: block
8
+ border-radius: $border-bar
9
+ color: var(--text-p1)
10
+ trans1 background
11
+ &.active
12
+ background: var(--alpha50)
13
+ &:hover
14
+ background: var(--alpha100)
15
+ a+a
16
+ margin-top: 2px
17
+ a
18
+ display: flex
19
+ justify-content: space-between
20
+ align-items: center
21
+ .title
22
+ txt-ellipsis()
23
+ svg
24
+ flex-shrink: 0
25
+ height: 1em
26
+ width: auto
27
+ transform: scale(1.2)
28
+
@@ -0,0 +1,20 @@
1
+ .widget-wrapper.markdown
2
+ .widget-body
3
+ border-radius: $border-card
4
+ padding: 4px 16px
5
+ background: var(--alpha50)
6
+
7
+ a:not([class])
8
+ trans1 all
9
+ border-bottom: 1px solid var(--text-p0)
10
+ color: var(--text-p0)
11
+ &:hover
12
+ color: $color-hover
13
+ border-bottom: 1px solid $color-hover
14
+
15
+ .widget-wrapper.markdown .linklist
16
+ margin: 1em 0
17
+ .link
18
+ background: var(--alpha50)
19
+ .link:hover
20
+ background: var(--alpha100)
@@ -1,8 +1,39 @@
1
- .widget-wrapper.related .widget-body a
2
- margin-top: 0.5rem
3
- margin-bottom: 1rem
4
- .title
1
+
2
+ .widget-wrapper.post-card .widget-body
3
+ max-width: 100%
4
+ margin: 1rem 0
5
+ .item+.item
6
+ margin-top: 8px
7
+ .item
8
+ line-height: 1.2
9
+ background: var(--alpha20)
10
+ padding: 10px 16px
11
+ border-radius: $border-card
12
+ display: block
13
+ border-left: 0
14
+ box-sizing: border-box
15
+ .title
16
+ color: var(--text-p1)
17
+ font-weight: 500
18
+ font-size: 1rem
19
+ display: -webkit-box
20
+ -webkit-box-orient: vertical
21
+ overflow: hidden
22
+ -webkit-line-clamp: 1
5
23
  font-weight: 700
6
24
  font-size: $fs-14
7
25
  .excerpt
8
- -webkit-line-clamp: 3
26
+ color: var(--text-p3)
27
+ font-size: $fs-12
28
+ margin-top: 0.5rem
29
+ display: -webkit-box
30
+ -webkit-box-orient: vertical
31
+ overflow: hidden
32
+ -webkit-line-clamp: 2
33
+
34
+ .item
35
+ trans1 background
36
+ .item.active
37
+ background: var(--alpha50)
38
+ .item:hover
39
+ background: var(--alpha50)
@@ -3,10 +3,10 @@
3
3
  margin-top: 0.5rem
4
4
  .tag-plugin.timeline .timenode
5
5
  .header
6
- margin-bottom: 0.5rem
6
+ margin: 0.5rem 16px
7
7
  txt-ellipsis()
8
8
  .user-info
9
- background: var(--block)
9
+ background: var(--alpha50)
10
10
  &:hover
11
11
  background: $color-hover
12
12
  color: var(--card)
@@ -14,4 +14,23 @@
14
14
  display: none
15
15
  &+.timenode
16
16
  margin-top: 0.75rem
17
+ .header p
18
+ color: var(--text-p2)
19
+ .body
20
+ border-radius: $border-card
21
+ background: var(--alpha50)
22
+ box-shadow: none
23
+
24
+ a
25
+ trans1 all
26
+ border-bottom: 1px solid var(--text-p0)
27
+ color: var(--text-p1)
28
+ &:hover
29
+ color: $color-hover
30
+ border-bottom: 1px solid $color-hover
31
+ code
32
+ background: none
33
+ padding: 0
34
+ margin: 0
35
+
17
36
 
@@ -1,3 +1,3 @@
1
1
  .widget-wrapper.toc.single .doc-tree
2
2
  &.active>.toc
3
- border-left: 2px solid var(--block-hover)
3
+ border-left: 2px solid var(--alpha50)
@@ -1,12 +1,12 @@
1
- .widget-wrapper.toc .widget-header
2
- margin-top: 1rem
3
1
 
4
2
  .widget-wrapper.toc.single .widget-header
5
3
  font-weight: 500
6
4
  font-size: $fs-12
7
- >span
8
- margin: 0.5rem 0
9
5
 
6
+ .toc-item
7
+ margin-top: 2px
8
+ .toc-child
9
+ margin-top: 2px
10
10
  .widget-wrapper.toc .widget-body
11
11
  margin-top: 0
12
12
  ul ul, ul ol
@@ -14,8 +14,6 @@
14
14
  ol ul, ol ol
15
15
  padding-left: 0
16
16
 
17
- .doc-tree
18
- margin: 4px 0
19
17
  .toc
20
18
  padding: 0
21
19
  margin: 0
@@ -43,7 +41,7 @@
43
41
  padding: 0
44
42
  list-style: none
45
43
  &.active
46
- color: $color-theme
44
+ background: var(--alpha50)
47
45
  border-left-color: @color
48
46
  .toc-child .toc-item
49
47
  padding: 0
@@ -51,8 +49,9 @@
51
49
  color: inherit
52
50
  display: block
53
51
  line-height: 1.2
54
- border-radius: 4px
52
+ border-radius: $border-bar
55
53
  position: relative
54
+ trans1 background
56
55
  &:before
57
56
  content: ''
58
57
  position: absolute
@@ -61,14 +60,15 @@
61
60
  bottom: 'calc(50% - %s)' % 6px
62
61
  width: 2px
63
62
  border-radius: 2px
64
- background: $color-theme
63
+ background: var(--text-p0)
65
64
  visibility: hidden
66
- &:hover
67
- background: var(--block-hover)
68
65
  &.active
69
- color: $color-theme !important
66
+ background: var(--alpha50)
70
67
  &:before
71
68
  visibility: visible
69
+ &:hover
70
+ background: var(--alpha100)
71
+
72
72
 
73
73
  // 始终折叠
74
74
  .widget-wrapper.toc[collapse='true']
@@ -1,48 +1,61 @@
1
- .widget-wrapper.toc.multi .widget-header
2
- color: var(--text-p1)
3
- font-size: $fs-14
1
+ .doc-tree+.doc-tree
2
+ margin-top: 2px
4
3
 
4
+ .widget-wrapper.toc.multi
5
+ // .widget-header
6
+ // color: $color-theme
7
+ // filter: brightness(75%)
8
+ .widget-body+.widget-header
9
+ margin-top: 28px
5
10
 
6
11
  // 其它分页链接
7
12
  .widget-wrapper.toc.multi .doc-tree
8
- border-radius: $border-bar
9
- background: var(--block)
13
+ border-radius: $border-card
10
14
  overflow: hidden
11
- border: 1px solid var(--block-border)
12
15
  a.doc-tree-link
13
- color: var(--text-p2)
14
- padding: 0.5rem
15
- display: block
16
- font-size: $fs-12
17
- font-weight: 500
16
+ color: var(--text-p1)
17
+ padding: 0 16px
18
+ display: flex
19
+ min-height: 32px
20
+ justify-content: space-between
21
+ align-items: center
22
+ font-size: $fs-14
18
23
  position: relative
24
+ trans1 background
25
+ .toc-text
26
+ txt-ellipsis()
27
+ svg,img
28
+ flex-shrink: 0
29
+ width: 1em
30
+ height: 1em
31
+ transform: scale(1.2)
19
32
  &:after
20
33
  position: absolute
21
34
  right: .5rem
22
- &.active
23
- color: var(--text-p1)
24
- &:only-child
25
- background: var(--card)
35
+ &:only-child
36
+ &.active
37
+ background: var(--alpha50)
38
+ &:hover
39
+ background: var(--alpha100)
26
40
  &:hover
27
- background: var(--block-hover)
28
- &:after
29
- content: '+'
41
+ background: var(--alpha100)
30
42
 
31
43
 
32
44
  // 当前分页链接
33
45
  .widget-wrapper.toc.multi .doc-tree.active
34
46
  a.doc-tree-link
35
- background: var(--block)
36
- font-weight: 700
37
- &:not(:only-child)
38
- border-bottom: 1px solid var(--block-border)
47
+ background: var(--alpha100)
48
+ font-weight: 500
39
49
  &:hover:after
40
50
  content: none
41
51
  >.toc
42
- padding: 4px
43
- background: var(--card)
52
+ padding: 4px 10px
53
+ border: 1px solid var(--alpha50)
54
+ background: var(--alpha20)
55
+ border-bottom-left-radius: $border-card
56
+ border-bottom-right-radius: $border-card
44
57
  a.toc-link:before
45
58
  left: -2px
46
59
  width: 4px
47
60
  a.toc-link:hover
48
- background: var(--block)
61
+ background: var(--alpha100)
@@ -1,6 +1,7 @@
1
1
  .widgets
2
2
  .loading-wrap
3
3
  margin: 0.5rem 0
4
+ background: var(--alpha50)
4
5
 
5
6
  .widgets
6
7
  overflow: scroll
@@ -9,6 +10,7 @@
9
10
  scrollbar(0, 0)
10
11
  z-index: 1
11
12
  line-height: 1.2
13
+ margin: 0 var(--gap-l)
12
14
  .widget-wrapper
13
15
  .widget-header
14
16
  padding-left: var(--gap-l)
@@ -16,33 +18,39 @@
16
18
  display: flex
17
19
  justify-content: space-between
18
20
  align-items: center
21
+ line-height: 28px
19
22
  font-weight: 500
20
- position: sticky
21
- top: -2px
22
- background: var(--site-bg)
23
- padding-top: 2px
24
- z-index 1
23
+ font-size: $fs-12
24
+ color: var(--text-p1)
25
25
  .item
26
26
  display: block
27
- >span
28
- margin: 0.25rem 0
27
+ >span
29
28
  text-align: left
29
+ opacity 0.6
30
30
  &:empty
31
31
  display: none
32
32
  .cap-action
33
- hover-block 4px 4px
34
33
  line-height: 0
35
- color: var(--text-meta)
36
- trans2: color background
37
- .icon
38
- fill: var(--text-meta)
34
+ color: inherit
35
+ opacity 0.6
36
+ trans2: opacity background
37
+ border-radius: 4px
38
+ padding: 6px
39
+ margin-right: -5px
40
+ svg
41
+ height: 1em
42
+ width: auto
43
+ transform: scale(1.2)
44
+ fill: var(--text-p2)
39
45
  &:hover
40
46
  color: $color-hover
41
- .icon
47
+ background: var(--alpha100)
48
+ opacity 1
49
+ svg
42
50
  fill: $color-hover
43
51
 
44
52
  .widget-body
45
- margin: 0.5rem var(--gap-l)
53
+ margin: 0.5rem 0
46
54
  color: var(--text-p1)
47
55
  p
48
56
  margin-top: .5em
@@ -50,11 +58,8 @@
50
58
  line-height: 1.5
51
59
  .widget-header+.widget-body
52
60
  margin-top: 0
53
- .widget-wrapper+.widget-wrapper .widget-header
54
- margin-top: 3rem
55
- .widget-wrapper+.widget-wrapper.toc .widget-header
56
- margin-top: 1rem
61
+
57
62
 
58
63
  .widget-wrapper
59
- display: block
60
- margin: 2rem 0
64
+ display: block
65
+ margin: 32px 0