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'
3 3
4const props = defineProps<{ 4const props = defineProps<{
5 title?: string 5 title?: string
6 type?: 'tip' | 'warning' | 'danger'
6}>() 7}>()
7 8
8const open = ref(false) 9const open = ref(false)
9</script> 10</script>
10 11
11<template> 12<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">
13 <summary> 14 <summary>
14 <span v-if="open" class="i-iconoir-nav-arrow-down collapsible-icon" /> 15 <span v-if="open" class="i-iconoir-nav-arrow-down collapsible-icon" />
15 <span v-else class="i-iconoir-nav-arrow-right collapsible-icon" /> 16 <span v-else class="i-iconoir-nav-arrow-right collapsible-icon" />
@@ -37,4 +38,22 @@ summary::-webkit-details-marker {
37 height: 1em; 38 height: 1em;
38 flex-shrink: 0; 39 flex-shrink: 0;
39} 40}
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}
40</style>\ No newline at end of file 59</style>\ No newline at end of file
docs/.vitepress/theme/components/Highlight.vue +1 −1
@@ -43,7 +43,7 @@ defineProps({
43} 43}
44 44
45.warning { 45.warning {
46 background-color: #86680e; 46 background-color: #413306;
47 color: #fee38b; 47 color: #fee38b;
48 border-color: #86680e; 48 border-color: #86680e;
49} 49}
docs/.vitepress/theme/index.ts +2 −1
@@ -57,6 +57,7 @@ export default {
57 app.component('Feedback', Feedback) 57 app.component('Feedback', Feedback)
58 app.component('fb', Fb) 58 app.component('fb', Fb)
59 app.component('Collapsible', Collapsible) 59 app.component('Collapsible', Collapsible)
60 app.component('Fold', Collapsible)
60 app.component('ScrapeTable', ScrapeTable) 61 app.component('ScrapeTable', ScrapeTable)
61 createMediumZoomProvider(app, router) 62 createMediumZoomProvider(app, router)
62 app.use( 63 app.use(
@@ -107,4 +108,4 @@ export default {
107 ] 108 ]
108 ) 109 )
109 } 110 }
110} satisfies Theme 111} satisfies Theme\ No newline at end of file