feat: switch theme color on theme toggling (#454)

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
Joaquín Sánchez 2022-12-19 23:37:23 +01:00 committed by GitHub
parent 6eef0fe25a
commit db8c2adaec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 35 additions and 101 deletions

View file

@ -4,7 +4,7 @@ import { isCI, isDevelopment } from 'std-env'
import { i18n } from './config/i18n'
import { pwa } from './config/pwa'
const isPreview = process.env.PULL_REQUEST === 'true'
const isPreview = process.env.PULL_REQUEST === 'true' || process.env.CONTEXT === 'deploy-preview' || process.env.CONTEXT === 'dev'
export default defineNuxtConfig({
typescript: {
@ -110,14 +110,10 @@ export default defineNuxtConfig({
class: 'overflow-x-hidden',
},
link: [
{ rel: 'icon', type: 'image/png', href: '/favicon.png' },
{ rel: 'alternate icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'icon', type: 'image/png', href: '/favicon-16x16.png', sizes: '16x16' },
{ rel: 'icon', type: 'image/png', href: '/favicon-32x32.png', sizes: '32x32' },
{ rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#ffffff' },
{ rel: 'apple-touch-icon', href: '/apple-touch-icon.png', sizes: '180x180' },
{ rel: 'icon', href: '/favicon.ico', sizes: 'any' },
{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' },
{ rel: 'apple-touch-icon', href: '/apple-touch-icon.png' },
],
meta: [{ name: 'theme-color', content: '#ffffff' }],
},
},
i18n,