From e454f3f4418a3329a7de2c4d32830c8159c1ce89 Mon Sep 17 00:00:00 2001 From: estel <690930@qq.com> Date: Sat, 26 Jul 2025 23:04:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5=E5=8D=A1?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.config.ts | 209 +++++++++++++++++++++++ app/components/IndexCard.vue | 88 ++++++++++ app/components/IndexHero.vue | 25 +++ app/components/docs/DocsAsideLeftTop.vue | 1 - app/pages/index.vue | 16 +- content/1.简单文档/.navigation.yml | 3 +- content/1.简单文档/1.index.md | 4 +- 7 files changed, 330 insertions(+), 16 deletions(-) create mode 100644 app/components/IndexCard.vue create mode 100644 app/components/IndexHero.vue diff --git a/app/app.config.ts b/app/app.config.ts index 8f122b2..a73b448 100644 --- a/app/app.config.ts +++ b/app/app.config.ts @@ -37,6 +37,215 @@ export default defineAppConfig({ root: 'border-t border-default', left: 'text-sm text-muted' } + }, + pageCard: { + slots: { + root: 'relative flex rounded-lg', + spotlight: 'absolute inset-0 rounded-[inherit] pointer-events-none bg-default/90', + container: 'relative flex flex-col flex-1 lg:grid gap-x-8 gap-y-4 p-4 sm:p-6', + wrapper: 'flex flex-col flex-1 items-start', + header: 'mb-4', + body: 'flex-1', + footer: 'pt-4 mt-auto', + leading: 'inline-flex items-center mb-2.5', + leadingIcon: 'size-5 shrink-0 text-primary', + title: 'text-base text-pretty font-semibold text-highlighted', + description: 'text-[15px] text-pretty' + }, + variants: { + orientation: { + horizontal: { + container: 'lg:grid-cols-2 lg:items-center' + }, + vertical: { + container: '' + } + }, + reverse: { + true: { + wrapper: 'lg:order-last' + } + }, + variant: { + solid: { + root: 'bg-inverted text-inverted', + title: 'text-inverted', + description: 'text-dimmed' + }, + outline: { + root: 'bg-default ring ring-default', + description: 'text-muted' + }, + soft: { + root: 'bg-elevated/50', + description: 'text-toned' + }, + subtle: { + root: 'bg-elevated/50 ring ring-default', + description: 'text-toned' + }, + ghost: { + description: 'text-muted' + }, + naked: { + container: 'p-0 sm:p-0', + description: 'text-muted' + } + }, + to: { + true: { + root: [ + 'transition' + ] + } + }, + title: { + true: { + description: 'mt-1' + } + }, + highlight: { + true: { + root: 'ring-2' + } + }, + highlightColor: { + primary: '', + secondary: '', + success: '', + info: '', + warning: '', + error: '', + neutral: '' + }, + spotlight: { + true: { + root: '[--spotlight-size:400px] before:absolute before:-inset-px before:pointer-events-none before:rounded-[inherit] before:bg-[radial-gradient(var(--spotlight-size)_var(--spotlight-size)_at_calc(var(--spotlight-x,0px))_calc(var(--spotlight-y,0px)),var(--spotlight-color),transparent_70%)]' + } + }, + spotlightColor: { + primary: '', + secondary: '', + success: '', + info: '', + warning: '', + error: '', + neutral: '' + } + }, + compoundVariants: [ + { + variant: 'solid', + to: true, + class: { + root: 'hover:bg-inverted/90' + } + }, + { + variant: 'outline', + to: true, + class: { + root: 'hover:bg-elevated/50' + } + }, + { + variant: 'soft', + to: true, + class: { + root: 'hover:bg-elevated' + } + }, + { + variant: 'subtle', + to: true, + class: { + root: 'hover:bg-elevated' + } + }, + { + variant: 'subtle', + to: true, + highlight: false, + class: { + root: 'hover:ring-accented' + } + }, + { + variant: 'ghost', + to: true, + class: { + root: 'hover:bg-elevated/50' + } + }, + { + highlightColor: 'primary', + highlight: true, + class: { + root: 'ring-primary' + } + }, + { + highlightColor: 'neutral', + highlight: true, + class: { + root: 'ring-inverted' + } + }, + { + spotlightColor: 'primary', + spotlight: true, + class: { + root: '[--spotlight-color:var(--ui-primary)]' + } + }, + { + spotlightColor: 'secondary', + spotlight: true, + class: { + root: '[--spotlight-color:var(--ui-secondary)]' + } + }, + { + spotlightColor: 'success', + spotlight: true, + class: { + root: '[--spotlight-color:var(--ui-success)]' + } + }, + { + spotlightColor: 'info', + spotlight: true, + class: { + root: '[--spotlight-color:var(--ui-info)]' + } + }, + { + spotlightColor: 'warning', + spotlight: true, + class: { + root: '[--spotlight-color:var(--ui-warning)]' + } + }, + { + spotlightColor: 'error', + spotlight: true, + class: { + root: '[--spotlight-color:var(--ui-error)]' + } + }, + { + spotlightColor: 'neutral', + spotlight: true, + class: { + root: '[--spotlight-color:var(--ui-bg-inverted)]' + } + } + ], + defaultVariants: { + variant: 'outline', + highlightColor: 'primary', + spotlightColor: 'primary' + } } }, seo: { diff --git a/app/components/IndexCard.vue b/app/components/IndexCard.vue new file mode 100644 index 0000000..cb45177 --- /dev/null +++ b/app/components/IndexCard.vue @@ -0,0 +1,88 @@ + + + + + + + + + + {{ item.title }} + + + {{ getChildrenCount(item) }}篇 + + + + + + + + + + {{ child.title }} + + + + + + + + + + \ No newline at end of file diff --git a/app/components/IndexHero.vue b/app/components/IndexHero.vue new file mode 100644 index 0000000..914cd43 --- /dev/null +++ b/app/components/IndexHero.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/app/components/docs/DocsAsideLeftTop.vue b/app/components/docs/DocsAsideLeftTop.vue index c3dcee6..d920442 100644 --- a/app/components/docs/DocsAsideLeftTop.vue +++ b/app/components/docs/DocsAsideLeftTop.vue @@ -35,7 +35,6 @@ const items = ref([ label: 'Components', icon: 'i-lucide-box', to: '/components', - active: true, children: [ { label: 'Link', diff --git a/app/pages/index.vue b/app/pages/index.vue index 9d3ecaa..5f60bfb 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -3,13 +3,8 @@ definePageMeta({ layout: 'default' }) -const { data: page } = await useAsyncData('index', () => queryCollection('landing').path('/').first()) -if (!page.value) { - throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true }) -} - -const title = page.value.seo?.title || page.value.title -const description = page.value.seo?.description || page.value.description +const title = "Estel Docs" +const description = "Estel Docs" useSeoMeta({ titleTemplate: '', @@ -23,9 +18,6 @@ useSeoMeta({ - + + diff --git a/content/1.简单文档/.navigation.yml b/content/1.简单文档/.navigation.yml index 9689ca3..9eef121 100644 --- a/content/1.简单文档/.navigation.yml +++ b/content/1.简单文档/.navigation.yml @@ -1,2 +1,3 @@ title: 简单文档 -icon: i-lucide-book-open +description: 一个简约但功能强大的开源文档系统 +icon: i-lucide-rocket diff --git a/content/1.简单文档/1.index.md b/content/1.简单文档/1.index.md index 7a29aa2..6f009f5 100644 --- a/content/1.简单文档/1.index.md +++ b/content/1.简单文档/1.index.md @@ -1,6 +1,6 @@ --- -title: Introduction -description: Welcome to Nuxt UI Pro documentation template. +title: 入门指南 +description: 欢迎使用简单文档 navigation: icon: i-lucide-house ---