Commit 7090bc8698

7090bc86982cc64474ab175da6758f8eadbe6b28

parent: 301cb8e797

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-05-24 09:21 UTC

temari

Layout: unified · split

docs/.vitepress/theme/components/Collapsible.vue +20 −2
@@ -1,11 +1,19 @@
11<script setup lang="ts">
2import { ref } from 'vue'
2import { computed, ref } from 'vue'
33
44const props = defineProps<{
55 title?: string
66}>()
77
88const open = ref(false)
9
10const slug = computed(() => {
11 const text = props.title || 'Details'
12 return text
13 .toLowerCase()
14 .replace(/\s+/g, '-')
15 .replace(/[^\w-]/g, '')
16})
917</script>
1018
1119<template>
@@ -13,7 +21,10 @@ const open = ref(false)
1321 <summary>
1422 <span v-if="open" class="i-iconoir-nav-arrow-down collapsible-icon" />
1523 <span v-else class="i-iconoir-nav-arrow-right collapsible-icon" />
16 <h3 class="collapsible-title">{{ title || 'Details' }}</h3>
24 <h3 :id="slug" class="collapsible-title">
25 <a :href="`#${slug}`" class="header-anchor" aria-hidden="true"></a>
26 {{ title || 'Details' }}
27 </h3>
1728 </summary>
1829 <slot />
1930 </details>
@@ -47,5 +58,12 @@ summary::-webkit-details-marker {
4758 color: inherit;
4859 letter-spacing: inherit;
4960 border: none;
61 text-decoration: none;
62 display: inline;
63}
64
65/* Hide the anchor icon VitePress would normally show on hover */
66.collapsible-title .header-anchor {
67 display: none;
5068}
5169</style>
\ No newline at end of file
docs/.vitepress/theme/styles/style.scss −9
@@ -1636,15 +1636,6 @@ html.reduce-blur-effects {
16361636 }
16371637}
16381638
1639/* Collapsible: title="" renders as h3 for search indexing, reset visual styles */
1640.details summary h3 {
1641 margin: 0;
1642 font-size: inherit;
1643 font-weight: inherit;
1644 border: none;
1645 text-decoration: none;
1646}
1647
16481639.vp-doc .vp-card,
16491640.vp-doc .vp-card:hover,
16501641.vp-doc .vp-card:focus,