✨ 迁移 Markdown 渲染并添加 Mermaid 预览和文章目录

This commit is contained in:
2026-11-15 22:05:13 +08:00
parent 293b743e50
commit 9d13e9aac2
14 changed files with 535 additions and 101 deletions
+9 -2
View File
@@ -1,6 +1,7 @@
<script setup lang="ts">
import type { NavigationMenuItem } from '@nuxt/ui';
import useColorModeStore from '~/stores/colorModeStore';
import { provideNavbarHeight } from '~/composables/useNavbarHeight';
const { colorMode } = storeToRefs(useColorModeStore());
@@ -63,6 +64,11 @@ const mounted = ref(false);
onMounted(() => {
mounted.value = true;
});
const navbarEl = ref<HTMLDivElement>();
const { height: navbarHeight } = useElementSize(navbarEl);
provideNavbarHeight(navbarHeight);
</script>
<template>
@@ -73,8 +79,8 @@ onMounted(() => {
class="flex flex-col relative transition-[height] duration-500 max-h-80 min-h-40">
<!-- header -->
<div
v-if="mounted"
@mouseenter="() => {
v-if="mounted"
@mouseenter="() => {
if(scrollY === 0) {
collapsed = false;
}
@@ -101,6 +107,7 @@ onMounted(() => {
</div>
<!-- navbar -->
<div
ref="navbarEl"
class="fixed z-10 w-full transition-all duration-500 dark:bg-gray-800/60 bg-old-neutral-50/40 backdrop-blur-sm dark:backdrop-blur-md">
<div class="flex justify-center items-center h-full">
<div class="flex-1 overflow-hidden">