Commit 327be90efa

327be90eface4ac77f70211ef9f5f705121b0e36

parent: 1b9e2bae35

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-06-11 02:55 UTC

collapsible type alias and color fix

Layout: unified · split

docs/.vitepress/theme/components/Collapsible.vue +20 −1
@@ -3,13 +3,14 @@ import { ref } from 'vue'
33
44const props = defineProps<{
55 title?: string
6 type?: 'tip' | 'warning' | 'danger'
67}>()
78
89const open = ref(false)
910</script>
1011
1112<template>
12 <details class="details custom-block" :open="open || undefined" @toggle="open = ($event.target as HTMLDetailsElement).open">
13 <details class="details custom-block" :class="type" :open="open || undefined" @toggle="open = ($event.target as HTMLDetailsElement).open">
1314 <summary>
1415 <span v-if="open" class="i-iconoir-nav-arrow-down collapsible-icon" />
1516 <span v-else class="i-iconoir-nav-arrow-right collapsible-icon" />
@@ -37,4 +38,22 @@ summary::-webkit-details-marker {
3738 height: 1em;
3839 flex-shrink: 0;
3940}
41
42.tip {
43 background-color: #042a20;
44 color: #a8f0cc;
45 border-color: #0a5c42;
46}
47
48.warning {
49 background-color: #413306;
50 color: #fee38b;
51 border-color: #86680e;
52}
53
54.danger {
55 background-color: #430a0a;
56 color: #fec8c8;
57 border-color: #981b1b;
58}
4059</style>
\ No newline at end of file
docs/.vitepress/theme/components/Highlight.vue +1 −1
@@ -43,7 +43,7 @@ defineProps({
4343}
4444
4545.warning {
46 background-color: #86680e;
46 background-color: #413306;
4747 color: #fee38b;
4848 border-color: #86680e;
4949}
docs/.vitepress/theme/index.ts +2 −1
@@ -57,6 +57,7 @@ export default {
5757 app.component('Feedback', Feedback)
5858 app.component('fb', Fb)
5959 app.component('Collapsible', Collapsible)
60 app.component('Fold', Collapsible)
6061 app.component('ScrapeTable', ScrapeTable)
6162 createMediumZoomProvider(app, router)
6263 app.use(
@@ -107,4 +108,4 @@ export default {
107108 ]
108109 )
109110 }
110} satisfies Theme
111} satisfies Theme
\ No newline at end of file