From c71a5332bc44260b655d3ac894785e52d8516120 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 27 May 2026 01:38:36 +0000 Subject: [PATCH 1/2] feat: replace homepage with TUI interactive layout --- docs/.vitepress/theme/TuiHome.vue | 480 ++++++++++++++++++++++++++++++ docs/.vitepress/theme/index.ts | 22 +- docs/index.md | 49 +-- 3 files changed, 491 insertions(+), 60 deletions(-) create mode 100644 docs/.vitepress/theme/TuiHome.vue diff --git a/docs/.vitepress/theme/TuiHome.vue b/docs/.vitepress/theme/TuiHome.vue new file mode 100644 index 0000000..30c52ac --- /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 From 4f294cb53a3c596dd3bbcf2c1d481d88274251d9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 27 May 2026 01:39:25 +0000 Subject: [PATCH 2/2] fix: use tabindex=0 for accessible TUI focus --- docs/.vitepress/theme/TuiHome.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vitepress/theme/TuiHome.vue b/docs/.vitepress/theme/TuiHome.vue index 30c52ac..93aa6fd 100644 --- a/docs/.vitepress/theme/TuiHome.vue +++ b/docs/.vitepress/theme/TuiHome.vue @@ -104,7 +104,7 @@ onUnmounted(() => {