hexo-theme-solitude 2.1.2 → 2.1.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.
@@ -1,218 +1,229 @@
1
1
  if hexo-config('capsule.enable')
2
- #nav-music
3
- display flex
4
- align-items center
5
- z-index 11
6
- position fixed
7
- bottom 20px
8
- left 20px
9
- cursor pointer
10
- transition .3s
11
- transform-origin left bottom
12
- box-shadow var(--efu-shadow-border)
13
- border-radius 40px
14
- overflow hidden
15
- user-select none
16
-
17
- +maxWidth798()
18
- display none !important
19
-
20
- span
21
- user-select none
22
-
23
- div
24
- user-select none
25
-
26
- &.playing
27
- box-shadow 0 0 12px -3px var(--efu-none)
28
- -webkit-animation playingShadow 5s linear infinite
29
-
30
- .aplayer
31
- background var(--efu-main-op-deep)
32
- border var(--style-border-hover)
33
- backdrop-filter saturate(180%) blur(20px)
34
- -webkit-backdrop-filter blur(20px)
35
- transform translateZ(0)
36
-
37
- &.aplayer-withlrc
38
- .aplayer-pic
39
- box-shadow 0 0 14px #ffffffa6
40
- -webkit-transform rotate(0) scale(1.1)
41
- border-color var(--efu-white)
42
- animation-play-state running
43
-
44
- .aplayer-info
45
- color var(--efu-white)
46
-
47
- .aplayer-lrc
48
- width 200px
49
- margin-bottom 0
50
- opacity 1
51
-
52
- .aplayer-info
53
- .aplayer-controller
54
- .aplayer-bar-wrap
55
- .aplayer-bar
56
- opacity 1
57
-
58
- .aplayer-played
59
- animation-play-state running
60
- height: 100%;
61
- opacity: .1;
62
- background-color: var(--efu-white) !important;
63
- animation: lightBar 5s ease infinite;
64
- animation-play-state: paused;
65
-
66
- #nav-music-hoverTips
67
- opacity 0
68
-
69
- .aplayer
70
- background var(--efu-card-bg)
71
- border-radius 60px
72
- height 41px
73
- display flex
74
- margin 0
75
- pointer-events none
76
- transition .3s
77
- border var(--style-border)
78
- box-shadow none
79
-
80
- &.aplayer-withlrc
81
- .aplayer-pic
82
- height 25px
83
- width 25px
84
- border-radius 40px
85
- z-index 1
86
- transition .3s
87
- -webkit-transform rotate(0) scale(1)
88
- border var(--style-border-always)
89
- -webkit-animation changeright 24s linear infinite
90
- animation-play-state paused
91
-
92
- .aplayer-info
93
- height 100%
94
- color var(--efu-fontcolor)
95
- margin-left 8px
96
- padding 0
97
- display flex
98
- align-items center
99
-
100
- .aplayer-lrc
101
- width 0
102
- opacity 0
103
- transition .3s
104
- margin-left 8px
105
- margin-top -2px
106
-
107
- .aplayer-notice
108
- display none
109
-
110
- .aplayer-miniswitcher
111
- display none
112
-
113
- .aplayer-body
114
- position relative
115
- display flex
116
- align-items center
117
- padding 0 12px 0 8px
118
-
119
- .aplayer-pic
120
- .aplayer-play
121
- opacity 0
122
-
123
- div
124
- display none
125
-
126
- .aplayer-info
127
- .aplayer-music
128
- margin 0
129
- display flex
130
- align-items center
131
- padding 0
132
- z-index 1
133
-
134
- .aplayer-author
135
- display none
136
-
137
- .aplayer-title
138
- cursor pointer
139
- line-height 1
140
- display inline-block
141
- white-space nowrap
142
- max-width 120px
143
- overflow hidden
144
- text-overflow ellipsis
145
- transition .3s
146
-
147
- .aplayer-controller
148
- position absolute
149
- width 100%
150
- height 100%
151
- top 0
152
- left 0
153
-
154
- .aplayer-time
155
- display none
156
-
157
- .aplayer-bar-wrap
158
- margin 0
159
- padding 0
160
-
161
- .aplayer-bar
162
- height 100%
163
- background 0 0
164
- opacity 0
165
-
166
- .aplayer-loaded
167
- display none
168
-
169
- .aplayer-played
170
- height 100%
171
- opacity .1
172
- background-color var(--efu-white) !important
173
- -webkit-animation lightBar 5s ease infinite
174
- animation-play-state paused
175
-
176
- &.aplayer-withlist
177
- .aplayer-info
178
- border none
179
-
180
- .aplayer-lrc
181
- p
182
- color #ffffffb3
183
- filter blur(1px)
184
-
185
- &.aplayer-lrc-current
186
- color var(--efu-white)
187
- border none
188
- filter blur(0)
189
-
190
- #nav-music-hoverTips
191
- color var(--efu-white)
192
- background var(--efu-main)
193
- width 100%
194
- height 100%
195
- position absolute
196
- top 0
197
- left 0
198
- align-items center
199
- justify-content center
200
- display flex
201
- border-radius 40px
202
- opacity 0
203
- font-size 12px
204
- z-index 2
205
- pointer-events none
206
- transition .3s
207
-
208
- &:hover
209
- &:not(.playing)
210
- #nav-music-hoverTips
211
- opacity 1
212
-
213
- .aplayer-list
214
- display none
215
-
216
- #nav-music .aplayer .aplayer-lrc:after,
217
- #nav-music .aplayer .aplayer-lrc:before
218
- display none
2
+ @keyframes changeright
3
+ 0%, 50%, 100%
4
+ transform: rotate(0deg) scale(1.1)
5
+ box-shadow: 0 0 2px #ffffff00
6
+ 25%, 75%
7
+ transform: rotate(90deg) scale(1.1)
8
+ box-shadow: 0 0 14px #ffffff
9
+
10
+ @keyframes playingShadow
11
+ 0%, 100%
12
+ box-shadow: 0 0px 12px -3px var(--efu-none)
13
+ 50%
14
+ box-shadow: 0 0px 12px 0px var(--efu-main)
15
+
16
+ @keyframes lightBar
17
+ 0%, 100%
18
+ opacity: 0.1
19
+ 60%
20
+ opacity: 0.3
21
+
22
+ .aplayer.aplayer-narrow
23
+ .aplayer-body,
24
+ .aplayer-pic
25
+ height: 66px
26
+ width: 66px
27
+
28
+ #nav-music
29
+ display: flex
30
+ align-items: center
31
+ z-index: 12
32
+ position: fixed
33
+ bottom: 20px
34
+ left: 20px
35
+ cursor: pointer
36
+ transition: all 0.5s, left 0s
37
+ transform-origin: left bottom
38
+ box-shadow: var(--efu-shadow-border)
39
+ border-radius: 40px
40
+ overflow: hidden
41
+
42
+ &:active
43
+ transform: scale(0.97)
44
+
45
+ &.playing
46
+ border: var(--style-border)
47
+ box-shadow: 0 0px 12px -3px var(--efu-none)
48
+ animation: playingShadow 5s linear infinite
49
+
50
+ .aplayer.aplayer-withlrc
51
+ .aplayer-pic
52
+ box-shadow: 0 0 14px #ffffffa6
53
+ transform: rotate(0deg) scale(1.1)
54
+ border-color: var(--efu-white)
55
+ animation-play-state: running
56
+
57
+ .aplayer-info
58
+ color: var(--efu-white)
59
+
60
+ #nav-music-hoverTips
61
+ width: 0
62
+
63
+ .aplayer
64
+ background: var(--efu-main)
65
+ border: var(--style-border-hover)
66
+ backdrop-filter: saturate(180%) blur(20px)
67
+ transform: translateZ(0)
68
+
69
+ .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played
70
+ animation-play-state: running
71
+
72
+ &:hover:not(.playing) #nav-music-hoverTips
73
+ opacity: 1
74
+
75
+ .aplayer.aplayer-withlrc
76
+ .aplayer-pic
77
+ height: 25px
78
+ width: 25px
79
+ border-radius: 40px
80
+ z-index: 1
81
+ transition: 0.3s
82
+ transform: rotate(0deg) scale(1)
83
+ border: var(--style-border-always)
84
+ animation: changeright 24s linear infinite
85
+ animation-play-state: paused
86
+
87
+ .aplayer-info
88
+ height: 100%
89
+ color: var(--efu-fontcolor)
90
+ margin: 0
91
+ padding: 0
92
+ display: flex
93
+ align-items: center
94
+
95
+ #nav-music-hoverTips
96
+ color: var(--efu-white)
97
+ background: var(--efu-main)
98
+ width: 100%
99
+ height: 100%
100
+ position: absolute
101
+ top: 0
102
+ left: 0
103
+ align-items: center
104
+ justify-content: center
105
+ display: flex
106
+ border-radius: 40px
107
+ opacity: 0
108
+ font-size: 12px
109
+ z-index: 2
110
+ transition: 0.3s
111
+
112
+ .aplayer
113
+ background: var(--efu-card-bg)
114
+ border-radius: 60px
115
+ height: 41px
116
+ display: flex
117
+ margin: 0
118
+ transition: 0.3s
119
+ border: var(--style-border)
120
+ box-shadow: none
121
+
122
+ .aplayer-notice,
123
+ .aplayer-miniswitcher,
124
+ .aplayer-list
125
+ display: none
126
+
127
+ .aplayer-body
128
+ position: relative
129
+ display: flex
130
+ align-items: center
131
+
132
+ .aplayer-info
133
+ .aplayer-music
134
+ margin: 0
135
+ display: flex
136
+ align-items: center
137
+ padding: 0 12px 0 8px
138
+ cursor: pointer
139
+ z-index: 1
140
+ height: 100%
141
+
142
+ .aplayer-title
143
+ cursor: pointer
144
+ line-height: 1
145
+ display: inline-block
146
+ white-space: nowrap
147
+ max-width: 120px
148
+ overflow: hidden
149
+ text-overflow: ellipsis
150
+ transition: 0.3s
151
+ user-select: none
152
+
153
+ .aplayer-controller
154
+ position: absolute
155
+ width: 100%
156
+ height: 100%
157
+ top: 0
158
+ left: 0
159
+
160
+ .aplayer-bar-wrap
161
+ margin: 0
162
+ padding: 0
163
+
164
+ .aplayer-bar
165
+ height: 100%
166
+ background: 0 0
167
+
168
+ .aplayer-loaded
169
+ display: none
170
+
171
+ .aplayer-played
172
+ height: 100%
173
+ opacity: 0.1
174
+ background-color: var(--efu-white) !important
175
+ animation: lightBar 5s ease infinite
176
+ animation-play-state: paused
177
+
178
+ .aplayer-pic
179
+ pointer-events: none
180
+
181
+ .aplayer-button
182
+ bottom: 50%
183
+ right: 50%
184
+ transform: translate(50%, 50%)
185
+ margin: 0
186
+ transition: 0.3s
187
+ pointer-events all
188
+
189
+ &:has(.aplayer-button.aplayer-play)
190
+ animation-play-state: paused
191
+ transform: rotate(0deg) scale(1) !important
192
+
193
+ margin-left: 8px
194
+
195
+ .aplayer-info .aplayer-controller .aplayer-time,
196
+ .aplayer-info .aplayer-music .aplayer-author
197
+ display: none
198
+
199
+ &.aplayer-withlist .aplayer-info
200
+ border: none
201
+
202
+ .aplayer-lrc
203
+ width: 0
204
+ opacity: 0
205
+ transition: 0.3s
206
+ margin-bottom: -15px
207
+
208
+ p.aplayer-lrc-current
209
+ color: var(--efu-white)
210
+ border: none
211
+ min-height: 20px
212
+ filter: none
213
+
214
+ &:after,
215
+ &:before
216
+ display: none
217
+
218
+ p
219
+ color: #ffffffb3
220
+ filter: blur(.8px)
221
+
222
+ &.stretch .aplayer.aplayer-withlrc .aplayer-lrc
223
+ width: 200px
224
+ margin-left: 8px
225
+ opacity: 1
226
+
227
+ .aplayer-thumb
228
+ width: 0!important
229
+ height: 0!important
@@ -23,6 +23,8 @@ if hexo-config('index_post_list.direction') == "column"
23
23
 
