artalk 2.1.3 → 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.
- package/dist/Artalk.css +1 -1
- package/dist/Artalk.es.js +285 -323
- package/dist/Artalk.iife.js +1 -1
- package/dist/Artalk.js +1 -1
- package/package.json +6 -9
- package/src/api/index.ts +2 -3
- package/src/artalk.ts +2 -2
- package/src/components/action-btn.ts +1 -1
- package/src/components/comment.ts +88 -3
- package/src/components/editor-plugs/emoticons-plug.less +21 -11
- package/src/components/editor-plugs/emoticons-plug.ts +18 -18
- package/src/components/editor-plugs/preview-plug.less +1 -1
- package/src/components/editor.ts +15 -20
- package/src/components/html/comment.html +6 -13
- package/src/components/html/editor.html +8 -9
- package/src/components/html/list.html +1 -1
- package/src/components/list-lite.ts +203 -299
- package/src/components/list.ts +11 -9
- package/src/components/pagination.ts +2 -2
- package/src/components/read-more-btn.ts +27 -4
- package/src/components/sidebar-views/comments-view.ts +4 -5
- package/src/defaults.ts +1 -1
- package/src/lib/utils.ts +2 -1
- package/src/style/_color.less +19 -23
- package/src/style/_extend.less +3 -3
- package/src/style/_variables.less +0 -24
- package/src/style/comment.less +191 -197
- package/src/style/editor.less +69 -94
- package/src/style/item-text-editor.less +2 -2
- package/src/style/list.less +13 -13
- package/src/style/main.less +31 -31
- package/src/style/page-list.less +4 -4
- package/src/style/pagination.less +6 -6
- package/src/style/sidebar.less +35 -35
- package/src/style/site-list.less +13 -13
- package/types/artalk-data.d.ts +2 -2
package/src/style/comment.less
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
.atk-comment-wrap {
|
|
2
2
|
overflow: hidden;
|
|
3
3
|
position: relative;
|
|
4
|
-
border-bottom: 1px solid
|
|
4
|
+
border-bottom: 1px solid var(--at-color-border);
|
|
5
5
|
|
|
6
6
|
&.atk-flash-once {
|
|
7
7
|
animation: atkFlashOnce 1s ease-in-out 0s;
|
|
8
8
|
|
|
9
9
|
@keyframes atkFlashOnce {
|
|
10
|
-
from {
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
to {
|
|
14
|
-
background: transparent;
|
|
15
|
-
}
|
|
10
|
+
from { background: rgba(0, 131, 255, 0.2); }
|
|
11
|
+
to { background: transparent; }
|
|
16
12
|
}
|
|
17
13
|
}
|
|
18
14
|
|
|
@@ -23,255 +19,222 @@
|
|
|
23
19
|
top: 10%;
|
|
24
20
|
width: 3px;
|
|
25
21
|
height: 80%;
|
|
26
|
-
background:
|
|
22
|
+
background: var(--at-color-main);
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
&.atk-openable {
|
|
30
26
|
cursor: pointer;
|
|
31
27
|
|
|
32
28
|
&:hover {
|
|
33
|
-
background:
|
|
29
|
+
background: var(--at-color-bg-grey);
|
|
34
30
|
}
|
|
35
31
|
|
|
36
|
-
.atk-
|
|
32
|
+
.atk-height-limit:after {
|
|
37
33
|
background: transparent !important;
|
|
38
34
|
}
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
&:last-child {
|
|
42
|
-
border-bottom
|
|
38
|
+
border-bottom: none;
|
|
43
39
|
}
|
|
40
|
+
}
|
|
44
41
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
.atk-comment {
|
|
43
|
+
display: block;
|
|
44
|
+
padding: 12px 10px;
|
|
48
45
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
& > .atk-avatar {
|
|
47
|
+
display: block;
|
|
48
|
+
padding: 2px 0;
|
|
49
|
+
float: left;
|
|
53
50
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
51
|
+
img {
|
|
52
|
+
width: 48px;
|
|
53
|
+
height: 48px;
|
|
54
|
+
border-radius: 3px;
|
|
59
55
|
}
|
|
56
|
+
}
|
|
60
57
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
58
|
+
& > .atk-main {
|
|
59
|
+
display: block;
|
|
60
|
+
margin-left: 62px;
|
|
61
|
+
|
|
62
|
+
& > .atk-header {
|
|
63
|
+
line-height: 1;
|
|
64
|
+
font-size: 13px;
|
|
65
|
+
margin-bottom: 3px;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
position: relative;
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-wrap: wrap;
|
|
70
|
+
align-items: center;
|
|
71
|
+
|
|
72
|
+
.atk-item {
|
|
71
73
|
display: flex;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
margin-bottom: 2px;
|
|
75
|
+
color: var(--at-color-meta);
|
|
74
76
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
background: @color-bg-grey;
|
|
78
|
-
padding: 0 6px;
|
|
79
|
-
line-height: 18px;
|
|
80
|
-
border-radius: 3px;
|
|
81
|
-
|
|
82
|
-
&:not(:last-child) {
|
|
83
|
-
margin-right: 6px;
|
|
84
|
-
}
|
|
77
|
+
&:not(:last-child) {
|
|
78
|
+
margin-right: 6px;
|
|
85
79
|
}
|
|
86
80
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
&.atk-nick, &.atk-nick a {
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
color: var(--at-color-main);
|
|
84
|
+
text-decoration: none;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
91
87
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
.badge() {
|
|
89
|
+
color: var(--at-color-meta);
|
|
90
|
+
background: var(--at-color-bg-grey);
|
|
91
|
+
padding: 0 6px;
|
|
92
|
+
line-height: 18px;
|
|
93
|
+
border-radius: 3px;
|
|
95
94
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
color: @color-main;
|
|
99
|
-
text-decoration: none;
|
|
100
|
-
}
|
|
95
|
+
&:not(:last-child) {
|
|
96
|
+
margin-right: 6px;
|
|
101
97
|
}
|
|
98
|
+
}
|
|
102
99
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
100
|
+
.atk-badge {
|
|
101
|
+
.badge();
|
|
102
|
+
color: #fff;
|
|
103
|
+
}
|
|
108
104
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
105
|
+
.atk-ua {
|
|
106
|
+
.badge()
|
|
107
|
+
}
|
|
113
108
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
.atk-ua-wrap {
|
|
110
|
+
@media only screen and (max-width: 768px) {
|
|
111
|
+
display: block;
|
|
117
112
|
}
|
|
118
113
|
}
|
|
114
|
+
}
|
|
119
115
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
img {
|
|
126
|
-
max-width: 100%;
|
|
127
|
-
}
|
|
116
|
+
& > .atk-body {
|
|
117
|
+
display: block;
|
|
118
|
+
overflow: hidden;
|
|
119
|
+
position: relative;
|
|
128
120
|
|
|
129
|
-
|
|
130
|
-
|
|
121
|
+
img {
|
|
122
|
+
max-width: 100%;
|
|
123
|
+
}
|
|
131
124
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
border-bottom: 0;
|
|
135
|
-
padding: 5px 10px;
|
|
136
|
-
border-radius: @block-radius @block-radius 0 0;
|
|
137
|
-
margin-bottom: -5px;
|
|
138
|
-
}
|
|
125
|
+
& > .atk-content {
|
|
126
|
+
word-break: break-all;
|
|
139
127
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
128
|
+
&.atk-type-collapsed {
|
|
129
|
+
border: 3px solid var(--at-color-bg-grey);
|
|
130
|
+
border-bottom: 0;
|
|
131
|
+
padding: 5px 10px;
|
|
132
|
+
border-radius: @block-radius @block-radius 0 0;
|
|
133
|
+
margin-bottom: -5px;
|
|
134
|
+
}
|
|
143
135
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
136
|
+
& > *:first-child {
|
|
137
|
+
margin-top: 0;
|
|
138
|
+
}
|
|
147
139
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
140
|
+
& > *:last-child {
|
|
141
|
+
margin-bottom: 0;
|
|
151
142
|
}
|
|
152
143
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
margin: 3px 0;
|
|
156
|
-
font-size: 13px;
|
|
157
|
-
padding: 10px 18px;
|
|
158
|
-
display: block;
|
|
159
|
-
background: @color-bg-grey;
|
|
160
|
-
border-left: 4px solid #f44336;
|
|
144
|
+
.atk-height-limit-btn {
|
|
145
|
+
bottom: 5px;
|
|
161
146
|
}
|
|
147
|
+
}
|
|
162
148
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
149
|
+
& > .atk-pending {
|
|
150
|
+
color: var(--at-color-meta);
|
|
151
|
+
margin: 3px 0;
|
|
152
|
+
font-size: 13px;
|
|
153
|
+
padding: 10px 18px;
|
|
154
|
+
display: block;
|
|
155
|
+
background: var(--at-color-bg-grey);
|
|
156
|
+
border-left: 4px solid #f44336;
|
|
157
|
+
}
|
|
168
158
|
|
|
169
|
-
|
|
170
|
-
|
|
159
|
+
& > .atk-reply-to {
|
|
160
|
+
padding: 5px 15px;
|
|
161
|
+
border-left: 3px solid #eee;
|
|
162
|
+
margin-bottom: 10px;
|
|
163
|
+
position: relative;
|
|
171
164
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
}
|
|
165
|
+
.atk-meta {
|
|
166
|
+
font-size: 15px;
|
|
176
167
|
|
|
177
|
-
|
|
178
|
-
|
|
168
|
+
.atk-nick {
|
|
169
|
+
color: var(--at-color-main)
|
|
179
170
|
}
|
|
180
171
|
}
|
|
181
172
|
|
|
182
|
-
|
|
183
|
-
margin:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
display: block;
|
|
187
|
-
background: @color-bg-grey;
|
|
188
|
-
border-radius: @block-radius;
|
|
173
|
+
.atk-content {
|
|
174
|
+
margin-top: 5px;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
189
177
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
178
|
+
& > .atk-collapsed {
|
|
179
|
+
margin: 3px 0;
|
|
180
|
+
font-size: 13px;
|
|
181
|
+
padding: 10px 18px;
|
|
182
|
+
display: block;
|
|
183
|
+
background: var(--at-color-bg-grey);
|
|
184
|
+
border-radius: @block-radius;
|
|
193
185
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
cursor: pointer;
|
|
197
|
-
user-select: none;
|
|
198
|
-
margin-left: 3px;
|
|
199
|
-
&:hover {
|
|
200
|
-
color: @color-main;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
186
|
+
.atk-text {
|
|
187
|
+
color: var(--at-color-meta);
|
|
203
188
|
}
|
|
204
|
-
}
|
|
205
189
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
& > span {
|
|
215
|
-
&, * {
|
|
216
|
-
color: @color-meta;
|
|
217
|
-
font-size: 13px;
|
|
218
|
-
line-height: 15px;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
display: inline-flex;
|
|
222
|
-
cursor: pointer;
|
|
223
|
-
user-select: none;
|
|
224
|
-
|
|
225
|
-
&.atk-error, &.atk-error:hover {
|
|
226
|
-
color: @color-red;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
&:not(:first-child):not(.atk-hide) {
|
|
230
|
-
margin-left: 8px;
|
|
231
|
-
padding-left: 8px;
|
|
232
|
-
border-left: 1px solid @color-border;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
&:hover {
|
|
236
|
-
color: @color-deep;
|
|
237
|
-
}
|
|
190
|
+
.atk-show-btn {
|
|
191
|
+
color: var(--at-color-main);
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
user-select: none;
|
|
194
|
+
margin-left: 3px;
|
|
195
|
+
&:hover {
|
|
196
|
+
color: var(--at-color-main);
|
|
238
197
|
}
|
|
239
198
|
}
|
|
240
199
|
}
|
|
241
200
|
}
|
|
242
|
-
}
|
|
243
201
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
&:not(:last-child) {
|
|
247
|
-
margin-bottom: 5px;
|
|
248
|
-
}
|
|
202
|
+
& > .atk-footer {
|
|
203
|
+
margin-top: 12px;
|
|
249
204
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
205
|
+
.atk-actions {
|
|
206
|
+
display: flex;
|
|
207
|
+
flex-direction: row;
|
|
208
|
+
align-items: center;
|
|
253
209
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
210
|
+
& > span {
|
|
211
|
+
color: var(--at-color-meta);
|
|
212
|
+
font-size: 13px;
|
|
213
|
+
line-height: 15px;
|
|
214
|
+
display: inline-flex;
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
user-select: none;
|
|
258
217
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
}
|
|
218
|
+
&.atk-error, &.atk-error:hover {
|
|
219
|
+
color: var(--at-color-red);
|
|
220
|
+
}
|
|
264
221
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
222
|
+
&:not(:first-child):not(.atk-hide) {
|
|
223
|
+
margin-left: 8px;
|
|
224
|
+
padding-left: 8px;
|
|
225
|
+
border-left: 1px solid var(--at-color-border);
|
|
226
|
+
}
|
|
269
227
|
|
|
270
|
-
|
|
228
|
+
&:hover {
|
|
229
|
+
color: var(--at-color-deep);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
271
233
|
}
|
|
272
234
|
}
|
|
273
235
|
|
|
274
|
-
|
|
236
|
+
/** 内容限高 **/
|
|
237
|
+
.atk-height-limit:after {
|
|
275
238
|
position: absolute;
|
|
276
239
|
z-index: 1;
|
|
277
240
|
display: block;
|
|
@@ -280,22 +243,53 @@
|
|
|
280
243
|
content: " ";
|
|
281
244
|
bottom: 0;
|
|
282
245
|
height: 80px;
|
|
283
|
-
background:
|
|
246
|
+
background: var(--at-color-gradient);
|
|
284
247
|
}
|
|
285
248
|
|
|
286
|
-
.atk-
|
|
249
|
+
.atk-height-limit-btn {
|
|
287
250
|
z-index: 10;
|
|
288
251
|
position: absolute;
|
|
289
252
|
left: 50%;
|
|
290
253
|
bottom: 10px;
|
|
291
254
|
transform: translateX(-50%);
|
|
292
255
|
cursor: pointer;
|
|
293
|
-
border: 1px solid
|
|
256
|
+
border: 1px solid var(--at-color-border);
|
|
294
257
|
border-radius: @block-radius;
|
|
295
|
-
background:
|
|
258
|
+
background: var(--at-color-bg);
|
|
296
259
|
padding: 1px 20px;
|
|
297
260
|
font-size: 15px;
|
|
298
|
-
color:
|
|
261
|
+
color: var(--at-color-meta);
|
|
299
262
|
user-select: none;
|
|
300
263
|
}
|
|
264
|
+
|
|
265
|
+
// 避免重复显示按钮
|
|
266
|
+
.atk-height-limit .atk-height-limit .atk-height-limit-btn {
|
|
267
|
+
display: none;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/** 子评论区域 **/
|
|
272
|
+
.atk-comment-children {
|
|
273
|
+
& > .atk-comment-wrap {
|
|
274
|
+
margin-top: 10px;
|
|
275
|
+
border-left: 1px dashed var(--at-color-border);
|
|
276
|
+
border-bottom-color: transparent;
|
|
277
|
+
&:not(:last-child) {
|
|
278
|
+
margin-bottom: 5px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
& > .atk-comment {
|
|
282
|
+
padding-top: 4px;
|
|
283
|
+
padding-bottom: 4px;
|
|
284
|
+
|
|
285
|
+
& > .atk-avatar img {
|
|
286
|
+
width: 36px;
|
|
287
|
+
height: 36px;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
& > .atk-main {
|
|
291
|
+
margin-left: 47px;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
301
295
|
}
|