-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
app.vue
71 lines (65 loc) · 1.61 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
66
67
68
69
70
71
<script setup lang="ts">
const title = 'AST Explorer'
const desc = 'A web tool to explore the ASTs generated by parsers.'
const url = 'https://ast.sxzz.dev/'
const ogImage = {
url: '/og.png',
width: 2560,
height: 1280,
type: 'image/png',
} as const
useServerSeoMeta({
title,
description: desc,
ogTitle: title,
ogDescription: desc,
ogImage,
ogUrl: url,
twitterTitle: title,
twitterDescription: desc,
twitterImage: ogImage,
twitterCard: 'summary_large_image',
})
useServerHeadSafe({
htmlAttrs: {
lang: 'en',
},
link: [
{ rel: 'icon', type: 'image/svg+xml', href: '/logo.svg', sizes: 'any' },
],
})
</script>
<template>
<Suspense>
<main flex="~ col" lg:h-screen>
<ClientOnly>
<Navbar border-b />
<div min-h-0 flex flex-1 flex-col gap2 lg:flex-row>
<AppSideBar
v-show="showSidebar && sideBarAvailable"
overflow-auto
border-r
lg:w-75
lg:flex-none
/>
<div min-w-0 flex flex-col gap2 lg:flex-1 lg:flex-row>
<InputContainer v-show="showInputEditor" min-w-0 flex-1 py1 />
<div
v-show="showInputEditor && showOutput"
border-t
lg:border-l
lg:border-t-none
/>
<OutputContainer v-show="showOutput" min-w-0 flex-1 py1 />
</div>
</div>
</ClientOnly>
</main>
<template #fallback>
<div flex="~ center" h-screen gap1 text-3xl font-bold>
<div i-ri:loader-4-fill animate-spin />
Loading...
</div>
</template>
</Suspense>
</template>