2021-12-24 vitesse-lite clone

This commit is contained in:
2021-12-24 11:43:10 +09:00
parent f7a10ba944
commit a454ae4664
35 changed files with 4439 additions and 17 deletions

50
src/pages/index.vue Normal file
View File

@@ -0,0 +1,50 @@
<script setup lang="ts">
const name = ref('')
const router = useRouter()
const go = () => {
if (name.value)
router.push(`/hi/${encodeURIComponent(name.value)}`)
}
</script>
<template>
<div>
<div i-carbon-campsite text-4xl inline-block />
<p>
<a rel="noreferrer" href="https://github.com/antfu/vitesse-lite" target="_blank">
Vitesse Lite
</a>
</p>
<p>
<em text-sm op75>Opinionated Vite Starter Template</em>
</p>
<div py-4 />
<input
id="input"
v-model="name"
placeholder="What's your name?"
type="text"
autocomplete="false"
p="x-4 y-2"
w="250px"
text="center"
bg="transparent"
border="~ rounded gray-200 dark:gray-700"
outline="none active:none"
@keydown.enter="go"
>
<div>
<button
class="m-3 text-sm btn"
:disabled="!name"
@click="go"
>
Go
</button>
</div>
</div>
</template>