Migration to Nuxt3

This commit is contained in:
2023-04-30 18:36:39 +02:00
parent ed2e1824c5
commit 0480b99865
170 changed files with 13890 additions and 3699 deletions

View File

@ -0,0 +1,29 @@
<template>
<button class="rounded-full p-1 hover:bg-slate-200 dark:hover:bg-slate-700" @click="changeTheme">
<div class="w-5 h-5 flex items-center justify-center">
<div v-if="current_theme === 'light'">
<img src="~/assets/images/icons/moon.svg" alt="Dark theme" class="h-full w-full" />
</div>
<div v-if="current_theme === 'dark'">
<img src="~/assets/images/icons/sun.svg" alt="Light theme" class="invert h-full w-full" />
</div>
</div>
</button>
</template>
<script setup lang="ts">
import { ref } from "vue";
const current_theme = ref("");
onMounted(() => {
current_theme.value = getTheme();
})
function changeTheme() {
flipTheme();
current_theme.value = getTheme();
applyTheme(current_theme.value);
}
</script>