24
24
  +maxWidth1300()
25
25
  margin-bottom .5rem
26
+ #tag &
27
+ margin-top: 2.5rem
26
28
 
27
29
  +maxWidth768()
28
30
  border-radius 12px
@@ -253,6 +255,8 @@ else if hexo-config('index_post_list.direction') == "row"
253
255
  flex-direction row
254
256
  width 100%
255
257
  box-shadow var(--efu-shadow-border)
258
+ #tag &
259
+ margin-top: 2.5rem
256
260
 
257
261
  +maxWidth768()
258
262
  border-radius 12px
@@ -1,6 +1,7 @@
1
1
  if hexo-config('hometop.enable') || hexo-config('says.enable')
2
2
  #home_top
3
3
  max-width 1400px
4
+ width 100%
4
5
  margin 0 auto
5
6
  padding .5rem 1.5rem
6
7
 
@@ -253,9 +253,10 @@
253
253
 
254
254
  +maxWidth768()
255
255
  width calc(50% - 12px)
256
+ height: 120px
256
257
 
257
- +maxWidth600()
258
- width calc(100% - 12px)
258
+ a
259
+ flex-direction: column
259
260
 
260
261
  a
261
262
  display flex
@@ -286,6 +287,19 @@
286
287
  height fit-content
287
288
  padding 0 4px
