mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 20:22:15 +01:00
add light mode
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, watch } from "vue";
|
||||
import { theme } from "@/utils/theme.js";
|
||||
|
||||
onMounted(async () => {
|
||||
document.documentElement.classList.add(theme.value);
|
||||
watch(theme, (newTheme, oldTheme) => {
|
||||
document.documentElement.classList.remove(oldTheme);
|
||||
document.documentElement.classList.add(newTheme);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-default-background">
|
||||
|
||||
Reference in New Issue
Block a user