-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathapp.vue
65 lines (58 loc) · 1.48 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
56
57
58
59
60
61
62
63
64
65
<script setup>
const colorMode = useColorMode()
function toggleColorMode() {
colorMode.preference = colorMode.preference === 'dark' ? 'light' : 'dark'
}
useHead({
htmlAttrs: { lang: 'en' }
})
useSeoMeta({
title: 'NuxtHub Demo',
description:
'A Nuxt demo hosted with Edge-side rendering, authentication and queyring a SQLite database'
})
const links = [
{ label: 'Home', to: '/' },
{ label: 'Database', to: '/database' },
{ label: 'KV', to: '/kv' },
{ label: 'Blob', to: '/blob' }
]
</script>
<template>
<UContainer class="min-h-screen flex flex-col md:pt-12">
<div class="flex justify-between">
<UHorizontalNavigation :links="links" />
<UButton
square
variant="ghost"
color="black"
:icon="$colorMode.preference === 'dark' ? 'i-heroicons-moon' : 'i-heroicons-sun'"
@click="toggleColorMode"
/>
</div>
<NuxtPage />
<footer class="text-center mt-2">
<NuxtLink
href="https://github.com/nuxt-hub/core"
target="_blank"
class="text-sm text-gray-500 hover:text-gray-700"
>
GitHub
</NuxtLink>
·
<NuxtLink
href="https://twitter.com/nuxt_hub"
target="_blank"
class="text-sm text-gray-500 hover:text-gray-700"
>
Twitter
</NuxtLink>
</footer>
</UContainer>
<UNotifications />
</template>
<style lang="postcss">
body {
@apply font-sans text-gray-950 bg-gray-50 dark:bg-gray-950 dark:text-gray-50;
}
</style>