feat(ui): add more favicon file formats (#374)

This commit is contained in:
Joaquín Sánchez 2022-12-08 10:55:54 +01:00 committed by GitHub
parent db2ac489bb
commit 431a431c1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 1 deletions

View file

@ -3,6 +3,7 @@ import { APP_NAME, STORAGE_KEY_LANG } from '~/constants'
export function setupPageHeader() {
const isDev = process.dev
const isPreview = useRuntimeConfig().public.env === 'staging'
const suffix = isDev || isPreview ? '-dev' : ''
const i18n = useI18n()
@ -15,7 +16,10 @@ export function setupPageHeader() {
class: 'overflow-x-hidden',
},
link: [
{ rel: 'icon', type: 'image/svg+png', href: isDev || isPreview ? '/favicon-dev.png' : '/favicon.png' },
{ rel: 'icon', type: 'image/svg+xml', href: `/favicon${suffix}.svg` },
{ rel: 'alternate icon', type: 'image/x-icon', href: `/favicon${suffix}.ico` },
{ rel: 'icon', type: 'image/png', href: `/favicon-16x16${suffix}.png`, sizes: '16x16' },
{ rel: 'icon', type: 'image/png', href: `/favicon-32x32${suffix}.png`, sizes: '32x32' },
],
})