Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add popover theme customize #7

Merged
merged 3 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 45 additions & 40 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,53 @@ export default defineAppConfig({
light: '/logo.svg',
dark: '/logo-dark.svg',
},
themeCustomize: true,
darkModeToggle: true,
nav: [{
title: 'Docs',
links: [{
title: 'Getting Started',
to: '/getting-started',
description: 'Start building your document with shadcn-docs-nuxt',
target: undefined,
}, {
title: 'API',
to: '/api',
description: 'Discover the configurations and exposed APIs.',
nav: [
{
title: 'Docs',
links: [{
title: 'Getting Started',
to: '/getting-started',
description: 'Start building your document with shadcn-docs-nuxt',
target: undefined,
}, {
title: 'API',
to: '/api',
description: 'Discover the configurations and exposed APIs.',
target: undefined,
}],
},
{
title: 'Credits',
links: [{
title: 'shadcn-ui',
to: 'https://ui.shadcn.com/',
description: 'For the beautiful component design & docs design',
target: '_blank',
}, {
title: 'shadcn-vue',
to: 'https://www.shadcn-vue.com/',
description: 'For the vue port of shadcn-ui & some docs component source',
target: '_blank',
}, {
title: 'Docus',
to: 'https://docus.dev/',
description: 'For inspiration & some docs component source',
target: '_blank',
}, {
title: 'Nuxt Content',
to: 'https://content.nuxt.com/',
description: 'Content made easy for Vue Developers',
target: '_blank',
}],
},
{
title: 'Use This Template',
to: '/getting-started/installation',
target: undefined,
}],
}, {
title: 'Credits',
links: [{
title: 'shadcn-ui',
to: 'https://ui.shadcn.com/',
description: 'For the beautiful component design & docs design',
target: '_blank',
}, {
title: 'shadcn-vue',
to: 'https://www.shadcn-vue.com/',
description: 'For the vue port of shadcn-ui & some docs component source',
target: '_blank',
}, {
title: 'Docus',
to: 'https://docus.dev/',
description: 'For inspiration & some docs component source',
target: '_blank',
}, {
title: 'Nuxt Content',
to: 'https://content.nuxt.com/',
description: 'Content made easy for Vue Developers',
target: '_blank',
}],
}, {
title: 'Use This Template',
to: '/getting-started/installation',
target: undefined,
}],
},
],
links: [{
icon: 'lucide:github',
to: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt',
Expand Down
8 changes: 8 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@
import Toaster from '@/components/ui/toast/Toaster.vue';

const config = useConfig();
const { themeClass, radius } = useThemes();

useSeoMeta({
description: config.value.site.description,
ogDescription: config.value.site.description,
ogImage: config.value.site.ogImage,
twitterCard: 'summary_large_image',
});

useServerHead({
htmlAttrs: {
class: themeClass.value,
style: `--radius: ${radius.value}rem;`,
},
});
</script>
Loading
Loading