Start work on dark-mode, fix heading scroll position

This commit is contained in:
Riyyi
2025-03-31 14:56:59 +02:00
parent c26c74a2fb
commit 4e81ca7ad4
18 changed files with 245 additions and 53 deletions
+18
View File
@@ -0,0 +1,18 @@
<template>
<h3>
<span :id="props.id"></span>
<a v-if="props.id && generate" :href="`#${props.id}`">
<slot />
</a>
<slot v-else />
</h3>
</template>
<script setup lang="ts">
import { computed, useRuntimeConfig } from "#imports"
const props = defineProps<{ id?: string }>()
const { headings } = useRuntimeConfig().public.mdc
const generate = computed(() => props.id && ((typeof headings?.anchorLinks === "boolean" && headings?.anchorLinks === true) || (typeof headings?.anchorLinks === "object" && headings?.anchorLinks?.h3)))
</script>