diff --git a/client/app.vue b/client/app.vue index be38f539..467e02a4 100644 --- a/client/app.vue +++ b/client/app.vue @@ -2,7 +2,9 @@ import { computed, ref } from 'vue' import type { SitemapDefinition } from '../src/runtime/types' import { loadShiki } from './composables/shiki' +import { colorMode } from './composables/rpc' import { data, refreshSources } from './composables/state' +import { useHead } from '#imports' await loadShiki() @@ -39,6 +41,12 @@ function resolveSitemapOptions(definition: SitemapDefinition) { return options } +useHead({ + htmlAttrs: { + class: () => colorMode.value || '', + }, +}) + const appSourcesExcluded = computed(() => data.value?.runtimeConfig?.excludeAppSources || []) const appSources = computed(() => (data.value?.globalSources || []).filter(s => s.sourceType === 'app')) const userSources = computed(() => (data.value?.globalSources || []).filter(s => s.sourceType === 'user')) @@ -67,9 +75,9 @@ const userSources = computed(() => (data.value?.globalSources || []).filter(s =>
@@ -151,7 +159,7 @@ const userSources = computed(() => (data.value?.globalSources || []).filter(s =>