mirror of
https://github.com/Kizuren/kizuren.dev.git
synced 2025-12-21 21:16:12 +01:00
40 lines
No EOL
628 B
Vue
40 lines
No EOL
628 B
Vue
<template>
|
|
<UApp>
|
|
<NuxtLayout>
|
|
<NuxtPage />
|
|
</NuxtLayout>
|
|
</UApp>
|
|
</template>
|
|
|
|
<script setup>
|
|
const colorMode = useColorMode()
|
|
|
|
const favicon = computed(() => {
|
|
const timestamp = Date.now()
|
|
return colorMode.value === 'dark'
|
|
? `/favicon_black.ico?t=${timestamp}`
|
|
: `/favicon.ico?t=${timestamp}`
|
|
})
|
|
|
|
useHead({
|
|
link: [
|
|
{
|
|
rel: 'icon',
|
|
type: 'image/x-icon',
|
|
href: favicon.value,
|
|
},
|
|
],
|
|
})
|
|
|
|
watch(() => colorMode.value, () => {
|
|
useHead({
|
|
link: [
|
|
{
|
|
rel: 'icon',
|
|
type: 'image/x-icon',
|
|
href: favicon.value,
|
|
},
|
|
],
|
|
})
|
|
})
|
|
</script> |