-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.vue
47 lines (40 loc) · 1.03 KB
/
index.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
<script setup lang="ts">
defineOptions({
name: 'IndexPage',
})
const user = useUserStore()
const name = ref(user.savedName)
const router = useRouter()
function go() {
if (name.value)
router.push(`/hi/${encodeURIComponent(name.value)}`)
}
const { t } = useI18n()
</script>
<template>
<div>
<div class="text-4xl">
<i-carbon-campsite class="inline-block" />
</div>
<p>
<a rel="noreferrer" href="https://github.com/mustafamasa/vitesse-tailwind" target="_blank">
Vitesse + Tailwind CSS
</a>
</p>
<p>
<em class="text-sm opacity-75">{{ t('intro.desc') }}</em>
</p>
<div class="py-4" />
<TheInput v-model="name" :placeholder="t('intro.whats-your-name')" autocomplete="false" @keydown.enter="go" />
<label class="hidden" for="input">{{ t('intro.whats-your-name') }}</label>
<div>
<button class="btn m-3 text-sm" :disabled="!name" @click="go">
{{ t('button.go') }}
</button>
</div>
</div>
</template>
<route lang="yaml">
meta:
layout: home
</route>