feat: update UI

This commit is contained in:
Anthony Fu committed 2021-11-05 11:46:29 +08:00
1 parent ec47efbd15
commit c338533e34
8 files changed
+31 -13

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
<template> <template>
<main class="py-20 px-10 text-center"> <main class="py-20 px-10 text-center">
<NuxtPage /> <NuxtPage />
<Footer />
</main> </main>
</template> </template>
+6 -6
View File
@@ -3,15 +3,15 @@ const { count, inc, dec } = useCount()
</script> </script>
<template> <template>
<div m="y-3"> <div inline-flex m="y-3">
<button class="btn" @click="dec()"> <button btn class="!p-2" @click="dec()">
- <div i-carbon-subtract></div>
</button> </button>
<div font="mono" w="15" inline-block> <div font="mono" w="15" m-auto inline-block>
{{ count }} {{ count }}
</div> </div>
<button class="btn" @click="inc()"> <button btn class="!p-2" @click="inc()">
+ <div i-carbon-add></div>
</button> </button>
</div> </div>
</template> </template>
+2 -1
View File
@@ -6,7 +6,8 @@
justify-center justify-center
gap-2 gap-2
> >
<a i-carbon-campsite href="https://github.com/antfu/vitesse-nuxt3" target="__blank" /> <NuxtLink i-carbon-campsite to="/" />
<a i-carbon-logo-github href="https://github.com/antfu/vitesse-nuxt3" target="__blank" />
<DarkToggle /> <DarkToggle />
</div> </div>
</template> </template>
+1
View File
@@ -16,6 +16,7 @@ const go = () => {
type="text" type="text"
autocomplete="false" autocomplete="false"
p="x-4 y-2" p="x-4 y-2"
m="t-5"
w="250px" w="250px"
text="center" text="center"
bg="transparent" bg="transparent"
+2 -2
View File
@@ -3,7 +3,7 @@ const { data } = await useFetch('/api/pageview')
</script> </script>
<template> <template>
<div> <div op50>
Page view: {{ data.pageview }} Pageview: {{ data.pageview }}
</div> </div>
</template> </template>
+3
View File
@@ -2,6 +2,9 @@ import { defineNuxtConfig } from 'nuxt3'
import { presetAttributify, presetUno, presetIcons } from 'unocss' import { presetAttributify, presetUno, presetIcons } from 'unocss'
export default defineNuxtConfig({ export default defineNuxtConfig({
meta: {
title: 'Vitesse Nuxt 3',
},
buildModules: [ buildModules: [
'@vueuse/core/nuxt', '@vueuse/core/nuxt',
'@unocss/nuxt', '@unocss/nuxt',
+7 -1
View File
@@ -1,10 +1,16 @@
<script setup lang="ts"> <script setup lang="ts">
const route = useRoute() const route = useRoute()
const name = route.params.id
</script> </script>
<template> <template>
<div> <div>
<div>Hi: {{ route.params.id }}</div> <div i-twemoji:waving-hand text-4xl inline-block animate-bounce></div>
<h3 text-2xl>
Hi!
</h3>
<div>{{ name }}</div>
<div> <div>
<NuxtLink <NuxtLink
+9 -3
View File
@@ -2,13 +2,19 @@
<div> <div>
<img w-16 inline-block src="/nuxt.png" /> <img w-16 inline-block src="/nuxt.png" />
<img w-16 inline-block src="/vite.png" /> <img w-16 inline-block src="/vite.png" />
<h1 mt-1 mb-3 text-2xl cursor-default> <h1 mt-1 text-2xl cursor-default>
<span text-green-500 hover:text-white hover:bg-green-600>Nuxt 3</span> <span text-green-500 hover:text-white hover:bg-green-600>Nuxt 3</span>
<span text-gray-400 mx-2>+</span> <span text-gray-400 mx-2>+</span>
<span text-purple-500>Vitesse</span> <span text-purple-500>Vitesse</span>
</h1> </h1>
<InputEntry /> <Suspense>
<PageView /> <PageView />
<Footer /> <template #fallback>
<div op50 italic animate-pulse>
Loading...
</div>
</template>
</Suspense>
<InputEntry />
</div> </div>
</template> </template>