@sugarat/theme 0.5.12-beta.0 → 0.5.12-beta.1

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 (39) hide show
  1. package/node.js +1 -1
  2. package/node.mjs +1 -1
  3. package/package.json +1 -2
  4. package/src/components/Alert.vue +123 -162
  5. package/src/components/Avatar.vue +7 -8
  6. package/src/components/BlogAlert.vue +5 -5
  7. package/src/components/BlogApp.vue +1 -8
  8. package/src/components/BlogArticleAnalyze.vue +41 -46
  9. package/src/components/BlogAuthor.vue +13 -15
  10. package/src/components/BlogBackToTop.vue +21 -24
  11. package/src/components/BlogButtonAfterArticle.vue +9 -12
  12. package/src/components/BlogCommentWrapper.vue +34 -41
  13. package/src/components/BlogDocCover.vue +1 -1
  14. package/src/components/BlogFooter.vue +26 -32
  15. package/src/components/BlogFriendLink.vue +38 -47
  16. package/src/components/BlogHomeBanner.vue +25 -31
  17. package/src/components/BlogHomeHeaderAvatar.vue +16 -23
  18. package/src/components/BlogHomeInfo.vue +1 -1
  19. package/src/components/BlogHomeOverview.vue +12 -15
  20. package/src/components/BlogHomeTags.vue +14 -17
  21. package/src/components/BlogHotArticle.vue +66 -77
  22. package/src/components/BlogItem.vue +14 -23
  23. package/src/components/BlogList.vue +12 -15
  24. package/src/components/BlogRecommendArticle.vue +53 -69
  25. package/src/components/BlogSidebar.vue +1 -1
  26. package/src/components/Button.vue +69 -84
  27. package/src/components/Carousel.vue +22 -27
  28. package/src/components/CarouselItem.vue +11 -26
  29. package/src/components/CommentArtalk.vue +1 -1
  30. package/src/components/Image.vue +8 -9
  31. package/src/components/ImageViewer.vue +54 -53
  32. package/src/components/Pagination.vue +148 -176
  33. package/src/components/Tag.vue +72 -91
  34. package/src/components/UserWorks.vue +115 -155
  35. package/src/index.ts +1 -1
  36. package/src/styles/{index.scss → index.css} +56 -91
  37. package/src/styles/scss/algolia.scss +0 -231
  38. package/src/styles/scss/global.scss +0 -156
  39. package/src/styles/scss/highlight.scss +0 -12
