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

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 (41) hide show
  1. package/README.md +2 -2
  2. package/node.js +1 -1
  3. package/node.mjs +1 -1
  4. package/package.json +4 -5
  5. package/src/components/Alert.vue +123 -162
  6. package/src/components/Avatar.vue +7 -8
  7. package/src/components/BlogAlert.vue +5 -5
  8. package/src/components/BlogApp.vue +1 -8
  9. package/src/components/BlogArticleAnalyze.vue +41 -46
  10. package/src/components/BlogAuthor.vue +13 -15
  11. package/src/components/BlogBackToTop.vue +21 -24
  12. package/src/components/BlogButtonAfterArticle.vue +9 -12
  13. package/src/components/BlogCommentWrapper.vue +34 -41
  14. package/src/components/BlogDocCover.vue +1 -1
  15. package/src/components/BlogFooter.vue +26 -32
  16. package/src/components/BlogFriendLink.vue +38 -47
  17. package/src/components/BlogHomeBanner.vue +25 -31
  18. package/src/components/BlogHomeHeaderAvatar.vue +16 -23
  19. package/src/components/BlogHomeInfo.vue +1 -1
  20. package/src/components/BlogHomeOverview.vue +12 -15
  21. package/src/components/BlogHomeTags.vue +14 -17
  22. package/src/components/BlogHotArticle.vue +66 -77
  23. package/src/components/BlogItem.vue +15 -23
  24. package/src/components/BlogList.vue +12 -15
  25. package/src/components/BlogRecommendArticle.vue +53 -69
  26. package/src/components/BlogSidebar.vue +1 -1
  27. package/src/components/Button.vue +69 -84
  28. package/src/components/Carousel.vue +22 -27
  29. package/src/components/CarouselItem.vue +11 -26
  30. package/src/components/CommentArtalk.vue +1 -1
  31. package/src/components/Image.vue +8 -9
  32. package/src/components/ImageViewer.vue +54 -53
  33. package/src/components/Pagination.vue +148 -176
  34. package/src/components/Tag.vue +72 -91
  35. package/src/components/UserWorks.vue +115 -155
  36. package/src/index.ts +1 -1
  37. package/src/styles/bg.webp +0 -0
  38. package/src/styles/{index.scss → index.css} +56 -91
  39. package/src/styles/scss/algolia.scss +0 -231
  40. package/src/styles/scss/global.scss +0 -156
  41. package/src/styles/scss/highlight.scss +0 -12
@@ -40,7 +40,7 @@ const iconSVGStr = computed(() => backToTopConfig?.value?.icon)
40
40
  </div>
41
41
  </template>
42
42
 
43
- <style lang="scss" scoped>
43
+ <style scoped>
44
44
  .back-to-top {
45
45
  position: fixed;
46
46
  width: v-bind(docWidth);
@@ -52,29 +52,26 @@ const iconSVGStr = computed(() => backToTopConfig?.value?.icon)
52
52
  display: flex;
53
53
  justify-content: right;
54
54
  z-index: 200;
55
-
56
- &:hover {
57
- opacity: 1;
58
- }
59
-
60
- .icon-wrapper {
61
- cursor: pointer;
62
- border-radius: 50%;
63
- position: relative;
64
- right: -80px;
65
- background-color: var(--vp-c-bg);
66
- box-shadow: var(--box-shadow);
67
- padding: 4px;
68
- display: flex;
69
- align-items: center;
70
- justify-content: center;
71
- background-color: var(--vp-c-brand-soft);
72
- color: var(--vp-c-brand-1);
73
-
74
- &:hover {
75
- box-shadow: var(--box-shadow-hover);
76
- }
77
- }
55
+ }
56
+ .back-to-top:hover {
57
+ opacity: 1;
58
+ }
59
+ .back-to-top .icon-wrapper {
60
+ cursor: pointer;
61
+ border-radius: 50%;
62
+ position: relative;
63
+ right: -80px;
64
+ background-color: var(--vp-c-bg);
65
+ box-shadow: var(--box-shadow);
66
+ padding: 4px;
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ background-color: var(--vp-c-brand-soft);
71
+ color: var(--vp-c-brand-1);
72
+ }
73
+ .back-to-top .icon-wrapper:hover {
74
+ box-shadow: var(--box-shadow-hover);
78
75
  }
79
76
 
