hexo-theme-stellar 1.30.3 → 1.30.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  ######## Stellar info ########
2
2
  stellar:
3
- version: '1.30.3'
3
+ version: '1.30.4'
4
4
  homepage: 'https://xaoxuu.com/wiki/stellar/'
5
5
  repo: 'https://github.com/xaoxuu/hexo-theme-stellar'
6
6
  main_css: /css/main.css
@@ -100,7 +100,7 @@ function custom_inject() {
100
100
  <meta name="force-rendering" content="webkit">
101
101
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
102
102
  <meta name="HandheldFriendly" content="True" >
103
- <meta name="apple-mobile-web-app-capable" content="yes">
103
+ <meta name="mobile-web-app-capable" content="yes">
104
104
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
105
105
  <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#000">
106
106
  <meta name="theme-color" content="#f9fafb">
package/layout/layout.ejs CHANGED
@@ -48,6 +48,7 @@ if (theme.style.prefers_theme === 'auto') {
48
48
  html += partial('_partial/cover/index')
49
49
  html += `<div class="l_body ${page_type}" id="start" layout="${page.layout}" type="${article_type}" ${indent ? 'text-indent' : ''}>`
50
50
  html += `<aside class="l_left">`
51
+ html += `<div class="sidebg"></div>`
51
52
  html += `<div class="leftbar-container${theme.style.leftbar?.blur ? ' leftbar-blur' : ''}">`
52
53
  html += partial('_partial/sidebar/index_leftbar')
53
54
  html += `</div>`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-stellar",
3
- "version": "1.30.3",
3
+ "version": "1.30.4",
4
4
  "description": "Elegant and powerful theme for Hexo.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -40,6 +40,7 @@ hexo.extend.tag.register('navbar', require('./lib/navbar')(hexo))
40
40
  hexo.extend.tag.register('note', require('./lib/note')(hexo))
41
41
  hexo.extend.tag.register('poetry', require('./lib/poetry')(hexo), true)
42
42
  hexo.extend.tag.register('quot', require('./lib/quot')(hexo))
43
+ hexo.extend.tag.register('quote', require('./lib/quote')(hexo), true)
43
44
  hexo.extend.tag.register('hashtag', require('./lib/hashtag')(hexo))
44
45
  hexo.extend.tag.register('okr', require('./lib/okr')(hexo), {ends: true})
45
46
  hexo.extend.tag.register('audio', require('./lib/audio')(hexo))
@@ -0,0 +1,22 @@
1
+ /**
2
+ * quote.js v1.1 | https://github.com/xaoxuu/hexo-theme-stellar/
3
+ * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
4
+ *
5
+ * quote:
6
+ * {% quote [indent:true/false] %}
7
+ * body
8
+ * {% endquote %}
9
+ *
10
+ */
11
+
12
+ 'use strict'
13
+
14
+ module.exports = ctx => function(args, content) {
15
+ var el = ''
16
+ args = ctx.args.map(args, ['indent'], [])
17
+
18
+ el += `<div class="tag-plugin quote" indent="${args.indent}">`
19
+ el += ctx.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')
20
+ el += `</div>`
21
+ return el
22
+ }
@@ -49,10 +49,11 @@
49
49
  // 侧边栏弹出后
50
50
  .l_body[leftbar] .float-panel, .l_body[rightbar] .float-panel
51
51
  box-shadow: 0 0 4px -1px $color-theme, 0 0 16px -4px $color-theme, 0 0 32px -12px $color-theme, 0 0 128px -32px $color-theme
52
+ &:before
53
+ background: var(--alpha50)
52
54
 
53
55
  .l_body[leftbar] .float-panel button.leftbar-toggle
54
56
  color: $color-theme
55
- border-color: var(--block-border)
56
57
  svg g
57
58
  fill: currentColor
58
59
  fill-opacity: 0.3
@@ -66,7 +67,6 @@
66
67
 
67
68
  .l_body[rightbar] .float-panel button.rightbar-toggle
68
69
  color: $color-theme
69
- border-color: var(--block-border)
70
70
  svg g
71
71
  fill: currentColor
72
72
  fill-opacity: 0.3
@@ -41,7 +41,7 @@
41
41
  --inset: 8px
42
42
  right: var(--inset)
43
43
  top: var(--inset)
44
- max-height: 'calc(%s - 96px)' % (100vh)
44
+ max-height: 'calc(%s - %s)' % (100vh $rightbar-bottom-margin)
45
45
  box-shadow: $boxshadow-card-float
46
46
  z-index: 10
47
47
  background: var(--site-bg)
@@ -71,10 +71,10 @@
71
71
  --inset: 8px
72
72
  left: var(--inset)
73
73
  top: var(--inset)
74
- max-height: 'calc(%s - 96px)' % (100vh)
74
+ max-height: 'calc(%s - %s)' % (100vh $leftbar-bottom-margin)
75
75
  .leftbar-container
76
76
  --inset: 8px
77
- height: 'calc(%s - 96px)' % (100vh)
77
+ height: 'calc(%s - %s)' % (100vh $leftbar-bottom-margin)
78
78
  box-shadow: $boxshadow-card-float
79
79
  z-index: 10
80
80
  .l_main
@@ -33,17 +33,23 @@
33
33
  position: relative
34
34
 
35
35
  h3:not([class])
36
+ position: relative
36
37
  &:before,&:after
37
- color: hsla($color-theme, 0.5)
38
- margin: 0 8px
38
+ position absolute
39
+ font-size: 1.2em
40
+ background-color: hsla($color-theme, 0.5)
41
+ width: 1em
42
+ height: 1em
43
+ content: ''
44
+ opacity 1
45
+ display: inline-block
39
46
  trans1 all
40
- &:before
41
- content: '⏵'
47
+ vertical-align: middle
48
+ &:before
49
+ margin-left: -1em
50
+ svg-mask-icon($h3Left)
42
51
  &:after
43
- content: '⏴'
44
- &:hover
45
- &:before,&:after
46
- color: hsla($color-theme, 1)
52
+ svg-mask-icon($h3Right)
47
53
 
48
54
  h4:not([class])
49
55
  position: relative
@@ -56,12 +62,14 @@
56
62
  margin-top: -12px
57
63
  background: hsla($color-theme, 0.3)
58
64
  border-radius: 50%
59
- filter: blur(12px)
65
+ --blur-px: 8px
66
+ filter: blur(var(--blur-px))
60
67
  pointer-events: none
61
68
  z-index: -1
62
- trans1 all
69
+ trans1 all 0.5s
63
70
  &:hover:before
64
- background: hsla($color-theme, 0.6)
71
+ --blur-px: 24px
72
+ background: hsla($color-theme, 1)
65
73
 
66
74
  ol,ul
67
75
  margin-left: 'calc(%s * 2)' % var(--fsp)
@@ -71,7 +79,7 @@
71
79
  >a:first-child
72
80
  display: none
73
81
  // 修正缩进效果
74
- >blockquote
82
+ >blockquote,.tag-plugin.quote
75
83
  text-align: center
76
84
  --inset: calc(var(--fsp) * 2)
77
85
  margin-left: var(--inset)
@@ -2,9 +2,6 @@
2
2
  margin: 8px
3
3
  max-height: 'calc(%s - 16px)' % 100vh
4
4
  border-radius: $border-card-l
5
- overflow: hidden
6
- overflow: clip
7
- overflow-clip-margin: .5px
8
5
  .header
9
6
  margin: var(--gap-max) var(--gap-margin) 0
10
7
 
@@ -20,23 +17,70 @@
20
17
  margin-right: auto
21
18
 
22
19
  .l_left
23
- background-position: center
24
- background-size: cover
25
- if hexo-config('style.leftbar') && hexo-config('style.leftbar.background-image')
26
- background-image: convert(hexo-config('style.leftbar.background-image'))
27
- else if hexo-config('style.leftbar') && hexo-config('style.leftbar.background')
28
- background: convert(hexo-config('style.leftbar.background'))
20
+ .sidebg
21
+ pointer-events: none
22
+ position: absolute
23
+ top: 0
24
+ bottom: 0
25
+ left: 0
26
+ right: 0
27
+ background-position: center
28
+ background-size: cover
29
+ border-radius: $border-card-l
30
+ --saturate: 300%
31
+ --blur-px: convert(hexo-config('style.leftbar.blur-px'))
32
+ --brightness: 100%
33
+ if hexo-config('style.leftbar') && hexo-config('style.leftbar.background-image')
34
+ if hexo-config('style.leftbar.blur-px')
35
+ left: 20%
36
+ right: 20%
37
+ background-image: convert(hexo-config('style.leftbar.background-image'))
38
+ filter: saturate(var(--saturate)) brightness(var(--brightness)) blur(var(--blur-px))
39
+ @media screen and (prefers-color-scheme: dark)
40
+ --blur-px: 'calc(%s * 0.75)' % convert(hexo-config('style.leftbar.blur-px'))
41
+ --saturate: 200%
42
+ --brightness: 75%
43
+ else if hexo-config('style.leftbar') && hexo-config('style.leftbar.background')
44
+ background: convert(hexo-config('style.leftbar.background'))
45
+
29
46
  .leftbar-container
30
47
  height: 'calc(%s - 16px)' % 100vh
31
48
  display: flex
32
49
  flex-direction: column
33
50
  word-break: break-all
34
51
  text-align: justify
35
- if hexo-config('style.leftbar') && hexo-config('style.leftbar.blur-px')
36
- --blur-px: convert(hexo-config('style.leftbar.blur-px'))
37
- @supports ((-webkit-backdrop-filter:blur(var(--blur-px))) or (backdrop-filter:blur(var(--blur-px))))
38
- background: var(--blur-bg)
39
- backdrop-filter: saturate(240%) blur(var(--blur-px))
40
- -webkit-backdrop-filter: saturate(240%) blur(var(--blur-px))
41
- if hexo-config('style.leftbar') && hexo-config('style.leftbar.blur-bg')
42
- --blur-bg: convert(hexo-config('style.leftbar.blur-bg'))
52
+ border-radius: $border-card-l
53
+ overflow: hidden
54
+ &:before,&:after
55
+ position: absolute
56
+ pointer-events: none
57
+ content: ''
58
+ top: 0
59
+ bottom: 0
60
+ left: 0
61
+ right: 0
62
+ border-radius: $border-card-l
63
+ &:before
64
+ @media screen and (min-width: $device-mobile-max)
65
+ background: rgba(white, 0.5)
66
+ box-shadow: inset 0 0 32px 1px rgba(white, 0.5)
67
+ backdrop-filter: saturate(300%)
68
+ mask: linear-gradient(black, rgba(black, 0.5), 80%, transparent, 90%, transparent)
69
+
70
+ @media screen and (prefers-color-scheme: dark)
71
+ background: rgba(white, 0.05)
72
+ box-shadow: inset 0 0 32px 1px rgba(white, 0.2)
73
+
74
+ @media screen and (max-width: $device-mobile-max)
75
+ .l_left
76
+ overflow: hidden
77
+ background: var(--alpha100)
78
+ .sidebg
79
+ left: 0
80
+ right: 0
81
+ --saturate: 300%
82
+
83
+
84
+ @media screen and (max-width: $device-mobile-max) and (prefers-color-scheme: dark)
85
+ .l_left .leftbar-container:after
86
+ background: var(--alpha20)
@@ -0,0 +1,7 @@
1
+ .tag-plugin.quote
2
+ position: relative
3
+ p:not([class])
4
+ text-indent: 0 !important
5
+ &[indent='true']
6
+ p:not([class])
7
+ text-indent: 'calc(%s * 2)' % var(--fsp) !important
@@ -21,6 +21,9 @@ $ff-logo = $ff-body
21
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
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
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
+
24
27
  if hexo-config('style.font-family.body')
25
28
  $ff-body = convert(hexo-config('style.font-family.body'))
26
29
 
@@ -51,4 +51,8 @@ $c-blue = #2196f3
51
51
  $c-purple = #9c27b0
52
52
 
53
53
  $hue-yellow = 50
54
- $cDeepOrange = hsl(14 100% 57%)
54
+ $cDeepOrange = hsl(14 100% 57%)
55
+
56
+
57
+ $leftbar-bottom-margin = 128px
58
+ $rightbar-bottom-margin = 96px