hexo-theme-stellar 1.29.0 → 1.30.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 +29 -9
- package/_data/chat_users.yml +0 -0
- package/_data/widgets.yml +7 -0
- package/languages/zh-TW.yml +2 -2
- package/layout/_partial/head.ejs +2 -1
- package/layout/_partial/main/navbar/nav_tabs_blog.ejs +10 -10
- package/layout/_partial/scripts/defines.ejs +3 -0
- package/layout/_partial/scripts/services.ejs +91 -0
- package/layout/_partial/scripts/theme.ejs +5 -0
- package/layout/_partial/scripts/utils.ejs +67 -7
- package/layout/_partial/scripts.ejs +1 -1
- package/layout/_plugins/mermaid.ejs +1 -1
- package/layout/_plugins/scrollreveal.ejs +1 -0
- package/layout/_plugins/search/algolia_search.ejs +11 -12
- package/layout/layout.ejs +1 -1
- package/package.json +1 -1
- package/scripts/events/lib/config.js +3 -0
- package/scripts/events/lib/doc_tree.js +1 -6
- package/scripts/filters/index.js +26 -0
- package/scripts/generators/notebooks.js +1 -1
- package/scripts/generators/search.js +21 -2
- package/scripts/helpers/dynamic_color.js +138 -0
- package/scripts/tags/index.js +1 -0
- package/scripts/tags/lib/box.js +1 -1
- package/scripts/tags/lib/chat.js +515 -0
- package/scripts/tags/lib/folders.js +1 -1
- package/scripts/tags/lib/folding.js +2 -2
- package/scripts/tags/lib/sites.js +1 -1
- package/scripts/tags/lib/video.js +7 -2
- package/source/css/_components/tag-plugins/chat.styl +621 -0
- package/source/css/_components/tag-plugins/friends.styl +10 -0
- package/source/css/_components/tag-plugins/sites.styl +12 -0
- package/source/css/_components/tag-plugins/tabs.styl +5 -2
- package/source/css/_custom.styl +1 -0
- package/source/css/_defines/func.styl +7 -6
- package/source/css/_defines/theme.styl +38 -0
- package/source/css/_plugins/katex.styl +0 -1
- package/source/js/plugins/download-file.js +198 -0
- package/source/js/plugins/video.js +65 -0
- package/source/js/plugins/voice.js +438 -0
- package/source/js/search/algolia-search.js +63 -61
- package/source/js/services/artalk_latest_comment.js +33 -0
- package/source/js/services/friends.js +4 -0
- package/source/js/services/giscus_latest_comment.js +36 -0
- package/source/js/services/memos.js +91 -69
- package/source/js/services/sites.js +4 -0
- package/source/js/services/twikoo_latest_comment.js +47 -0
- package/source/js/services/waline_latest_comment.js +32 -0
|
@@ -39,7 +39,7 @@ module.exports = ctx => function(args, content) {
|
|
|
39
39
|
nodes.forEach((node, i) => {
|
|
40
40
|
el += '<details class="folder" index="' + (i) + '">'
|
|
41
41
|
// summary
|
|
42
|
-
el += '<summary
|
|
42
|
+
el += '<summary>' + ctx.render.renderSync({text: (node.header || ''), engine: 'markdown'}) + '</summary>'
|
|
43
43
|
// content
|
|
44
44
|
el += '<div class="body">'
|
|
45
45
|
el += ctx.render.renderSync({text: (node.body || ''), engine: 'markdown'}).split('\n').join('')
|
|
@@ -20,10 +20,10 @@ module.exports = ctx => function(args, content) {
|
|
|
20
20
|
}
|
|
21
21
|
el += '>'
|
|
22
22
|
// summary
|
|
23
|
-
el += '<summary
|
|
23
|
+
el += '<summary>' + ctx.render.renderSync({text: (args.title || ''), engine: 'markdown'}) + '</summary>'
|
|
24
24
|
// content
|
|
25
25
|
el += '<div class="body">'
|
|
26
|
-
el += ctx.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')
|
|
26
|
+
el += ctx.render.renderSync({text: content, engine: 'markdown'}).split('\n').join(' ')
|
|
27
27
|
el += '</div></details>'
|
|
28
28
|
|
|
29
29
|
return el
|
|
@@ -30,7 +30,7 @@ module.exports = ctx => function(args) {
|
|
|
30
30
|
if (item?.url && item?.title) {
|
|
31
31
|
el += `<div class="grid-cell site-card">`
|
|
32
32
|
el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
|
|
33
|
-
el += `<img src="${item.cover || item.screenshot || ('https://
|
|
33
|
+
el += `<img src="${item.cover || item.screenshot || ('https://image.thum.io/get/width/1280/crop/720/' + item.url)}" onerror="javascript:this.removeAttribute("data-src");this.src="${ctx.theme.config.default.cover}";"/>`
|
|
34
34
|
el += `<div class="info">`
|
|
35
35
|
el += `<img src="${item.icon || item.avatar || ctx.theme.config.default.link}" onerror="javascript:this.removeAttribute("data-src");this.src="${item.icon || item.avatar || ctx.theme.config.default.link}";"/>`
|
|
36
36
|
el += `<span class="title">${item.title}</span>`
|
|
@@ -21,8 +21,13 @@ module.exports = ctx => function (args) {
|
|
|
21
21
|
`
|
|
22
22
|
}
|
|
23
23
|
if (args.youtube) {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
if(args.autoplay == 'true' || args.autoplay == '1') {
|
|
25
|
+
args.autoplay = '1&mute=1'
|
|
26
|
+
} else {
|
|
27
|
+
args.autoplay = '0'
|
|
28
|
+
}
|
|
29
|
+
return `<div class="tag-plugin video" style="aspect-ratio:${args.ratio || 16 / 9};max-width:${args.width};">
|
|
30
|
+
<iframe style="border:none" src="https://www.youtube.com/embed/${args.youtube}?rel=0&disablekb=1&playsinline=1&autoplay=${args.autoplay}" picture-in-picture="true" allowfullscreen="true" >
|
|
26
31
|
</iframe>
|
|
27
32
|
</div>
|
|
28
33
|
`
|
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
.md-text .tag-plugin.chat
|
|
2
|
+
.fs12
|
|
3
|
+
font-size: $fs-12
|
|
4
|
+
.cap
|
|
5
|
+
color: var(--text-p3)
|
|
6
|
+
*
|
|
7
|
+
word-break: break-all
|
|
8
|
+
box-sizing: border-box
|
|
9
|
+
-webkit-box-sizing: border-box
|
|
10
|
+
-moz-box-sizing: border-box
|
|
11
|
+
width: $device-mobile-375
|
|
12
|
+
margin: 1rem auto
|
|
13
|
+
border-radius: 8px
|
|
14
|
+
background: var(--chat-block)
|
|
15
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px
|
|
16
|
+
display: flex
|
|
17
|
+
flex-direction: column
|
|
18
|
+
height: 658px
|
|
19
|
+
width: 329px
|
|
20
|
+
overflow: hidden
|
|
21
|
+
&.iphone11
|
|
22
|
+
width: 329px
|
|
23
|
+
height: 658px
|
|
24
|
+
border-radius: 3em
|
|
25
|
+
padding: 1em
|
|
26
|
+
position: relative
|
|
27
|
+
box-shadow: unset
|
|
28
|
+
>.device-image
|
|
29
|
+
background-image: url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/frame/iphone11.svg)
|
|
30
|
+
width: 100%
|
|
31
|
+
height: 100%
|
|
32
|
+
position: absolute
|
|
33
|
+
top: 0
|
|
34
|
+
left: 0
|
|
35
|
+
z-index: 2
|
|
36
|
+
>.status-bar
|
|
37
|
+
display: flex
|
|
38
|
+
margin: .5em .7em
|
|
39
|
+
justify-content: space-between
|
|
40
|
+
>.left-items
|
|
41
|
+
font-size: $fs-12
|
|
42
|
+
width: 5em
|
|
43
|
+
display: flex
|
|
44
|
+
justify-content: center
|
|
45
|
+
>.right-items
|
|
46
|
+
display: flex
|
|
47
|
+
flex-direction: row
|
|
48
|
+
align-items: center
|
|
49
|
+
>svg.icon
|
|
50
|
+
width: 1.3em
|
|
51
|
+
height: 1.3em
|
|
52
|
+
&.earphone,
|
|
53
|
+
&.bluetooth
|
|
54
|
+
display: none
|
|
55
|
+
>path
|
|
56
|
+
fill: var(--text-p1)
|
|
57
|
+
>.chat-navbar,
|
|
58
|
+
>.content
|
|
59
|
+
margin: 0 .4em
|
|
60
|
+
>.bottom
|
|
61
|
+
margin: 0 .4em
|
|
62
|
+
padding-bottom: .75em
|
|
63
|
+
>.chat-navbar
|
|
64
|
+
display: flex
|
|
65
|
+
padding: .3rem 0
|
|
66
|
+
justify-content: space-between
|
|
67
|
+
z-index: 4
|
|
68
|
+
.left-items
|
|
69
|
+
display: flex
|
|
70
|
+
align-items: center
|
|
71
|
+
.back-btn
|
|
72
|
+
margin-left: .2em
|
|
73
|
+
.icon.back
|
|
74
|
+
width: 1.3em
|
|
75
|
+
height: 1.3em
|
|
76
|
+
.news-num
|
|
77
|
+
background: var(--chat-bg)
|
|
78
|
+
border-radius: 8px
|
|
79
|
+
font-size: .75em
|
|
80
|
+
padding: 0px 4px
|
|
81
|
+
margin-right: 8px
|
|
82
|
+
color: var(--text-p2)
|
|
83
|
+
.right-items>.more-btn
|
|
84
|
+
height: 100%
|
|
85
|
+
margin-right: .5em
|
|
86
|
+
.left-items>.back-btn,
|
|
87
|
+
.right-items>.more-btn
|
|
88
|
+
display: flex
|
|
89
|
+
align-items: center
|
|
90
|
+
>svg>path
|
|
91
|
+
fill: var(--text-p1)
|
|
92
|
+
>.content
|
|
93
|
+
scrollbar-codeblock()
|
|
94
|
+
background: var(--chat-bg)
|
|
95
|
+
overflow: auto
|
|
96
|
+
position: relative
|
|
97
|
+
flex: 1
|
|
98
|
+
z-index: 3
|
|
99
|
+
>.bottom
|
|
100
|
+
z-index: 1
|
|
101
|
+
padding-bottom: .5em
|
|
102
|
+
background: var(--chat-bg)
|
|
103
|
+
box-shadow: rgba(0, 0, 0, 0.06) 0px 1px 1px 0px inset
|
|
104
|
+
.input
|
|
105
|
+
display: flex
|
|
106
|
+
align-items: center
|
|
107
|
+
justify-content: space-between
|
|
108
|
+
margin: 0 .5em
|
|
109
|
+
margin-top: .5em
|
|
110
|
+
height: 32px
|
|
111
|
+
.input-text
|
|
112
|
+
background: var(--chat-block)
|
|
113
|
+
border-radius: 6px
|
|
114
|
+
width: calc(100% - 40px - .5em)
|
|
115
|
+
height: 100%
|
|
116
|
+
.submit-btn
|
|
117
|
+
padding: 3px 6px
|
|
118
|
+
background: var(--theme-color-opa)
|
|
119
|
+
border-radius: 6px
|
|
120
|
+
font-size: $fs-14
|
|
121
|
+
color: var(--theme-color)
|
|
122
|
+
.icons
|
|
123
|
+
margin: 0 .5em
|
|
124
|
+
display: flex
|
|
125
|
+
justify-content: space-between
|
|
126
|
+
margin-top: .5em
|
|
127
|
+
>svg.icon
|
|
128
|
+
width: 1.5em
|
|
129
|
+
height: 1.5em
|
|
130
|
+
&.voice
|
|
131
|
+
width: 1.3em !important
|
|
132
|
+
height: 1.3em !important
|
|
133
|
+
path
|
|
134
|
+
fill: var(--text-p2)
|
|
135
|
+
>.content
|
|
136
|
+
>div:first-child
|
|
137
|
+
margin-top: .5em
|
|
138
|
+
>div:last-child
|
|
139
|
+
margin-bottom: .5em
|
|
140
|
+
.chattip
|
|
141
|
+
font-size: $fs-12
|
|
142
|
+
color: var(--text-p3)
|
|
143
|
+
margin: auto
|
|
144
|
+
width: fit-content
|
|
145
|
+
padding: .5em
|
|
146
|
+
.chatcell
|
|
147
|
+
padding: .5em
|
|
148
|
+
img
|
|
149
|
+
border-radius: 6px
|
|
150
|
+
.user-avatar
|
|
151
|
+
float: left
|
|
152
|
+
img
|
|
153
|
+
width: 32px
|
|
154
|
+
height: 32px
|
|
155
|
+
border-radius: 50%
|
|
156
|
+
.user-main
|
|
157
|
+
padding: 0 .5em
|
|
158
|
+
display: flex
|
|
159
|
+
flex-flow: column
|
|
160
|
+
.header
|
|
161
|
+
line-height: 1.5
|
|
162
|
+
font-size: 13px
|
|
163
|
+
margin-bottom: .3em
|
|
164
|
+
overflow: hidden
|
|
165
|
+
position: relative
|
|
166
|
+
display: flex
|
|
167
|
+
flex-wrap: wrap
|
|
168
|
+
align-items: center
|
|
169
|
+
.label
|
|
170
|
+
padding: 0 4px
|
|
171
|
+
color: var(--theme-color)
|
|
172
|
+
background: var(--theme-color-opa)
|
|
173
|
+
border-radius: 3px
|
|
174
|
+
margin-right: 4px
|
|
175
|
+
font-size: 'calc(%s - .1rem)' % $fs-12
|
|
176
|
+
font-weight: 600
|
|
177
|
+
.name
|
|
178
|
+
color: var(--text-p3)
|
|
179
|
+
font-size: $fs-12
|
|
180
|
+
.talk
|
|
181
|
+
width: fit-content
|
|
182
|
+
max-width: calc(100% - 32px)
|
|
183
|
+
background: var(--chat-block)
|
|
184
|
+
padding: 'calc((32px - 1.3 * %s) / 2) .5em' % $fs-14 // .2em .5em
|
|
185
|
+
border-radius: 6px
|
|
186
|
+
p
|
|
187
|
+
font-size: $fs-14
|
|
188
|
+
line-height: 1.3
|
|
189
|
+
margin: 0
|
|
190
|
+
>.error-img-to-show
|
|
191
|
+
min-width: 100px
|
|
192
|
+
min-height: 100px
|
|
193
|
+
>.quote
|
|
194
|
+
color: var(--text-p3)
|
|
195
|
+
background: var(--text-p3-opa)
|
|
196
|
+
padding: .3rem
|
|
197
|
+
border-radius: 6px
|
|
198
|
+
cursor: pointer
|
|
199
|
+
margin-bottom: .3em
|
|
200
|
+
trans2 color background .5s
|
|
201
|
+
&:hover
|
|
202
|
+
color: var(--theme-color)
|
|
203
|
+
background: var(--theme-color-opa)
|
|
204
|
+
.quote-user>svg>path
|
|
205
|
+
fill: var(--theme-color)
|
|
206
|
+
.quote-user
|
|
207
|
+
display: flex
|
|
208
|
+
justify-content: space-between
|
|
209
|
+
align-items: center
|
|
210
|
+
column-gap: 1em
|
|
211
|
+
>span
|
|
212
|
+
font-size: $fs-12
|
|
213
|
+
height: 16px
|
|
214
|
+
line-height: 16px
|
|
215
|
+
>svg
|
|
216
|
+
width: .75em
|
|
217
|
+
height: .75em
|
|
218
|
+
path
|
|
219
|
+
fill: var(--text-p3)
|
|
220
|
+
trans2 color .5s
|
|
221
|
+
.quote-content
|
|
222
|
+
margin-top: .3em
|
|
223
|
+
font-size: $fs-12
|
|
224
|
+
line-height: 1
|
|
225
|
+
span
|
|
226
|
+
display: inline-block
|
|
227
|
+
white-space: nowrap
|
|
228
|
+
width: 100%
|
|
229
|
+
overflow: hidden
|
|
230
|
+
text-overflow:ellipsis
|
|
231
|
+
p,span
|
|
232
|
+
font-size: $fs-12
|
|
233
|
+
&.md
|
|
234
|
+
.tag-plugin
|
|
235
|
+
margin-bottom: 0
|
|
236
|
+
margin: .2rem 0
|
|
237
|
+
&.image,
|
|
238
|
+
&.emoji,
|
|
239
|
+
&.link,
|
|
240
|
+
&.video,
|
|
241
|
+
&.file
|
|
242
|
+
background: unset !important
|
|
243
|
+
padding: 0 !important
|
|
244
|
+
&.link
|
|
245
|
+
.link-card
|
|
246
|
+
background: var(--chat-block)
|
|
247
|
+
box-shadow: unset
|
|
248
|
+
transition: unset
|
|
249
|
+
-webkit-transition: unset
|
|
250
|
+
-moz-transition: unset
|
|
251
|
+
-o-transition: unset
|
|
252
|
+
border-radius: 6px
|
|
253
|
+
&:hover
|
|
254
|
+
transform: none
|
|
255
|
+
color: var(--text-p3)
|
|
256
|
+
.top
|
|
257
|
+
margin: .5em
|
|
258
|
+
max-width: unset
|
|
259
|
+
span
|
|
260
|
+
white-space: unset
|
|
261
|
+
font-size: $fs-14
|
|
262
|
+
.center
|
|
263
|
+
margin: 0 .5em
|
|
264
|
+
column-gap: .5em
|
|
265
|
+
display: flex
|
|
266
|
+
align-self: unset
|
|
267
|
+
.left
|
|
268
|
+
width: calc(100% - 32px - .5em)
|
|
269
|
+
height: 32px
|
|
270
|
+
.desc
|
|
271
|
+
-webkit-line-clamp: 2
|
|
272
|
+
.right
|
|
273
|
+
flex: 1
|
|
274
|
+
.bottom
|
|
275
|
+
margin: .5em .5em .3em .5em
|
|
276
|
+
padding-top: .3em
|
|
277
|
+
border-top: 1px solid var(--chat-border)
|
|
278
|
+
display: flex
|
|
279
|
+
align-items: center
|
|
280
|
+
>svg,
|
|
281
|
+
>span
|
|
282
|
+
height: $fs-12 + .05rem
|
|
283
|
+
|
|
284
|
+
&.voice
|
|
285
|
+
display: flex
|
|
286
|
+
align-items: center
|
|
287
|
+
justify-content: left
|
|
288
|
+
padding: 4.5px .5em //4.5px = (32px - 23px) / 2 .3em .5em
|
|
289
|
+
cursor: pointer
|
|
290
|
+
.voice-btns
|
|
291
|
+
flex-shrink: 0
|
|
292
|
+
svg.icon
|
|
293
|
+
width: 1.3em
|
|
294
|
+
height: 1.3em
|
|
295
|
+
>path
|
|
296
|
+
fill: var(--text-p1)
|
|
297
|
+
canvas.voice-wave
|
|
298
|
+
// 使用 canvas 动画来做的 voice-wave
|
|
299
|
+
margin: 0 .5em
|
|
300
|
+
height: 23px
|
|
301
|
+
width: 36px
|
|
302
|
+
div.voice-wave
|
|
303
|
+
// 使用 css 动画来做的 voice-wave
|
|
304
|
+
height: 1.2em
|
|
305
|
+
margin: 0 .5em
|
|
306
|
+
display: flex
|
|
307
|
+
justify-content: center
|
|
308
|
+
align-items: center
|
|
309
|
+
position: relative
|
|
310
|
+
// overflow: hidden
|
|
311
|
+
.play-line
|
|
312
|
+
position: absolute
|
|
313
|
+
top: -20%
|
|
314
|
+
left: 0
|
|
315
|
+
height: 140%
|
|
316
|
+
width: 1px
|
|
317
|
+
background: var(--text-p2)
|
|
318
|
+
content: ""
|
|
319
|
+
opacity: 0
|
|
320
|
+
&.active
|
|
321
|
+
opacity: 1
|
|
322
|
+
&.back
|
|
323
|
+
transition: transform 0.3s linear !important
|
|
324
|
+
-moz-transition: transform 0.3s linear !important
|
|
325
|
+
-webkit-transition: transform 0.3s linear !important
|
|
326
|
+
-o-transition: transform 0.3s linear !important
|
|
327
|
+
span.voice-wave-item
|
|
328
|
+
background: var(--text-p2)
|
|
329
|
+
width: 2px
|
|
330
|
+
border-radius: 2px
|
|
331
|
+
flex-shrink: 0
|
|
332
|
+
.voice-metas
|
|
333
|
+
font-size: $fs-14
|
|
334
|
+
display: flex
|
|
335
|
+
flex-shrink: 0
|
|
336
|
+
span
|
|
337
|
+
line-height: 1
|
|
338
|
+
&.video
|
|
339
|
+
position: relative
|
|
340
|
+
line-height: 0
|
|
341
|
+
.video-btns
|
|
342
|
+
position: absolute
|
|
343
|
+
top: 0
|
|
344
|
+
left: 0
|
|
345
|
+
width: 100%
|
|
346
|
+
height: 100%
|
|
347
|
+
.play-btn,
|
|
348
|
+
.pause-btn
|
|
349
|
+
align-items: center
|
|
350
|
+
justify-content: center
|
|
351
|
+
width: 100%
|
|
352
|
+
height: 100%
|
|
353
|
+
svg.icon
|
|
354
|
+
width: 3em
|
|
355
|
+
height: 3em
|
|
356
|
+
>path
|
|
357
|
+
fill: var(--chat-video-button)
|
|
358
|
+
video
|
|
359
|
+
width: 100%
|
|
360
|
+
border-radius: 6px
|
|
361
|
+
&.file
|
|
362
|
+
background: transparent !important
|
|
363
|
+
display: flex
|
|
364
|
+
padding: unset !important
|
|
365
|
+
column-gap: .3rem
|
|
366
|
+
width: calc(100% - 32px)
|
|
367
|
+
cursor: pointer
|
|
368
|
+
>.content
|
|
369
|
+
background: var(--chat-block)
|
|
370
|
+
padding: .5em
|
|
371
|
+
border-radius: 6px
|
|
372
|
+
flex-grow: 1
|
|
373
|
+
>.top
|
|
374
|
+
display: flex
|
|
375
|
+
align-items: center
|
|
376
|
+
column-gap: .5rem
|
|
377
|
+
>.left
|
|
378
|
+
height: 2.5rem
|
|
379
|
+
flex-grow: 1
|
|
380
|
+
>span
|
|
381
|
+
white-space: unset
|
|
382
|
+
font-size: $fs-14
|
|
383
|
+
font-weight: 500
|
|
384
|
+
color: var(--text-p1)
|
|
385
|
+
overflow: hidden
|
|
386
|
+
text-overflow: ellipsis
|
|
387
|
+
max-width: 100%
|
|
388
|
+
display: -webkit-box
|
|
389
|
+
-webkit-box-orient: vertical
|
|
390
|
+
-webkit-line-clamp: 2
|
|
391
|
+
line-height: calc(2.5rem / 2)
|
|
392
|
+
>.right
|
|
393
|
+
height: fit-content
|
|
394
|
+
>svg.icon
|
|
395
|
+
height: 2.5rem
|
|
396
|
+
width: unset
|
|
397
|
+
>.bottom
|
|
398
|
+
margin-top: .5em
|
|
399
|
+
display: flex
|
|
400
|
+
>span
|
|
401
|
+
line-height: $fs-12
|
|
402
|
+
>.download-btn
|
|
403
|
+
display: flex
|
|
404
|
+
align-items: flex-end
|
|
405
|
+
>svg.icon
|
|
406
|
+
height: 1rem
|
|
407
|
+
width: 1rem
|
|
408
|
+
padding: .2em
|
|
409
|
+
border-radius: 50%
|
|
410
|
+
background: var(--chat-block)
|
|
411
|
+
>path
|
|
412
|
+
fill: var(--text-p1)
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
&.right
|
|
416
|
+
.user-avatar
|
|
417
|
+
float: right
|
|
418
|
+
.user-main
|
|
419
|
+
flex-flow: row-reverse
|
|
420
|
+
flex-wrap: wrap
|
|
421
|
+
.header
|
|
422
|
+
flex-basis: 100%
|
|
423
|
+
justify-content: flex-end
|
|
424
|
+
.talk
|
|
425
|
+
&.file
|
|
426
|
+
flex-direction: row-reverse
|
|
427
|
+
&.voice
|
|
428
|
+
.voice-btns
|
|
429
|
+
svg.icon>path
|
|
430
|
+
fill: var(--chat-qq-right-text)
|
|
431
|
+
&.md,
|
|
432
|
+
&.voice
|
|
433
|
+
background: var(--chat-qq-right-bg)
|
|
434
|
+
color: var(--chat-qq-right-text)
|
|
435
|
+
&.quote-blink
|
|
436
|
+
animation: chatQuoteblinking 1s
|
|
437
|
+
&.person
|
|
438
|
+
>.content
|
|
439
|
+
>.chatcell
|
|
440
|
+
>.user-main
|
|
441
|
+
min-height: 32px
|
|
442
|
+
justify-content: center
|
|
443
|
+
align-content: unset
|
|
444
|
+
>.header
|
|
445
|
+
display: none
|
|
446
|
+
&.right>.user-main
|
|
447
|
+
justify-content: unset
|
|
448
|
+
align-content: center
|
|
449
|
+
&.wechat
|
|
450
|
+
&.iphone11
|
|
451
|
+
background: var(--chat-bg)
|
|
452
|
+
>.bottom
|
|
453
|
+
padding-bottom: .75rem
|
|
454
|
+
>.chat-navbar
|
|
455
|
+
background: var(--chat-bg)
|
|
456
|
+
box-shadow: rgba(27, 31, 35, 0.02) 0px 1px 0px
|
|
457
|
+
>.left-items
|
|
458
|
+
>.news-num
|
|
459
|
+
background: var(--chat-wechat-news-num)
|
|
460
|
+
>.content
|
|
461
|
+
>.chatcell
|
|
462
|
+
img
|
|
463
|
+
border-radius: 4px
|
|
464
|
+
>.user-avatar>img
|
|
465
|
+
border-radius: 4px
|
|
466
|
+
>.user-main
|
|
467
|
+
>.header
|
|
468
|
+
line-height: 1
|
|
469
|
+
margin-bottom: .2em
|
|
470
|
+
>.label
|
|
471
|
+
display: none
|
|
472
|
+
>.talk
|
|
473
|
+
position: relative
|
|
474
|
+
border-radius: 4px
|
|
475
|
+
&:before
|
|
476
|
+
content: ""
|
|
477
|
+
position: absolute
|
|
478
|
+
left: -2.5px
|
|
479
|
+
top: 11px
|
|
480
|
+
width: 10px
|
|
481
|
+
height: 10px
|
|
482
|
+
border-radius: 1.5px
|
|
483
|
+
transform: rotate3d(0, 0, 1, -45deg)
|
|
484
|
+
background: var(--chat-block)
|
|
485
|
+
&.emoji:before,
|
|
486
|
+
&.video:before,
|
|
487
|
+
&.image:before
|
|
488
|
+
display: none
|
|
489
|
+
&.link>.link-card,
|
|
490
|
+
&.video>video,
|
|
491
|
+
&.file>.content,
|
|
492
|
+
&.image>img,
|
|
493
|
+
&.emoji>img
|
|
494
|
+
border-radius: 4px
|
|
495
|
+
&.file .download-btn
|
|
496
|
+
display: none
|
|
497
|
+
&.voice
|
|
498
|
+
padding: 8px .5em
|
|
499
|
+
>.wechat-voice
|
|
500
|
+
width: 16px
|
|
501
|
+
height: 16px
|
|
502
|
+
box-sizing: border-box
|
|
503
|
+
overflow: hidden
|
|
504
|
+
position: relative // 解决safari浏览器无法hidden
|
|
505
|
+
transform: rotate3d(0, 0, 1, 135deg)
|
|
506
|
+
margin-left: .2rem
|
|
507
|
+
margin-right: 0
|
|
508
|
+
>.voice-circle
|
|
509
|
+
border: 2px solid var(--text-p1)
|
|
510
|
+
border-radius: 50%
|
|
511
|
+
position: absolute
|
|
512
|
+
&.first
|
|
513
|
+
width: 5px
|
|
514
|
+
height: 5px
|
|
515
|
+
background: var(--text-p1)
|
|
516
|
+
top: 12px
|
|
517
|
+
left: 12px
|
|
518
|
+
&.second
|
|
519
|
+
width: 13px
|
|
520
|
+
height: 13px
|
|
521
|
+
top: 8px
|
|
522
|
+
left: 8px
|
|
523
|
+
&.third
|
|
524
|
+
width: 21px
|
|
525
|
+
height: 21px
|
|
526
|
+
top: 4px
|
|
527
|
+
left: 4px
|
|
528
|
+
&.play
|
|
529
|
+
>.second
|
|
530
|
+
animation: wehcatVoicefadeInOut 1s infinite 0.2s
|
|
531
|
+
>.third
|
|
532
|
+
animation: wehcatVoicefadeInOut 1s infinite 0.4s
|
|
533
|
+
>.quote
|
|
534
|
+
width: fit-content
|
|
535
|
+
max-width: calc(100% - 32px)
|
|
536
|
+
background: var(--chat-wechat-quote-bg)
|
|
537
|
+
padding: .2em .5em
|
|
538
|
+
border-radius: 4px
|
|
539
|
+
margin-top: .2em
|
|
540
|
+
font-size: $fs-12
|
|
541
|
+
color: var(--chat-wechat-quote-color)
|
|
542
|
+
display: flex
|
|
543
|
+
column-gap: 4px
|
|
544
|
+
&.image-chat
|
|
545
|
+
display: flex
|
|
546
|
+
column-gap: .4em
|
|
547
|
+
padding: .5em
|
|
548
|
+
img
|
|
549
|
+
border-radius: 4px
|
|
550
|
+
display: inline
|
|
551
|
+
width: 64px
|
|
552
|
+
.tag-plugin
|
|
553
|
+
margin-bottom: 0
|
|
554
|
+
margin: .2rem 0
|
|
555
|
+
&.image img
|
|
556
|
+
display: block
|
|
557
|
+
width: unset
|
|
558
|
+
p,span
|
|
559
|
+
font-size: $fs-12
|
|
560
|
+
margin: 0
|
|
561
|
+
padding: 0
|
|
562
|
+
|
|
563
|
+
&.right>.user-main
|
|
564
|
+
>.header
|
|
565
|
+
display: none
|
|
566
|
+
>.talk
|
|
567
|
+
&:before
|
|
568
|
+
right: -2px
|
|
569
|
+
left: unset
|
|
570
|
+
&.md,
|
|
571
|
+
&.md:before,
|
|
572
|
+
&.voice,
|
|
573
|
+
&.voice:before
|
|
574
|
+
background: var(--chat-wechat-right-bg)
|
|
575
|
+
color: var(--text-p1)
|
|
576
|
+
&.voice
|
|
577
|
+
flex-direction: row-reverse
|
|
578
|
+
>.wechat-voice
|
|
579
|
+
transform: rotate3d(0, 0, 1, -45deg)
|
|
580
|
+
margin-left: 0
|
|
581
|
+
margin-right: .2rem
|
|
582
|
+
|
|
583
|
+
>.bottom
|
|
584
|
+
display: flex
|
|
585
|
+
align-items: center
|
|
586
|
+
justify-content: space-between
|
|
587
|
+
padding: .5em
|
|
588
|
+
column-gap: .5em
|
|
589
|
+
.input-text
|
|
590
|
+
border-radius: 4px
|
|
591
|
+
flex-grow: 1
|
|
592
|
+
height: 2rem
|
|
593
|
+
background: var(--chat-block)
|
|
594
|
+
.icon
|
|
595
|
+
height: 1.5rem
|
|
596
|
+
width: 1.5rem
|
|
597
|
+
>path
|
|
598
|
+
fill: var(--text-p2)
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
@keyframes wehcatVoicefadeInOut {
|
|
602
|
+
0% {
|
|
603
|
+
opacity: 0; /*初始状态 透明度为0*/
|
|
604
|
+
}
|
|
605
|
+
100% {
|
|
606
|
+
opacity: 1; /*结尾状态 透明度为1*/
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
@keyframes chatQuoteblinking {
|
|
611
|
+
0% {
|
|
612
|
+
background-color: transparent;
|
|
613
|
+
}
|
|
614
|
+
50% {
|
|
615
|
+
background-color: var(--chat-quote-blink-color);
|
|
616
|
+
}
|
|
617
|
+
100% {
|
|
618
|
+
background-color: transparent;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
-webkit-box-orient: vertical
|
|
24
24
|
overflow: hidden
|
|
25
25
|
-webkit-line-clamp: 2
|
|
26
|
+
position: relative
|
|
26
27
|
img
|
|
27
28
|
object-fit: cover
|
|
28
29
|
display: block
|
|
@@ -32,6 +33,15 @@
|
|
|
32
33
|
border-radius: 64px
|
|
33
34
|
margin: 0 0 0.5rem
|
|
34
35
|
|
|
36
|
+
.label
|
|
37
|
+
margin-top: 4px
|
|
38
|
+
color: white
|
|
39
|
+
font-size: 10px
|
|
40
|
+
padding: 1px 4px
|
|
41
|
+
border-radius: 16px
|
|
42
|
+
font-weight: 60
|
|
43
|
+
border: 1px solid white
|
|
44
|
+
|
|
35
45
|
// transform
|
|
36
46
|
.users-wrap .user-card .card-link
|
|
37
47
|
>img
|