-
Notifications
You must be signed in to change notification settings - Fork 4
/
app.vue
55 lines (49 loc) · 1.72 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
<div class="flex flex-col h-full dark:text-white">
<NuxtLayout>
<header class="flex justify-between items-center p-3 bg-slate-200 dark:bg-slate-800">
<NuxtLink class="flex gap-1 items-center text-2xl" to="/">
<IconApp />
<span class="font-medium">Uptime<span class="font-light">Nuxt</span></span>
</NuxtLink>
<div class="flex gap-3 items-center">
<div class="flex gap-3 items-center">
<button class="btn" type="button" @click="handleDarkModeSwitch">
<IconDark class="w-6 h-auto" />
</button>
</div>
<NuxtLink class="btn" to="/monitoring/create">
<IconAddToList />
<span>Add monitoring</span>
</NuxtLink>
</div>
</header>
<main class="flex-1 p-3 bg-white dark:bg-slate-900">
<NuxtPage />
</main>
<footer class="flex justify-between p-3 bg-slate-200 dark:bg-slate-800">
<p>
Made with ❤ by
<NuxtLink target="_blank" to="https://github.com/misaon">
@misaon
</NuxtLink>
</p>
<p>
Powered by 💚 of
<NuxtLink target="_blank" to="https://github.com/nuxt/framework">
Nuxt 3
</NuxtLink>
</p>
</footer>
</NuxtLayout>
</div>
</template>
<script lang="ts" setup>
import IconApp from '~icons/material-symbols/shutter-speed'
import IconDark from '~icons/material-symbols/dark-mode-outline'
import IconAddToList from '~icons/material-symbols/playlist-add-circle-outline'
const colorMode = useColorMode()
function handleDarkModeSwitch () {
colorMode.preference = colorMode.preference === 'light' ? 'dark' : 'light'
}
</script>