@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
@@ -301,29 +301,27 @@ function handleChooseTag(tag: string) {
301
301
  </div>
302
302
  </template>
303
303
 
304
- <style lang="scss" scoped>
304
+ <style scoped>
305
+ @charset "UTF-8";
305
306
  .user-works-page {
306
307
  display: flex;
307
308
  justify-content: center;
308
309
  width: 100%;
309
310
  margin: 20px auto;
310
311
  padding: 16px;
311
-
312
- h1 {
313
- font-size: 32px;
314
- font-weight: bold;
315
- }
316
-
317
- .description {
318
- margin-top: 16px;
319
- color: #999;
320
- font-size: 16px;
321
- }
322
-
323
- a {
324
- font-weight: 500;
325
- color: var(--vp-c-brand-1);
326
- }
312
+ }
313
+ .user-works-page h1 {
314
+ font-size: 32px;
315
+ font-weight: bold;
316
+ }
317
+ .user-works-page .description {
318
+ margin-top: 16px;
319
+ color: #999;
320
+ font-size: 16px;
321
+ }
322
+ .user-works-page a {
323
+ font-weight: 500;
324
+ color: var(--vp-c-brand-1);
327
325
  }
328
326
 
329
327
  .works-container {
@@ -333,143 +331,113 @@ function handleChooseTag(tag: string) {
333
331
 
334
332
  .work {
335
333
  max-width: 900px;
336
-
337
- h2 {
338
- margin-top: 6px;
339
- padding-top: 18px;
340
- line-height: 32px;
341
- font-size: 24px;
342
- border-top: 1px solid var(--vp-c-divider);
343
-
344
- a {
345
- color: inherit;
346
- }
347
-
348
- &:hover {
349
- a {
350
- &::before {
351
- opacity: 1;
352
- }
353
- }
354
- }
355
-
356
- a {
357
- position: relative;
358
-
359
- &::before {
360
- position: absolute;
361
- left: -16px;
362
- opacity: 0;
363
- content: var(--vp-header-anchor-symbol);
364
- }
365
- }
366
- }
367
-
368
- h3 {
369
- margin: 32px 0 0;
370
- line-height: 28px;
371
- font-size: 20px;
372
- position: relative;
373
-
374
- &.title>a.pin {
375
- position: absolute;
376
- left: -16px;
377
-
378
- &::before {
379
- left: -16px;
380
- opacity: 0;
381
- content: var(--vp-header-anchor-symbol);
382
- }
383
- }
384
-
385
- &:hover>a.pin {
386
- &::before {
387
- opacity: 1;
388
- }
389
- }
390
- }
391
-
392
- .info {
393
- display: flex;
394
- font-size: 14px;
395
- margin-top: 10px;
396
- flex-wrap: wrap;
397
- }
398
-
399
- .links,
400
- .times,
401
- .tags {
402
- display: flex;
403
- align-items: center;
404
-
405
- .icon {
406
- color: var(--vp-c-text-1);
407
- display: block;
408
- width: 20px;
409
- height: 20px;
410
- margin-right: 6px;
411
- }
412
- }
413
-
414
- .times {
415
- margin-right: 18px;
416
- }
417
-
418
- .links {
419
- a {
420
- display: flex;
421
- align-items: center;
422
- }
423
-
424
- a.github-link {
425
- margin-right: 10px;
426
- }
427
-
428
- a.link {
429
- margin-right: 0;
430
-
431
- &::after {
432
- content: ',';
433
- color: var(--vp-c-text-1);
434
- margin-right: 6px;
435
- margin-left: 2px;
436
- }
437
-
438
- &:last-child::after {
439
- content: '';
440
- }
441
- }
442
- }
443
-
444
- .tags {
445
- span.tag {
446
- cursor: pointer;
447
- }
448
-
449
- span.tag:not(:last-child) {
450
- &::after {
451
- content: '·';
452
- display: inline-block;
453
- padding: 0 4px;
454
- }
455
- }
456
- }
457
334
  }
335
+ .work h2 {
336
+ margin-top: 6px;
337
+ padding-top: 18px;
338
+ line-height: 32px;
339
+ font-size: 24px;
340
+ border-top: 1px solid var(--vp-c-divider);
341
+ }
342
+ .work h2 a {
343
+ color: inherit;
344
+ }
345
+ .work h2:hover a::before {
346
+ opacity: 1;
347
+ }
348
+ .work h2 a {
349
+ position: relative;
350
+ }
351
+ .work h2 a::before {
352
+ position: absolute;
353
+ left: -16px;
354
+ opacity: 0;
355
+ content: var(--vp-header-anchor-symbol);
356
+ }
357
+ .work h3 {
358
+ margin: 32px 0 0;
359
+ line-height: 28px;
360
+ font-size: 20px;
361
+ position: relative;
362
+ }
363
+ .work h3.title > a.pin {
364
+ position: absolute;
365
+ left: -16px;
366
+ }
367
+ .work h3.title > a.pin::before {
368
+ left: -16px;
369
+ opacity: 0;
370
+ content: var(--vp-header-anchor-symbol);
371
+ }
372
+ .work h3:hover > a.pin::before {
373
+ opacity: 1;
374
+ }
375
+ .work .info {
376
+ display: flex;
377
+ font-size: 14px;
378
+ margin-top: 10px;
379
+ flex-wrap: wrap;
380
+ }
381
+ .work .links,
382
+ .work .times,
383
+ .work .tags {
384
+ display: flex;
385
+ align-items: center;
386
+ }
387
+ .work .links .icon,
388
+ .work .times .icon,
389
+ .work .tags .icon {
390
+ color: var(--vp-c-text-1);
391
+ display: block;
392
+ width: 20px;
393
+ height: 20px;
394
+ margin-right: 6px;
395
+ }
396
+ .work .times {
397
+ margin-right: 18px;
398
+ }
399
+ .work .links a {
400
+ display: flex;
401
+ align-items: center;
402
+ }
403
+ .work .links a.github-link {
404
+ margin-right: 10px;
405
+ }
406
+ .work .links a.link {
407
+ margin-right: 0;
408
+ }
409
+ .work .links a.link::after {
410
+ content: ",";
411
+ color: var(--vp-c-text-1);
412
+ margin-right: 6px;
413
+ margin-left: 2px;
414
+ }
415
+ .work .links a.link:last-child::after {
416
+ content: "";
417
+ }
418
+ .work .tags span.tag {
419
+ cursor: pointer;
420
+ }
421
+ .work .tags span.tag:not(:last-child)::after {
422
+ content: "·";
423
+ display: inline-block;
424
+ padding: 0 4px;
425
+ }
426
+
458
427
  .works {
459
428
  flex: 1;
460
429
  }
430
+
461
431
  @media (min-width: 1440px) {
462
432
  .works {
463
433
  max-width: 784px;
464
434
  }
465
435
  }
466
-
467
436
  @media (min-width: 960px) {
468
437
  .works {
469
438
  max-width: 752px;
470
439
  }
471
440
  }
472
-
473
441
  .aside-container {
474
442
  display: none;
475
443
  flex: 1;
@@ -483,7 +451,6 @@ function handleChooseTag(tag: string) {
483
451
  display: block;
484
452
  }
485
453
  }
486
-
487
454
  .aside-outline-container {
488
455
  position: sticky;
489
456
  top: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 32px);
@@ -500,24 +467,17 @@ function handleChooseTag(tag: string) {
500
467
  display: flex;
501
468
  flex-wrap: wrap;
502
469
  justify-content: center;
503
-
504
- .sugar-image {
505
- :deep(img) {
506
- object-fit: contain;
507
- // max-height: 360px;
508
- }
509
- }
470
+ }
471
+ .list-mode .sugar-image :deep(img) {
472
+ object-fit: contain;
510
473
  }
511
474
 
512
475
  .swiper-mode {
513
476
  margin-top: 16px;
514
-
515
- .sugar-image {
516
- :deep(img) {
517
- object-fit: contain;
518
- max-height: 260px;
519
- }
520
- }
477
+ }
478
+ .swiper-mode .sugar-image :deep(img) {
479
+ object-fit: contain;
480
+ max-height: 260px;
521
481
  }
522
482
 
523
483
  .split {
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // @sugarat/theme index
2
2
  // override style
3
- import './styles/index.scss'
3
+ import './styles/index.css'
4
4
 
5
5
  // element-ui-copy
6
6
  import './styles/el-base.css'
@@ -1,15 +1,13 @@
1
+ @charset "UTF-8";
1
2
  html {
2
3
  --bg-gradient: 255, 255, 255, 0.1;
3
4
  --bg-gradient-home: 255, 255, 255;
4
5
  --box-shadow: 0 1px 8px 0 rgba(0, 0, 0, 0.1);
5
-
6
- // blog-item
7
6
  --box-shadow-hover: 0 2px 16px 0 rgba(0, 0, 0, 0.2);
8
7
  --nav-bgc: rgba(255, 255, 255, 0.9);
9
8
  --badge-font-color: #4e5969;
10
9
  --description-font-color: #86909c;
11
10
  --blog-theme-color: var(--vp-c-brand-1);
12
- // --blog-theme-color: #409eff;
13
11
  }
14
12
 
15
13
  html.dark {
@@ -25,20 +23,18 @@ html.dark {
25
23
  .VPHome {
26
24
  min-height: 100vh;
27
25
  background: radial-gradient(ellipse, rgba(var(--bg-gradient-home), 1) 0%, rgba(var(--bg-gradient-home), 0) 700%);
28
-
29
- &::before {
30
- content: "";
31
- inset: 0;
32
- position: fixed;
33
- top: 0;
34
- z-index: -1;
35
- background-image: url(./bg.png);
36
- background-repeat: repeat;
37
- min-height: 100%;
38
- }
26
+ }
27
+ .VPHome::before {
28
+ content: "";
29
+ inset: 0;
30
+ position: fixed;
31
+ top: 0;
32
+ z-index: -1;
33
+ background-image: url(./bg.png);
34
+ background-repeat: repeat;
35
+ min-height: 100%;
39
36
  }
40
37
 
41
- // 样式重写
42
38
  .VPHome {
43
39
  margin-bottom: 0 !important;
44
40
  padding-bottom: 96px;
@@ -49,76 +45,51 @@ html.dark {
49
45
  padding-bottom: 128px;
50
46
  }
51
47
  }
52
-
53
48
  @media screen and (min-width: 960px) {
54
49
  #VPContent.is-home.VPContent {
55
50
  padding-top: 0;
56
-
57
- .VPHome {
58
- min-height: 100vh;
59
-
60
- .VPHero>.container {
61
- padding-top: var(--vp-nav-height);
62
- }
63
- }
51
+ }
52
+ #VPContent.is-home.VPContent .VPHome {
53
+ min-height: 100vh;
54
+ }
55
+ #VPContent.is-home.VPContent .VPHome .VPHero > .container {
56
+ padding-top: var(--vp-nav-height);
64
57
  }
65
58
  }
66
-
67
59
  @media screen and (max-width: 959px) {
68
60
  .VPNav {
69
61
  background-color: var(--nav-bgc);
70
62
  }
71
63
  }
72
-
73
64
  .el-pagination {
74
65
  flex-wrap: wrap;
75
66
  justify-content: center;
76
67
  }
77
68
 
78
- // .el-pagination > * {
79
- // margin-bottom: 10px !important;
80
- // }
81
-
82
69
  @media screen and (min-width: 768px) and (max-width: 1200px) {
83
-
84
70
  .VPNavBarMenuGroup .button span.text,
85
71
  .VPNavBarMenuLink {
86
72
  font-size: 12px !important;
87
73
  }
88
-
89
74
  .VPNavBar {
90
75
  height: auto !important;
91
76
  }
92
-
93
77
  .VPNavBarMenu.menu {
94
78
  flex-wrap: wrap;
95
79
  }
96
80
  }
97
-
98
81
  @media screen and (min-width: 960px) and (max-width: 1120px) {
99
82
  .VPContent.has-sidebar {
100
83
  margin-top: 60px !important;
101
84
  }
102
85
  }
103
-
104
- // sidebar
105
- // @media (min-width: 1440px) {
106
- // aside.VPSidebar {
107
- // // padding-left: max(32px, calc((100% - (var(--vp-layout-max-width) - 16px)) / 2)) !important;
108
- // // padding-right: 10px !important;
109
- // }
110
- // }
111
-
112
- .VPDoc .content main {
113
- img {
114
- max-height: 300px;
115
- margin: 0 auto;
116
- cursor: pointer;
117
- }
118
-
119
- .vp-doc a {
120
- word-break: break-all;
121
- }
86
+ .VPDoc .content main img {
87
+ max-height: 300px;
88
+ margin: 0 auto;
89
+ cursor: pointer;
90
+ }
91
+ .VPDoc .content main .vp-doc a {
92
+ word-break: break-all;
122
93
  }
123
94
 
124
95
  ::-webkit-scrollbar {
@@ -150,51 +121,45 @@ main .vp-doc a:hover {
150
121
  text-decoration: underline dotted;
151
122
  }
152
123
 
153
- // 自定义全局样式
154
- span.svg-icon {
155
- svg {
156
- width: 14px;
157
- height: 14px;
158
- margin-right: 4px;
159
- }
124
+ span.svg-icon svg {
125
+ width: 14px;
126
+ height: 14px;
127
+ margin-right: 4px;
160
128
  }
161
129
 
162
130
  .vp-doc ul.task-list {
163
131
  list-style: none;
164
132
  padding-left: 10px;
165
-
166
- input[type="checkbox"] {
167
- cursor: pointer;
168
- position: relative;
169
- width: 13px;
170
- height: 13px;
171
- }
172
-
173
- input[type="checkbox"]::after {
174
- position: absolute;
175
- top: 0;
176
- color: #000;
177
- width: 13px;
178
- height: 13px;
179
- display: inline-block;
180
- visibility: visible;
181
- padding-left: 0px;
182
- text-align: center;
183
- content: " ";
184
- border-radius: 3px;
185
- }
186
-
187
- input[type="checkbox"]:checked::after {
188
- content: "✓";
189
- color: #fff;
190
- line-height: 14px;
191
- font-size: 10px;
192
- font-weight: bold;
193
- background-color: var(--vp-c-brand-1);
194
- }
133
+ }
134
+ .vp-doc ul.task-list input[type=checkbox] {
135
+ cursor: pointer;
136
+ position: relative;
137
+ width: 13px;
138
+ height: 13px;
139
+ }
140
+ .vp-doc ul.task-list input[type=checkbox]::after {
141
+ position: absolute;
142
+ top: 0;
143
+ color: #000;
144
+ width: 13px;
145
+ height: 13px;
146
+ display: inline-block;
147
+ visibility: visible;
148
+ padding-left: 0px;
149
+ text-align: center;
150
+ content: " ";
151
+ border-radius: 3px;
152
+ }
153
+ .vp-doc ul.task-list input[type=checkbox]:checked::after {
154
+ content: "✓";
155
+ color: #fff;
156
+ line-height: 14px;
157
+ font-size: 10px;
158
+ font-weight: bold;
159
+ background-color: var(--vp-c-brand-1);
195
160
  }
196
161
 
197
- .VPImage.logo{
162
+ .VPImage.logo {
198
163
  width: 24px;
199
164
  height: 24px;
200
165
  }