generated from roguesherlock/nuxt-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
33 lines (31 loc) · 830 Bytes
/
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
<script setup lang="ts">
import { useMagicKeys } from "@vueuse/core"
const config = useRuntimeConfig()
const keys = useMagicKeys()
const b = keys["b"]
const cntrlO = keys["Control+o"]
const cntrlI = keys["Control+i"]
const router = useRouter()
whenever(b, () => router.go(-1))
whenever(cntrlO, () => router.go(-1))
whenever(cntrlI, () => router.go(1))
useHead({
titleTemplate: titleChunk => {
return titleChunk
? `${titleChunk} ${config.public.titleSeparator} ${config.public.siteName}`
: config.public.siteName
},
})
</script>
<template>
<main class="relative md:flex md:flex-row">
<ToastProvider />
<AppHeader />
<div class="mx-auto max-w-xl flex-grow basis-full">
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
<div class="md:flex-1"></div>
</main>
</template>