File tree 4 files changed +42
-0
lines changed
client/theme-default/styles
4 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,10 @@ This is a warning.
149
149
This is a dangerous warning.
150
150
:::
151
151
152
+ ::: success
153
+ This is a success notice.
154
+ :::
155
+
152
156
::: details
153
157
This is a details block.
154
158
:::
@@ -172,6 +176,10 @@ This is a warning.
172
176
This is a dangerous warning.
173
177
:::
174
178
179
+ ::: success
180
+ This is a success notice.
181
+ :::
182
+
175
183
::: details
176
184
This is a details block.
177
185
:::
@@ -218,6 +226,7 @@ export default defineConfig({
218
226
warningLabel: ' 警告' ,
219
227
dangerLabel: ' 危险' ,
220
228
infoLabel: ' 信息' ,
229
+ successLabel: ' 成功' ,
221
230
detailsLabel: ' 详细信息'
222
231
}
223
232
}
Original file line number Diff line number Diff line change 166
166
background-color : var (--vp-custom-block-details-code-bg );
167
167
}
168
168
169
+ .custom-block .success {
170
+ border-color : var (--vp-custom-block-success-border );
171
+ color : var (--vp-custom-block-success-text );
172
+ background-color : var (--vp-custom-block-success-bg );
173
+ }
174
+
175
+ .custom-block .success a ,
176
+ .custom-block .success code {
177
+ color : var (--vp-c-brand-1 );
178
+ }
179
+
180
+ .custom-block .success a : hover ,
181
+ .custom-block .success a : hover > code {
182
+ color : var (--vp-c-brand-2 );
183
+ }
184
+
185
+ .custom-block .success code {
186
+ background-color : var (--vp-custom-block-success-code-bg );
187
+ }
188
+
169
189
.custom-block-title {
170
190
font-weight : 600 ;
171
191
}
Original file line number Diff line number Diff line change 446
446
--vp-custom-block-caution-bg : var (--vp-c-caution-soft );
447
447
--vp-custom-block-caution-code-bg : var (--vp-c-caution-soft );
448
448
449
+ --vp-custom-block-success-border : transparent;
450
+ --vp-custom-block-success-text : var (--vp-c-text-1 );
451
+ --vp-custom-block-success-bg : var (--vp-c-success-soft );
452
+ --vp-custom-block-success-code-bg : var (--vp-c-success-soft );
453
+
449
454
--vp-custom-block-details-border : var (--vp-custom-block-info-border );
450
455
--vp-custom-block-details-text : var (--vp-custom-block-info-text );
451
456
--vp-custom-block-details-bg : var (--vp-custom-block-info-bg );
Original file line number Diff line number Diff line change @@ -32,6 +32,13 @@ export const containerPlugin = (
32
32
md
33
33
)
34
34
)
35
+ . use (
36
+ ...createContainer (
37
+ 'success' ,
38
+ containerOptions ?. successLabel || 'SUCCESS' ,
39
+ md
40
+ )
41
+ )
35
42
. use (
36
43
...createContainer (
37
44
'details' ,
@@ -138,4 +145,5 @@ export interface ContainerOptions {
138
145
detailsLabel ?: string
139
146
importantLabel ?: string
140
147
cautionLabel ?: string
148
+ successLabel ?: string
141
149
}
You can’t perform that action at this time.
0 commit comments