@@ -201,7 +201,7 @@ function handleJumperChange(evt: Event) {
201
201
  </div>
202
202
  </template>
203
203
 
204
- <style lang="scss" scoped>
204
+ <style scoped>
205
205
  .sugar-pagination {
206
206
  display: flex;
207
207
  justify-content: center;
@@ -209,189 +209,161 @@ function handleJumperChange(evt: Event) {
209
209
  padding: 2px 5px;
210
210
  color: var(--vp-c-text-1);
211
211
  font-size: 12px;
212
-
213
- &--small {
214
- .btn-prev, .btn-next, .sugar-pager li {
215
- height: 24px;
216
- line-height: 24px;
217
- min-width: 24px;
218
- font-size: 12px;
219
- }
220
- }
221
-
222
- button {
223
- display: flex;
224
- justify-content: center;
225
- align-items: center;
226
- background: transparent;
227
- border: none;
228
- cursor: pointer;
229
- font-size: 12px;
230
- padding: 0 6px;
231
- min-width: 24px;
232
- height: 24px;
233
- line-height: 24px;
234
- color: var(--vp-c-text-1);
235
-
236
- &:disabled {
237
- color: var(--vp-c-text-3);
238
- cursor: not-allowed;
239
- }
240
-
241
- &:hover:not(:disabled) {
242
- color: var(--vp-c-brand-2);
243
- }
244
- }
245
-
246
- .sugar-pager {
247
- user-select: none;
248
- list-style: none;
249
- display: flex;
250
- padding: 0;
251
- margin: 0;
252
-
253
- li {
254
- padding: 0 4px;
255
- background: transparent;
256
- vertical-align: top;
257
- display: inline-block;
258
- font-size: 12px;
259
- min-width: 24px;
260
- height: 24px;
261
- line-height: 24px;
262
- cursor: pointer;
263
- box-sizing: border-box;
264
- text-align: center;
265
- margin: 0 4px;
266
- border-radius: 2px;
267
- display: flex;
268
- justify-content: center;
269
- align-items: center;
270
-
271
- &.is-active {
272
- color: var(--vp-c-brand-2);
273
- cursor: default;
274
- font-weight: normal;
275
- }
276
-
277
- &:hover:not(.is-active):not(.more) {
278
- color: var(--vp-c-brand-2);
279
- }
280
-
281
- &.more {
282
- cursor: pointer;
283
-
284
- .icon-more {
285
- display: none;
286
- }
287
-
288
- .icon-more-text {
289
- display: block;
290
- }
291
-
292
- &:hover {
293
- color: var(--vp-c-brand-2);
294
-
295
- .icon-more {
296
- display: inline-block;
297
- }
298
-
299
- .icon-more-text {
300
- display: none;
301
- }
302
- }
303
- }
304
- }
305
- }
306
-
307
- &.is-background {
308
- .btn-prev, .btn-next, .sugar-pager li {
309
- background-color: var(--vp-c-bg-alt);
310
- color: var(--vp-c-text-2);
311
- margin: 0 3px;
312
- border-radius: 2px;
313
- font-weight: normal;
314
- }
315
-
316
- .btn-prev:disabled, .btn-next:disabled {
317
- color: var(--vp-c-text-3);
318
- background-color: var(--vp-c-bg-alt);
319
- }
320
-
321
- .sugar-pager li:not(.disabled).is-active {
322
- background-color: var(--vp-c-brand-2);
323
- color: #fff;
324
- }
325
-
326
- .sugar-pager li:not(.disabled):hover:not(.is-active):not(.more) {
327
- color: var(--vp-c-brand-2);
328
- }
329
- }
330
-
331
- &__jump {
332
- display: flex;
333
- align-items: center;
334
- margin-left: 24px;
335
- font-weight: normal;
336
- color: var(--vp-c-text-2);
337
- }
338
-
339
- &__editor {
340
- margin: 0 8px;
341
- width: 50px;
342
- }
212
+ }
213
+ .sugar-pagination--small .btn-prev, .sugar-pagination--small .btn-next, .sugar-pagination--small .sugar-pager li {
214
+ height: 24px;
215
+ line-height: 24px;
216
+ min-width: 24px;
217
+ font-size: 12px;
218
+ }
219
+ .sugar-pagination button {
220
+ display: flex;
221
+ justify-content: center;
222
+ align-items: center;
223
+ background: transparent;
224
+ border: none;
225
+ cursor: pointer;
226
+ font-size: 12px;
227
+ padding: 0 6px;
228
+ min-width: 24px;
229
+ height: 24px;
230
+ line-height: 24px;
231
+ color: var(--vp-c-text-1);
232
+ }
233
+ .sugar-pagination button:disabled {
234
+ color: var(--vp-c-text-3);
235
+ cursor: not-allowed;
236
+ }
237
+ .sugar-pagination button:hover:not(:disabled) {
238
+ color: var(--vp-c-brand-2);
239
+ }
240
+ .sugar-pagination .sugar-pager {
241
+ user-select: none;
242
+ list-style: none;
243
+ display: flex;
244
+ padding: 0;
245
+ margin: 0;
246
+ }
247
+ .sugar-pagination .sugar-pager li {
248
+ padding: 0 4px;
249
+ background: transparent;
250
+ vertical-align: top;
251
+ display: inline-block;
252
+ font-size: 12px;
253
+ min-width: 24px;
254
+ height: 24px;
255
+ line-height: 24px;
256
+ cursor: pointer;
257
+ box-sizing: border-box;
258
+ text-align: center;
259
+ margin: 0 4px;
260
+ border-radius: 2px;
261
+ display: flex;
262
+ justify-content: center;
263
+ align-items: center;
264
+ }
265
+ .sugar-pagination .sugar-pager li.is-active {
266
+ color: var(--vp-c-brand-2);
267
+ cursor: default;
268
+ font-weight: normal;
269
+ }
270
+ .sugar-pagination .sugar-pager li:hover:not(.is-active):not(.more) {
271
+ color: var(--vp-c-brand-2);
272
+ }
273
+ .sugar-pagination .sugar-pager li.more {
274
+ cursor: pointer;
275
+ }
276
+ .sugar-pagination .sugar-pager li.more .icon-more {
277
+ display: none;
278
+ }
279
+ .sugar-pagination .sugar-pager li.more .icon-more-text {
280
+ display: block;
281
+ }
282
+ .sugar-pagination .sugar-pager li.more:hover {
283
+ color: var(--vp-c-brand-2);
284
+ }
285
+ .sugar-pagination .sugar-pager li.more:hover .icon-more {
286
+ display: inline-block;
287
+ }
288
+ .sugar-pagination .sugar-pager li.more:hover .icon-more-text {
289
+ display: none;
290
+ }
291
+ .sugar-pagination.is-background .btn-prev, .sugar-pagination.is-background .btn-next, .sugar-pagination.is-background .sugar-pager li {
292
+ background-color: var(--vp-c-bg-alt);
293
+ color: var(--vp-c-text-2);
294
+ margin: 0 3px;
295
+ border-radius: 2px;
296
+ font-weight: normal;
297
+ }
298
+ .sugar-pagination.is-background .btn-prev:disabled, .sugar-pagination.is-background .btn-next:disabled {
299
+ color: var(--vp-c-text-3);
300
+ background-color: var(--vp-c-bg-alt);
301
+ }
302
+ .sugar-pagination.is-background .sugar-pager li:not(.disabled).is-active {
303
+ background-color: var(--vp-c-brand-2);
304
+ color: #fff;
305
+ }
306
+ .sugar-pagination.is-background .sugar-pager li:not(.disabled):hover:not(.is-active):not(.more) {
307
+ color: var(--vp-c-brand-2);
308
+ }
309
+ .sugar-pagination__jump {
310
+ display: flex;
311
+ align-items: center;
312
+ margin-left: 24px;
313
+ font-weight: normal;
314
+ color: var(--vp-c-text-2);
315
+ }
316
+ .sugar-pagination__editor {
317
+ margin: 0 8px;
318
+ width: 50px;
343
319
  }
344
320
 
345
321
  .sugar-input {
346
- display: inline-flex;
347
- position: relative;
348
- font-size: 12px;
349
- line-height: 24px;
350
- box-sizing: border-box;
351
- width: 100%;
322
+ display: inline-flex;
323
+ position: relative;
324
+ font-size: 12px;
325
+ line-height: 24px;
326
+ box-sizing: border-box;
327
+ width: 100%;
352
328
  }
353
329
 
354
330
  .sugar-input__wrapper {
355
- display: inline-flex;
356
- flex-grow: 1;
357
- align-items: center;
358
- justify-content: center;
359
- padding: 1px 11px;
360
- background-color: var(--vp-c-bg);
361
- background-image: none;
362
- border-radius: 4px;
363
- transition: box-shadow .2s cubic-bezier(.645,.045,.355,1);
364
-
365
- &:focus-within {
366
- box-shadow: 0 0 0 1px var(--vp-c-brand-2) inset;
367
- }
331
+ display: inline-flex;
332
+ flex-grow: 1;
333
+ align-items: center;
334
+ justify-content: center;
335
+ padding: 1px 11px;
336
+ background-color: var(--vp-c-bg);
337
+ background-image: none;
338
+ border-radius: 4px;
339
+ transition: box-shadow 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
340
+ }
341
+ .sugar-input__wrapper:focus-within {
342
+ box-shadow: 0 0 0 1px var(--vp-c-brand-2) inset;
368
343
  }
369
344
 
370
345
  .sugar-input__inner {
371
- width: 100%;
372
- flex-grow: 1;
373
- -webkit-appearance: none;
374
- color: var(--vp-c-text-1);
375
- font-size: inherit;
376
- height: 24px;
377
- line-height: 24px;
378
- padding: 0;
379
- outline: none;
380
- border: none;
381
- background: none;
382
- box-sizing: border-box;
383
- text-align: center;
384
-
385
- /* Chrome, Safari, Edge, Opera */
386
- &::-webkit-outer-spin-button,
387
- &::-webkit-inner-spin-button {
388
- -webkit-appearance: none;
389
- margin: 0;
390
- }
391
-
392
- /* Firefox */
393
- &[type=number] {
394
- -moz-appearance: textfield;
395
- }
346
+ width: 100%;
347
+ flex-grow: 1;
348
+ -webkit-appearance: none;
349
+ color: var(--vp-c-text-1);
350
+ font-size: inherit;
351
+ height: 24px;
352
+ line-height: 24px;
353
+ padding: 0;
354
+ outline: none;
355
+ border: none;
356
+ background: none;
357
+ box-sizing: border-box;
358
+ text-align: center;
359
+ /* Chrome, Safari, Edge, Opera */
360
+ /* Firefox */
361
+ }
362
+ .sugar-input__inner::-webkit-outer-spin-button, .sugar-input__inner::-webkit-inner-spin-button {
363
+ -webkit-appearance: none;
364
+ margin: 0;
365
+ }
366
+ .sugar-input__inner[type=number] {
367
+ -moz-appearance: textfield;
396
368
  }
397
369
  </style>
@@ -21,7 +21,7 @@ defineEmits(['close', 'click'])
21
21
  </span>
22
22
  </template>
23
23
 
24
- <style lang="scss">
24
+ <style>
25
25
  .blog-tag {
26
26
  display: inline-flex;
27
27
  justify-content: center;
@@ -37,127 +37,108 @@ defineEmits(['close', 'click'])
37
37
  white-space: nowrap;
38
38
  vertical-align: middle;
39
39
  color: #fff;
40
-
41
- >.close {
42
- margin-left: 6px;
43
- font-size: 12px;
44
- cursor: pointer;
45
- border-radius: 50%;
46
- display: inline-flex;
47
- align-items: center;
48
- justify-content: center;
49
- width: 14px;
50
- height: 14px;
51
- transition: all 0.3s;
52
- }
40
+ }
41
+ .blog-tag > .close {
42
+ margin-left: 6px;
43
+ font-size: 12px;
44
+ cursor: pointer;
45
+ border-radius: 50%;
46
+ display: inline-flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ width: 14px;
50
+ height: 14px;
51
+ transition: all 0.3s;
53
52
  }
54
53
 
55
54
  /* Primary */
56
55
  .blog-tag--primary {
57
56
  background-color: #409eff;
58
57
  border-color: #409eff;
59
-
60
- .close:hover {
61
- background-color: #79bbff;
62
- }
58
+ }
59
+ .blog-tag--primary .close:hover {
60
+ background-color: #79bbff;
63
61
  }
64
62
 
65
63
  /* Success */
66
64
  .blog-tag--success {
67
65
  background-color: #67c23a;
68
66
  border-color: #67c23a;
69
-
70
- .close:hover {
71
- background-color: #95d475;
72
- }
67
+ }
68
+ .blog-tag--success .close:hover {
69
+ background-color: #95d475;
73
70
  }
74
71
 
75
72
  /* Info */
76
73
  .blog-tag--info {
77
74
  background-color: #909399;
78
75
  border-color: #909399;
79
-
80
- .close:hover {
81
- background-color: #b1b3b8;
82
- }
76
+ }
77
+ .blog-tag--info .close:hover {
78
+ background-color: #b1b3b8;
83
79
  }
84
80
 
85
81
  /* Warning */
86
82
  .blog-tag--warning {
87
83
  background-color: #e6a23c;
88
84
  border-color: #e6a23c;
89
-
90
- .close:hover {
91
- background-color: #eebe77;
92
- }
85
+ }
86
+ .blog-tag--warning .close:hover {
87
+ background-color: #eebe77;
93
88
  }
94
89
 
95
90
  /* Danger */
96
91
  .blog-tag--danger {
97
92
  background-color: #f56c6c;
98
93
  border-color: #f56c6c;
99
-
100
- .close:hover {
101
- background-color: #f89898;
102
- }
103
94
  }
104
- </style>
105
-
106
- <style lang="scss">
107
- html.dark {
108
- .blog-tag--primary {
109
- background-color: #18222c;
110
- border-color: #1d3043;
111
- color: #409eff;
112
-
113
- .close:hover {
114
- background-color: #409eff;
115
- color: #fff;
116
- }
117
- }
118
-
119
- .blog-tag--success {
120
- background-color: #1c2518;
121
- border-color: #25371c;
122
- color: #67c23a;
123
-
124
- .close:hover {
125
- background-color: #95d475;
126
- color: #fff;
127
- }
128
- }
129
-
130
- .blog-tag--info {
131
- background-color: #202121;
132
- border-color: #2d2d2f;
133
- color: #909399;
134
-
135
- .close:hover {
136
- background-color: #909399;
137
- color: #fff;
138
- }
139
- }
140
-
141
- .blog-tag--warning {
142
- background-color: #292218;
143
- border-color: #3e301c;
144
- color: #e6a23c;
145
-
146
- .close:hover {
147
- background-color: #e6a23c;
148
- color: #fff;
149
- }
150
- }
151
-
152
- .blog-tag--danger {
153
- background-color: #2b1d1d;
154
- border-color: #412626;
155
- color: #f56c6c;
95
+ .blog-tag--danger .close:hover {
96
+ background-color: #f89898;
97
+ }
156
98
 
157
- .close:hover {
158
- background-color: #f56c6c;
159
- color: #fff;
160
- }
161
- }
99
+ html.dark .blog-tag--primary {
100
+ background-color: #18222c;
101
+ border-color: #1d3043;
102
+ color: #409eff;
103
+ }
104
+ html.dark .blog-tag--primary .close:hover {
105
+ background-color: #409eff;
106
+ color: #fff;
107
+ }
108
+ html.dark .blog-tag--success {
109
+ background-color: #1c2518;
110
+ border-color: #25371c;
111
+ color: #67c23a;
112
+ }
113
+ html.dark .blog-tag--success .close:hover {
114
+ background-color: #95d475;
115
+ color: #fff;
116
+ }
117
+ html.dark .blog-tag--info {
118
+ background-color: #202121;
119
+ border-color: #2d2d2f;
120
+ color: #909399;
121
+ }
122
+ html.dark .blog-tag--info .close:hover {
123
+ background-color: #909399;
124
+ color: #fff;
125
+ }
126
+ html.dark .blog-tag--warning {
127
+ background-color: #292218;
128
+ border-color: #3e301c;
129
+ color: #e6a23c;
130
+ }
131
+ html.dark .blog-tag--warning .close:hover {
132
+ background-color: #e6a23c;
133
+ color: #fff;
134
+ }
135
+ html.dark .blog-tag--danger {
136
+ background-color: #2b1d1d;
137
+ border-color: #412626;
138
+ color: #f56c6c;
139
+ }
140
+ html.dark .blog-tag--danger .close:hover {
141
+ background-color: #f56c6c;
142
+ color: #fff;
162
143
  }
163
144
  </style>