feat: add web manifest dark theme variants (#947)

This commit is contained in:
Joaquín Sánchez 2023-01-10 21:35:34 +01:00 committed by GitHub
parent 6e7813020e
commit 1b9fb99032
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 8 deletions

View file

@ -3,6 +3,7 @@ import type { LocaleObject } from '#i18n'
export function setupPageHeader() {
const { locale, locales, t } = useI18n()
const colorMode = useColorMode()
const buildInfo = useBuildInfo()
const localeMap = (locales.value as LocaleObject[]).reduce((acc, l) => {
@ -26,7 +27,7 @@ export function setupPageHeader() {
? () => [{
key: 'webmanifest',
rel: 'manifest',
href: `/manifest-${locale.value}.webmanifest`,
href: `/manifest-${locale.value}${colorMode.value === 'dark' ? '-dark' : ''}.webmanifest`,
}]
: [],
})