288
289
 
290
+ +maxWidth768()
291
+ align-items center
292
+ width 100%
293
+
294
+ .flink-item-name
295
+ padding: 0
296
+ width: 100%
297
+ text-align: center
298
+ font-size: 14px
299
+
300
+ .flink-item-desc
301
+ display: none
302
+
289
303
  span
290
304
  transition .3s
291
305
 
package/source/js/main.js CHANGED
@@ -150,23 +150,52 @@ const sco = {
150
150
  });
151
151
  }
152
152
  },
153
- musicToggle() {
154
- const $music = document.querySelector('#nav-music') || null;
155
- const $meting = document.querySelector('meting-js') || null;
156
- const $console = document.getElementById('consoleMusic') || null;
157
- const $rm_text = document.querySelector('#menu-music-toggle span') || null;
158
- const $rm_icon = document.querySelector('#menu-music-toggle i') || null;
153
+ musicToggle(isMeting = true) {
154
+ if (!this.isMusicBind) {
155
+ this.musicBind();
156
+ }
157
+ const $music = document.querySelector('#nav-music');
158
+ const $meting = document.querySelector('meting-js');
159
+ const $console = document.getElementById('consoleMusic');
160
+ const $rmText = document.querySelector('#menu-music-toggle span');
161
+ const $rmIcon = document.querySelector('#menu-music-toggle i');
162
+
159
163
  this.musicPlaying = !this.musicPlaying;
160
164
  $music.classList.toggle("playing", this.musicPlaying);
161
- $console && $console.classList.toggle("on", this.musicPlaying);
165
+ $music.classList.toggle("stretch", this.musicPlaying);
166
+ $console?.classList.toggle("on", this.musicPlaying);
167
+
162
168
  if (this.musicPlaying) {
163
- $meting.aplayer.play();
164
- (typeof rm !== 'undefined') && rm?.menuItems.music[0] && ($rm_text.textContent = GLOBAL_CONFIG.right_menu.music.stop) && ($rm_icon.className = 'solitude fas fa-pause')
169
+ if (typeof rm !== 'undefined' && rm?.menuItems.music[0]) {
170
+ $rmText.textContent = GLOBAL_CONFIG.right_menu.music.stop;
171
+ $rmIcon.className = 'solitude fas fa-pause';
172
+ }
165
173
  } else {
166
- $meting.aplayer.pause();
167
- (typeof rm !== 'undefined') && rm?.menuItems.music[0] && ($rm_text.textContent = GLOBAL_CONFIG.right_menu.music.start) && ($rm_icon.className = 'solitude fas fa-play')
174
+ if (typeof rm !== 'undefined' && rm?.menuItems.music[0]) {
175
+ $rmText.textContent = GLOBAL_CONFIG.right_menu.music.start;
176
+ $rmIcon.className = 'solitude fas fa-play';
177
+ }
178
+ }
179
+
180
+ if(isMeting){
181
+ this.musicPlaying ? $meting.aplayer.play() : $meting.aplayer.pause();
168
182
  }
169
183
  },
184
+ musicBind() {
185
+ const $music = document.querySelector('#nav-music');
186
+ const $name = document.querySelector('#nav-music .aplayer-music');
187
+ const $button = document.querySelector('#nav-music .aplayer-button');
188
+
189
+ $name?.addEventListener('click', () => {
190
+ $music.classList.toggle("stretch");
191
+ });
192
+
193
+ $button?.addEventListener('click', () => {
194
+ this.musicToggle(false);
195
+ });
196
+
197
+ this.isMusicBind = true;
198
+ },
170
199
  switchCommentBarrage() {
171
200
  let commentBarrageElement = document.querySelector(".comment-barrage");
172
201
  let consoleCommentBarrage = document.querySelector("#consoleCommentBarrage");
@@ -189,7 +218,7 @@ const sco = {
189
218
  this.sco_keyboards = !this.sco_keyboards;
190
219
  const consoleKeyboard = document.querySelector("#consoleKeyboard");
191
220
  const keyboardFunction = this.sco_keyboards ? openKeyboard : closeKeyboard;
192
- consoleKeyboard.classList.toggle("on", this.sco_keyboards);
221
+ consoleKeyboard?.classList.toggle("on", this.sco_keyboards);
193
222
  keyboardFunction();
194
223
  localStorage.setItem("keyboard", this.sco_keyboards);
195
224
  document.getElementById('keyboard-tips')?.classList.remove('show');
@@ -163,8 +163,8 @@ window.oncontextmenu = (ele) => {
163
163
  } else {
164
164
  rm.menuItems.paste.style.display = "none";
165
165
  }
166
-
167
- if (tagName === "meting-js") {
166
+ let cls = ele.target.className.toLowerCase();
167
+ if (cls.match(/aplayer/)) {
168
168
  display = true;
169
169
  rm.menuItems.music.forEach((item) => (item.style.display = "flex"));
170
170
  } else {