- Home.vue 完整重写为金铜色品牌风格 Vue 3 SFC - 新增 Hero 终端动画、功能卡片网格、架构可视化、快速开始等模块 - Layout.vue 修复 SPA 路由切换,正确隐藏 VitePress 默认导航 - custom.css 添加 .home-layout 覆盖规则 - index.js 修复未导入 Layout.vue 的问题 - index.md 精简 frontmatter
23 lines
573 B
Vue
23 lines
573 B
Vue
<script setup>
|
|
import DefaultTheme from 'vitepress/theme'
|
|
import { useRoute } from 'vitepress'
|
|
import { computed, watch, onUnmounted } from 'vue'
|
|
import Home from './Home.vue'
|
|
|
|
const route = useRoute()
|
|
const isHome = computed(() => route.path === '/' || route.path === '/index.html')
|
|
|
|
watch(isHome, (val) => {
|
|
document.documentElement.classList.toggle('home-layout', val)
|
|
}, { immediate: true })
|
|
|
|
onUnmounted(() => {
|
|
document.documentElement.classList.remove('home-layout')
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<Home v-if="isHome" />
|
|
<DefaultTheme.Layout v-else />
|
|
</template>
|