feat: PWA using @vite-pwa/nuxt module with auto update strategy (#75)

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
Joaquín SánchezandAnthony Fu authored and GitHub committed 2023-02-18 12:00:15 +01:00
1 parent 575149c356
commit ac3bac5513
20 files changed
+2558 -705

No files matched your search

+8
View File
@@ -1,6 +1,14 @@
<script setup lang="ts">
const color = useColorMode()
useHead({
meta: [{
id: 'theme-color',
name: 'theme-color',
content: () => color.value === 'dark' ? '#222222' : '#ffffff',
}],
})
function toggleDark() {
color.preference = color.value === 'dark' ? 'light' : 'dark'
}