diff --git a/docs/.vitepress/theme/TuiHome.vue b/docs/.vitepress/theme/TuiHome.vue new file mode 100644 index 0000000..93aa6fd --- /dev/null +++ b/docs/.vitepress/theme/TuiHome.vue @@ -0,0 +1,480 @@ + + + + + diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 4e494f2..c4f1a85 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -2,25 +2,21 @@ import { h } from 'vue' import type { Theme } from 'vitepress' import DefaultTheme from 'vitepress/theme' +import { useData } from 'vitepress' import './style.css' +import TuiHome from './TuiHome.vue' export default { extends: DefaultTheme, Layout: () => { - return h(DefaultTheme.Layout, null, { - // https://vitepress.dev/guide/extending-default-theme#layout-slots - 'home-hero-before': () => h('div', { class: 'cli-startup' }, [ - h('pre', { class: 'startup-text' }, ` -╔═══════════════════════════════════════╗ -║ Lo7ong Technical Documentation ║ -║ System Ready • Version 1.0 ║ -╚═══════════════════════════════════════╝ - `) - ]) - }) + const { frontmatter } = useData() + // Render the full TUI homepage when requested + if (frontmatter.value.layout === 'tuiHome') { + return h(TuiHome) + } + return h(DefaultTheme.Layout, null, {}) }, - enhanceApp({ app, router, siteData }) { - // 添加页面加载动画 + enhanceApp({ router }) { if (typeof window !== 'undefined') { router.onBeforeRouteChange = () => { console.log('%c[System] Loading page...', 'color: #3fb950; font-family: monospace;') diff --git a/docs/index.md b/docs/index.md index 73af53a..5fb1ff8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,48 +1,3 @@ --- -layout: home - -hero: - name: "$ Lo7ong_Hub" - text: "Technical.Documentation.System" - tagline: "CLI-styled dev blog • Terminal aesthetics • Code-first content" - actions: - - theme: brand - text: ./documentation - link: /markdown-examples - - theme: alt - text: ./api-reference - link: /api-examples - -features: - - icon: 📟 - title: Terminal-First Design - details: Immersive CLI experience with monospace fonts, syntax highlighting, and command-line aesthetics - - icon: ⚡ - title: Fast & Lightweight - details: Built with VitePress for instant page loads and smooth navigation - - icon: 🎨 - title: Developer Focused - details: Optimized for technical content, code snippets, and API documentation - - icon: 🔍 - title: Search Everything - details: Powerful local search to find any command or documentation instantly - - icon: 📱 - title: Responsive - details: Works perfectly on desktop, tablet, and mobile devices - - icon: 🌙 - title: Dark Theme - details: Eye-friendly dark theme inspired by popular terminal emulators ---- - - \ No newline at end of file +layout: tuiHome +--- \ No newline at end of file