80
77
  @media screen and (max-width: 1200px) {
@@ -46,17 +46,17 @@ function toggleContent() {
46
46
  </div>
47
47
  </template>
48
48
 
49
- <style scoped lang="scss">
49
+ <style scoped>
50
+ @charset "UTF-8";
50
51
  .appreciation-container {
51
52
  text-align: center;
52
53
  padding: 20px;
53
54
  font-size: 14px;
54
55
  color: #606266;
55
-
56
- :deep(.sugar-button.sugar-button--primary){
57
- background-color: var(--vp-c-brand-2);
58
- border-color: var(--vp-c-brand-2);
59
- }
56
+ }
57
+ .appreciation-container :deep(.sugar-button.sugar-button--primary) {
58
+ background-color: var(--vp-c-brand-2);
59
+ border-color: var(--vp-c-brand-2);
60
60
  }
61
61
 
62
62
  .content-container {
@@ -65,9 +65,9 @@ function toggleContent() {
65
65
  justify-content: center;
66
66
  align-items: center;
67
67
  margin-top: 20px;
68
- :deep(img){
69
- height: 260px;
70
- }
68
+ }
69
+ .content-container :deep(img) {
70
+ height: 260px;
71
71
  }
72
72
 
73
73
  .content-icon {
@@ -94,18 +94,15 @@ function toggleContent() {
94
94
  from {
95
95
  opacity: 0;
96
96
  }
97
-
98
97
  to {
99
98
  opacity: 1;
100
99
  }
101
100
  }
102
-
103
101
  /* 淡出 */
104
102
  @keyframes fadeOut {
105
103
  from {
106
104
  opacity: 1;
107
105
  }
108
-
109
106
  to {
110
107
  opacity: 0;
111
108
  }
@@ -52,7 +52,7 @@ const labelText = computed(() => {
52
52
  </div>
53
53
  </template>
54
54
 
55
- <style scoped lang="scss">
55
+ <style scoped>
56
56
  .comment-btn-wrapper {
57
57
  position: fixed;
58
58
  width: v-bind(docWidth);
@@ -64,49 +64,42 @@ const labelText = computed(() => {
64
64
  display: flex;
65
65
  justify-content: right;
66
66
  z-index: 200;
67
-
68
- &:hover {
69
- opacity: 1;
70
- }
71
-
72
- .icon-wrapper,
73
- .icon-wrapper-text {
74
- cursor: pointer;
75
- border-radius: 50%;
76
- position: relative;
77
- right: -80px;
78
- background-color: var(--vp-c-bg);
79
- box-shadow: var(--box-shadow);
80
- padding: 4px;
81
- display: flex;
82
- align-items: center;
83
- justify-content: center;
84
- background-color: var(--vp-c-brand-soft);
85
- color: var(--vp-c-brand-1);
86
-
87
- &:hover {
88
- box-shadow: var(--box-shadow-hover);
89
- }
90
- }
91
-
92
- .icon-wrapper-text {
93
- border-radius: 2px;
94
- padding: 2px 6px;
95
-
96
- span.text {
97
- font-size: 12px;
98
- margin-left: 4px;
99
- }
100
- }
67
+ }
68
+ .comment-btn-wrapper:hover {
69
+ opacity: 1;
70
+ }
71
+ .comment-btn-wrapper .icon-wrapper,
72
+ .comment-btn-wrapper .icon-wrapper-text {
73
+ cursor: pointer;
74
+ border-radius: 50%;
75
+ position: relative;
76
+ right: -80px;
77
+ background-color: var(--vp-c-bg);
78
+ box-shadow: var(--box-shadow);
79
+ padding: 4px;
80
+ display: flex;
81
+ align-items: center;
82
+ justify-content: center;
83
+ background-color: var(--vp-c-brand-soft);
84
+ color: var(--vp-c-brand-1);
85
+ }
86
+ .comment-btn-wrapper .icon-wrapper:hover,
87
+ .comment-btn-wrapper .icon-wrapper-text:hover {
88
+ box-shadow: var(--box-shadow-hover);
89
+ }
90
+ .comment-btn-wrapper .icon-wrapper-text {
91
+ border-radius: 2px;
92
+ padding: 2px 6px;
93
+ }
94
+ .comment-btn-wrapper .icon-wrapper-text span.text {
95
+ font-size: 12px;
96
+ margin-left: 4px;
101
97
  }
102
98
 
103
99
  @media screen and (max-width: 1200px) {
104
- .comment-btn-wrapper {
105
-
106
- .icon-wrapper,
107
- .icon-wrapper-text {
108
- position: static;
109
- }
100
+ .comment-btn-wrapper .icon-wrapper,
101
+ .comment-btn-wrapper .icon-wrapper-text {
102
+ position: static;
110
103
  }
111
104
  }
112
105
  </style>
@@ -19,7 +19,7 @@ const hiddenCover = computed(
19
19
  <img v-if="cover && !hiddenCover" class="blog-doc-cover" :src="realCover">
20
20
  </template>
21
21
 
22
- <style lang="scss" scoped>
22
+ <style scoped>
23
23
  img.blog-doc-cover.blog-doc-cover.blog-doc-cover {
24
24
  width: 100%;
25
25
  object-fit: cover;
@@ -115,20 +115,19 @@ const renderData = computed(() => {
115
115
  </footer>
116
116
  </template>
117
117
 
118
- <style lang="scss" scoped>
118
+ <style scoped>
119
119
  footer.blog-footer {
120
120
  text-align: center;
121
121
  position: relative;
122
122
  border-top: 1px solid var(--vp-c-gutter);
123
123
  padding: 20px 12px;
124
124
  background-color: var(--vp-c-bg);
125
-
126
- p {
127
- line-height: 24px;
128
- font-size: 14px;
129
- font-weight: 500;
130
- color: var(--vp-c-text-2);
131
- }
125
+ }
126
+ footer.blog-footer p {
127
+ line-height: 24px;
128
+ font-size: 14px;
129
+ font-weight: 500;
130
+ color: var(--vp-c-text-2);
132
131
  }
133
132
 
134
133
  .footer-item-list {
@@ -143,33 +142,28 @@ footer.blog-footer {
143
142
  align-items: center;
144
143
  }
145
144
  }
146
-
147
145
  .footer-item {
148
146
  display: flex;
149
147
  align-items: center;
150
148
  margin: 0 8px;
151
-
152
- i {
153
- margin-right: 4px;
154
- font-style: normal;
155
- }
156
-
157
- i :deep(svg) {
158
- fill: var(--vp-c-text-2);
159
- width: 16px;
160
- height: 16px;
161
- }
162
-
163
- i :deep(img) {
164
- width: 16px;
165
- height: 16px;
166
- }
167
-
168
- a:hover {
169
- color: var(--vp-c-brand-1);
170
- text-decoration: underline;
171
- text-decoration-color: var(--vp-c-brand-1);
172
- text-decoration-style: dashed;
173
- }
149
+ }
150
+ .footer-item i {
151
+ margin-right: 4px;
152
+ font-style: normal;
153
+ }
154
+ .footer-item i :deep(svg) {
155
+ fill: var(--vp-c-text-2);
156
+ width: 16px;
157
+ height: 16px;
158
+ }
159
+ .footer-item i :deep(img) {
160
+ width: 16px;
161
+ height: 16px;
162
+ }
163
+ .footer-item a:hover {
164
+ color: var(--vp-c-brand-1);
165
+ text-decoration: underline;
166
+ text-decoration-color: var(--vp-c-brand-1);
167
+ text-decoration-style: dashed;
174
168
  }
175
169
  </style>
@@ -151,7 +151,7 @@ onUnmounted(() => {
151
151
  </div>
152
152
  </template>
153
153
 
154
- <style lang="scss" scoped>
154
+ <style scoped>
155
155
  .card {
156
156
  position: relative;
157
157
  margin: 0 auto 10px;
@@ -164,10 +164,9 @@ onUnmounted(() => {
164
164
  transition: all 0.3s;
165
165
  background-color: rgba(var(--bg-gradient));
166
166
  display: flex;
167
-
168
- &:hover {
169
- box-shadow: var(--box-shadow-hover);
170
- }
167
+ }
168
+ .card:hover {
169
+ box-shadow: var(--box-shadow-hover);
171
170
  }
172
171
 
173
172
  .card-header {
@@ -175,12 +174,11 @@ onUnmounted(() => {
175
174
  width: 100%;
176
175
  justify-content: space-between;
177
176
  align-items: center;
178
-
179
- .title {
180
- font-size: 12px;
181
- display: flex;
182
- align-items: center;
183
- }
177
+ }
178
+ .card-header .title {
179
+ font-size: 12px;
180
+ display: flex;
181
+ align-items: center;
184
182
  }
185
183
 
186
184
  .friend-wrapper {
@@ -199,43 +197,36 @@ onUnmounted(() => {
199
197
  margin: 0;
200
198
  padding: 10px 10px 0 0px;
201
199
  width: 100%;
202
-
203
200
  position: relative;
204
201
  width: 100%;
205
-
206
- li {
207
- box-sizing: border-box;
208
- padding: 0 5px;
209
- height: 76px;
210
- cursor: pointer;
211
-
212
- a {
213
- display: flex;
214
- align-items: center;
215
- }
216
-
217
- div {
218
- padding-left: 10px;
219
- }
220
-
221
- .info-wrapper {
222
- display: flex;
223
- flex-direction: column;
224
- overflow: hidden;
225
- }
226
-
227
- .nickname {
228
- font-size: 16px;
229
- font-weight: 450;
230
- }
231
-
232
- .des {
233
- color: var(--vp-c-text-2);
234
- font-size: 14px;
235
- overflow: hidden;
236
- white-space: nowrap;
237
- text-overflow: ellipsis;
238
- }
239
- }
202
+ }
203
+ .friend-list li {
204
+ box-sizing: border-box;
205
+ padding: 0 5px;
206
+ height: 76px;
207
+ cursor: pointer;
208
+ }
209
+ .friend-list li a {
210
+ display: flex;
211
+ align-items: center;
212
+ }
213
+ .friend-list li div {
214
+ padding-left: 10px;
215
+ }
216
+ .friend-list li .info-wrapper {
217
+ display: flex;
218
+ flex-direction: column;
219
+ overflow: hidden;
220
+ }
221
+ .friend-list li .nickname {
222
+ font-size: 16px;
223
+ font-weight: 450;
224
+ }
225
+ .friend-list li .des {
226
+ color: var(--vp-c-text-2);
227
+ font-size: 14px;
228
+ overflow: hidden;
229
+ white-space: nowrap;
230
+ text-overflow: ellipsis;
240
231
  }
241
232
  </style>
@@ -85,28 +85,26 @@ async function changeSlogan() {
85
85
  </div>
86
86
  </template>
87
87
 
88
- <style lang="scss" scoped>
88
+ <style scoped>
89
89
  h1 {
90
90
  text-align: center;
91
- .name {
92
- transition: all 0.25s ease-in-out 0.04s;
93
- transform: translateY(0px);
94
- opacity: 1;
95
- font-weight: bold;
96
- margin: 0 auto;
97
- font-size: 36px;
98
- }
99
-
100
- .motto {
101
- position: relative;
102
- bottom: 0px;
103
- font-size: 14px;
104
- margin-left: 10px;
105
-
106
- &::before {
107
- content: '- ';
108
- }
109
- }
91
+ }
92
+ h1 .name {
93
+ transition: all 0.25s ease-in-out 0.04s;
94
+ transform: translateY(0px);
95
+ opacity: 1;
96
+ font-weight: bold;
97
+ margin: 0 auto;
98
+ font-size: 36px;
99
+ }
100
+ h1 .motto {
101
+ position: relative;
102
+ bottom: 0px;
103
+ font-size: 14px;
104
+ margin-left: 10px;
105
+ }
106
+ h1 .motto::before {
107
+ content: "- ";
110
108
  }
111
109
 
112
110
  @media screen and (max-width: 500px) {
@@ -114,28 +112,24 @@ h1 {
114
112
  display: none;
115
113
  }
116
114
  }
117
-
118
115
  @keyframes fade-in {
119
116
  0% {
120
117
  opacity: 0;
121
118
  }
122
-
123
119
  100% {
124
120
  opacity: 1;
125
121
  }
126
122
  }
127
-
128
123
  .inspiring-wrapper {
129
124
  margin: 16px 0;
130
125
  height: 32px;
131
126
  width: auto;
132
-
133
- h2 {
134
- animation: fade-in 0.5s ease-in-out;
135
- cursor: pointer;
136
- text-align: center;
137
- font-size: 20px;
138
- line-height: 1.6;
139
- }
127
+ }
128
+ .inspiring-wrapper h2 {
129
+ animation: fade-in 0.5s ease-in-out;
130
+ cursor: pointer;
131
+ text-align: center;
132
+ font-size: 20px;
133
+ line-height: 1.6;
140
134
  }
141
135
  </style>
@@ -25,33 +25,26 @@ useHoverSpin(imgRef, home?.value?.hoverSpin)
25
25
  </div>
26
26
  </template>
27
27
 
28
- <style lang="scss" scoped>
28
+ <style scoped>
29
29
  .blog-home-header-avatar {
30
- padding-top: 40px;
31
- display: flex;
32
- align-items: center;
33
-
34
- img {
35
- display: block;
36
- margin: 0 auto;
37
- width: 130px;
38
- height: 130px;
39
- border-radius: 50%;
40
- background-color: transparent;
41
- border: 5px solid rgba(var(--bg-gradient-home));
42
- box-sizing: border-box;
43
- cursor: pointer;
44
- }
45
-
46
- // img:hover {
47
- // transform: rotate(666turn);
48
- // transition-duration: 59s;
49
- // transition-timing-function: cubic-bezier(.34, 0, .84, 1)
50
- // }
30
+ padding-top: 40px;
31
+ display: flex;
32
+ align-items: center;
33
+ }
34
+ .blog-home-header-avatar img {
35
+ display: block;
36
+ margin: 0 auto;
37
+ width: 130px;
38
+ height: 130px;
39
+ border-radius: 50%;
40
+ background-color: transparent;
41
+ border: 5px solid rgba(var(--bg-gradient-home));
42
+ box-sizing: border-box;
43
+ cursor: pointer;
51
44
  }
52
45
 
53
46
  @media screen and (min-width: 768px) {
54
- .blog-home-header-avatar{
47
+ .blog-home-header-avatar {
55
48
  display: none;
56
49
  }
57
50
  }
@@ -21,7 +21,7 @@ import BlogFriendLink from './BlogFriendLink.vue'
21
21
  </div>
22
22
  </template>
23
23
 
24
- <style lang="scss" scoped>
24
+ <style scoped>
25
25
  .blog-info {
26
26
  display: flex;
27
27
  flex-direction: column;
@@ -60,7 +60,7 @@ const titles = computed(() => (frontmatter.value?.blog?.analysis?.articles?.titl
60
60
  </div>
61
61
  </template>
62
62
 
63
- <style lang="scss" scoped>
63
+ <style scoped>
64
64
  .card {
65
65
  position: relative;
66
66
  margin: 0 auto 10px;
@@ -74,10 +74,9 @@ const titles = computed(() => (frontmatter.value?.blog?.analysis?.articles?.titl
74
74
  background-color: rgba(var(--bg-gradient));
75
75
  display: flex;
76
76
  flex-direction: column;
77
-
78
- &:hover {
79
- box-shadow: var(--box-shadow-hover);
80
- }
77
+ }
78
+ .card:hover {
79
+ box-shadow: var(--box-shadow-hover);
81
80
  }
82
81
 
83
82
  .overview-data {
@@ -101,15 +100,13 @@ const titles = computed(() => (frontmatter.value?.blog?.analysis?.articles?.titl
101
100
  align-items: center;
102
101
  position: relative;
103
102
  margin: 0 10px;
104
-
105
- .count {
106
- font-size: 18px;
107
- }
108
-
109
- .label {
110
- margin-top: 6px;
111
- font-size: 12px;
112
- color: var(--description-font-color);
113
- }
103
+ }
104
+ .overview-item .count {
105
+ font-size: 18px;
106
+ }
107
+ .overview-item .label {
108
+ margin-top: 6px;
109
+ font-size: 12px;
110
+ color: var(--description-font-color);
114
111
  }
115
112
  </style>
@@ -103,7 +103,7 @@ watch(
103
103
  </div>
104
104
  </template>
105
105
 
106
- <style lang="scss" scoped>
106
+ <style scoped>
107
107
  .card {
108
108
  position: relative;
109
109
  margin: 0 auto 10px;
@@ -116,10 +116,9 @@ watch(
116
116
  transition: all 0.3s;
117
117
  background-color: rgba(var(--bg-gradient));
118
118
  display: flex;
119
-
120
- &:hover {
121
- box-shadow: var(--box-shadow-hover);
122
- }
119
+ }
120
+ .card:hover {
121
+ box-shadow: var(--box-shadow-hover);
123
122
  }
124
123
 
125
124
  .card-header {
@@ -127,12 +126,11 @@ watch(
127
126
  width: 100%;
128
127
  justify-content: space-between;
129
128
  align-items: center;
130
-
131
- .title {
132
- font-size: 12px;
133
- display: flex;
134
- align-items: center;
135
- }
129
+ }
130
+ .card-header .title {
131
+ font-size: 12px;
132
+ display: flex;
133
+ align-items: center;
136
134
  }
137
135
 
138
136
  .tags {
@@ -143,11 +141,10 @@ watch(
143
141
  display: flex;
144
142
  flex-wrap: wrap;
145
143
  margin-top: 10px;
146
-
147
- li {
148
- margin-right: 10px;
149
- margin-bottom: 10px;
150
- cursor: pointer;
151
- }
144
+ }
145
+ .tag-list li {
146
+ margin-right: 10px;
147
+ margin-bottom: 10px;
148
+ cursor: pointer;
152
149
  }
153
150
  </style>