diff --git a/docs/app/app.config.ts b/docs/app/app.config.ts index 7056ebb4..68049a60 100644 --- a/docs/app/app.config.ts +++ b/docs/app/app.config.ts @@ -4,6 +4,9 @@ export default defineAppConfig({ expand: true, duration: 5000 }, + theme: { + radius: 0.25 + }, ui: { colors: { primary: 'green', diff --git a/docs/app/app.vue b/docs/app/app.vue index 8b9fb4b9..63be6b09 100644 --- a/docs/app/app.vue +++ b/docs/app/app.vue @@ -52,6 +52,7 @@ const links = computed(() => { }) const color = computed(() => colorMode.value === 'dark' ? (colors as any)[appConfig.ui.colors.neutral][900] : 'white') +const radius = computed(() => `:root { --ui-radius: ${appConfig.theme.radius}rem; }`) useHead({ meta: [ @@ -62,6 +63,9 @@ useHead({ { rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' }, { rel: 'canonical', href: `https://ui.nuxt.com${withoutTrailingSlash(route.path)}` } ], + style: [ + { innerHTML: radius, id: 'nuxt-ui-radius', tagPriority: -2 } + ], htmlAttrs: { lang: 'en' } diff --git a/docs/app/components/Header.vue b/docs/app/components/Header.vue index 126fbe12..42199177 100644 --- a/docs/app/components/Header.vue +++ b/docs/app/components/Header.vue @@ -11,6 +11,12 @@ const config = useRuntimeConfig().public const navigation = inject>('navigation') // const items = computed(() => props.links.map(({ icon, ...link }) => link)) + +defineShortcuts({ + meta_g: () => { + window.open('https://github.com/nuxt/ui/tree/v3', '_blank') + } +})