Author SHA1 Message Date
Anthony Fu 46c9ae9675 chore: comment out parcel 2023-05-18 13:39:25 +02:00
Anthony Fu 060c08ecd1 chore: repro 2023-05-18 13:35:19 +02:00
Anthony Fu 69b4783b40 chore: update deps 2023-05-18 11:19:15 +02:00
rogepiandMickeyZheng 1ab3660e88 chore: update deps (#92)
Co-authored-by: MickeyZheng <mickeyzheng@cherrypicks.com>
2023-05-18 11:17:55 +02:00
Anthony Fu 4d6212751b chore: update deps 2023-05-10 18:03:30 +02:00
_lmmmmmm 9f216ea432 docs: add devtools (#88) 2023-05-04 13:33:59 +02:00
Anthony Fu 9ef5d4b1d1 fix: enable renderJsonPayloads, close #84 2023-04-12 11:43:34 +02:00
Anthony Fu b6a79728d2 chore: update deps 2023-04-11 22:07:56 +02:00
Anthony Fu 704918fa58 chore: update deps 2023-04-11 14:42:33 +02:00
Anthony Fu fa85c45af1 chore: disable reactivity transform 2023-03-17 08:48:06 +01:00
Anthony Fu 799410e42e feat: install @nuxt/devtools 2023-03-17 08:46:50 +01:00
Anthony Fu 8450b29d10 chore: update deps 2023-03-17 08:46:13 +01:00
Bogdan Ciuca 1c0b7d098b fix: type errors and warnings (#81) 2023-03-17 08:44:52 +01:00
Joaquín Sánchez a957421136 chore: include offline support (#79) 2023-02-22 11:31:26 +01:00
Joaquín SánchezandAnthony Fu ac3bac5513 feat: PWA using @vite-pwa/nuxt module with auto update strategy (#75)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2023-02-18 12:00:15 +01:00
Tolga Akkiraz 575149c356 chore: remove attributify workaround (#78) 2023-02-18 11:58:11 +01:00
Anthony Fu 86221d2c52 chore: update deps 2023-02-08 23:46:20 +01:00
Joaquín Sánchez c5df9d4959 docs: add license and funding (#76) 2023-02-07 17:20:33 +01:00
yuyin 48d3dcdd42 chore: update deps (#74) 2023-01-29 04:57:08 +01:00
_lmmmmmm 71e6127b16 chore: update nuxt3 link url (#72) 2022-12-13 10:38:42 +01:00
Oumar Barry 613b35cc7b chore: remove pnpm workaround for netlify (#70) 2022-12-13 10:38:26 +01:00
云游君 a814625790 fix: color.preference by @nuxtjs/color-mode@3.2.0 (#69) 2022-11-29 20:46:38 +08:00
EvanLong fe93f8d166 fix: rename 404.vue to [...all].vue (#67) 2022-11-27 16:10:51 +08:00
云游君 e92eb66e52 fix: toggleDark not works (#66) 2022-11-17 01:20:17 +08:00
Anthony Fu e2b9e7d23d chore: update deps 2022-11-16 23:49:03 +08:00
Anthony Fu 2342db4af0 chore: update deps 2022-11-13 13:02:15 +08:00
mohen aa66af82a8 fix: data.preview, data.value Object is possibly 'null'. (#63) 2022-11-02 17:36:40 +08:00
Anthony Fu 5b74fdd684 fix: upgrade to rc12 and fix UnoCSS FOUC 2022-11-01 15:00:43 +08:00
Cinob 1404cd0d12 refactor: defineNuxtConfig is auto imported (#62) 2022-10-09 16:07:57 +08:00
Anthony Fu 0467bd915a chore: update deps 2022-09-27 09:38:30 +08:00
菜狗 2698de3396 chores: add generate scripts (#59) 2022-09-06 00:17:08 +08:00
Anthony Fu 0836a3b7e4 chore: update deps 2022-08-30 19:04:49 +08:00
Anthony Fu a6d3353e1d chore: update deps 2022-08-26 02:11:19 +08:00
Arbust0 cabfc636f7 chore:layout typo (#55) 2022-08-21 21:35:39 +08:00
Anthony Fu 598f258ef4 chore: update deps 2022-08-04 23:10:28 +08:00
Anthony Fu 67428fdc37 fix: netlify workaround 2022-08-04 23:09:48 +08:00
Anthony Fu 45042088f7 chore: update lock 2022-07-22 14:38:58 +08:00
Anthony Fu 873a77754f feat: prepare nuxt on postinstall, close #51 2022-07-20 03:43:08 +08:00
Anthony Fu 3e29a5a8aa chore: update deps 2022-07-19 21:14:33 +08:00
Anthony Fu ea9b216f95 chore: update deps 2022-07-06 17:55:25 +08:00
Anthony Fu df99989c4d chore: update deps 2022-06-14 23:20:49 +08:00
Anthony Fu 1a38d24265 chore: update deps, close #44 2022-06-04 17:39:18 +08:00
Anthony Fu 3b3e7ecac3 chore: update deps 2022-05-12 17:41:14 +08:00
Anthony Fu ffb8725ac1 chore: update deps 2022-05-03 05:09:07 +08:00
Anthony Fu 687f89b058 chore: strict by default 2022-04-27 17:38:29 +08:00
Sébastien Chopin e7f0a4b7eb feat: improvements (#35)
* feat: improvements

* chore: upgrade to rc1
2022-04-21 11:32:24 +08:00
Hasan Demirtaş d42083f93f fix: color mode preference (#36) 2022-04-21 11:31:20 +08:00
Hasan Demirtaş b1eaea501a feat: introduce layouts (#28) 2022-04-20 23:28:49 +08:00
Hasan Demirtaş 7bfa84d907 fix: color mode (#33) 2022-04-20 23:27:38 +08:00
Lo 46175373e9 fix: <a> target (#34) 2022-04-20 23:27:18 +08:00
Anthony Fu 1ad36a1abb chore: update deps 2022-04-20 22:07:12 +08:00
Anthony Fu 3600c71eb6 chore: use nuxt package rc 2022-04-20 20:51:43 +08:00
Anthony Fu 6f1a843649 feat: use @nuxtjs/color-mode, close #24 2022-04-19 11:27:55 +08:00
Anthony Fu 64ee601c2b chore: update deps 2022-04-19 10:59:13 +08:00
Anthony Fu 6050e07123 feat: auto import for store 2022-04-19 10:57:23 +08:00
Anthony Fu 581b36d3aa feat: enable reactivityTransform 2022-04-19 10:55:43 +08:00
Johann Schopplich 2d2eef40c4 chore: buildModules is deprecated (#27) 2022-04-19 10:54:37 +08:00
Johann Schopplich d99e15b100 refactor: use defineEventHandler for server api (#26) 2022-04-19 10:52:47 +08:00
Anthony Fu 1a274da6c4 chore: update deps 2022-04-13 06:35:41 +08:00
Anthony Fu 792793090f chore: update deps 2022-04-08 15:12:25 +08:00
42 changed files with 7264 additions and 3537 deletions

No files matched your search

-4
View File
@@ -1,4 +0,0 @@
dist
node_modules
.output
.nuxt
+4 -1
View File
@@ -1,3 +1,6 @@
{
"extends": "@antfu"
"extends": [
"@antfu",
"@unocss"
]
}
+1
View File
@@ -0,0 +1 @@
github: antfu
+1
View File
@@ -4,3 +4,4 @@ dist
.output
.nuxt
.env
.idea/
+2
View File
@@ -1 +1,3 @@
shamefully-hoist=true
strict-peer-dependencies=false
shell-emulator=true
+10
View File
@@ -0,0 +1,10 @@
{
"recommendations": [
"antfu.iconify",
"antfu.unocss",
"antfu.goto-alias",
"csstools.postcss",
"dbaeumer.vscode-eslint",
"vue.volar"
]
}
+10
View File
@@ -0,0 +1,10 @@
{
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.associations": {
"*.css": "postcss"
},
"editor.formatOnSave": false
}
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021-PRESENT Anthony Fu<https://github.com/antfu>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+19 -12
View File
@@ -19,31 +19,39 @@
## Features
- [💚 Nuxt 3](https://v3.nuxtjs.org) - SSR, ESR, File-based routing, components auto importing, modules, etc.
- 💚 [Nuxt 3](https://nuxt.com/) - SSR, ESR, File-based routing, components auto importing, modules, etc.
- ⚡️ Vite - Instant HMR
- ⚡️ Vite - Instant HMR.
- 🎨 [UnoCSS](https://github.com/antfu/unocss) - The instant on-demand atomic CSS engine.
- 🎨 [UnoCSS](https://github.com/unocss/unocss) - The instant on-demand atomic CSS engine.
- 😃 Use icons from any icon sets in Pure CSS, powered by [UnoCSS](https://github.com/antfu/unocss)
- 😃 Use icons from any icon sets in Pure CSS, powered by [UnoCSS](https://github.com/unocss/unocss).
- 🔥 The `<script setup>` syntax
- 🔥 The `<script setup>` syntax.
- 🍍 [State Management via Pinia](https://pinia.esm.dev/)
- 🍍 [State Management via Pinia](https://github.com/vuejs/pinia), see [./composables/user.ts](./composables/user.ts).
- 📑 [Layout system](./layouts).
- 📥 APIs auto importing - for Composition API, VueUse and custom composables.
- 🏎 Zero-config cloud functions and deploy
- 🏎 Zero-config cloud functions and deploy.
- 🦾 TypeScript, of course.
- 📲 [PWA](https://github.com/vite-pwa/nuxt) with offline support and auto update behavior.
- 🦾 TypeScript, of course
## Plugins
### Nuxt Modules
- [VueUse](https://github.com/vueuse/vueuse) - collection of useful composition APIs
- [UnoCSS](https://github.com/antfu/unocss) - the instant on-demand atomic CSS engine.
- [Pinia](https://pinia.esm.dev/) - intuitive, type safe, light and flexible Store for Vue.
- [VueUse](https://github.com/vueuse/vueuse) - collection of useful composition APIs.
- [ColorMode](https://github.com/nuxt-modules/color-mode) - dark and Light mode with auto detection made easy with Nuxt.
- [UnoCSS](https://github.com/unocss/unocss) - the instant on-demand atomic CSS engine.
- [Pinia](https://github.com/vuejs/pinia) - intuitive, type safe, light and flexible Store for Vue.
- [VitePWA](https://github.com/vite-pwa/nuxt) - zero-config PWA Plugin for Nuxt 3.
- [DevTools](https://github.com/nuxt/devtools) - unleash Nuxt Developer Experience.
## IDE
@@ -53,7 +61,6 @@ We recommend using [VS Code](https://code.visualstudio.com/) with [Volar](https:
- [vitesse](https://github.com/antfu/vitesse) - Opinionated Vite Starter Template
- [vitesse-lite](https://github.com/antfu/vitesse-lite) - Lightweight version of Vitesse
- [vitesse-nuxt3](https://github.com/antfu/vitesse-nuxt3) - Vitesse for Nuxt 3
- [vitesse-nuxt-bridge](https://github.com/antfu/vitesse-nuxt-bridge) - Vitesse for Nuxt 2 with Bridge
- [vitesse-webext](https://github.com/antfu/vitesse-webext) - WebExtension Vite starter template
+21 -4
View File
@@ -1,10 +1,27 @@
<script setup lang="ts">
import { appName } from '~/constants'
useHead({
title: appName,
})
</script>
<template>
<main class="py-20 px-10 text-center">
<VitePwaManifest />
<NuxtLayout>
<NuxtPage />
<Footer />
</main>
</NuxtLayout>
</template>
<style>
@import '~/styles/main.css';
html, body , #__nuxt{
height: 100vh;
margin: 0;
padding: 0;
}
html.dark {
background: #222;
color: white;
}
</style>
+2 -2
View File
@@ -4,13 +4,13 @@ const { count, inc, dec } = useCount()
<template>
<div inline-flex m="y-3">
<button btn p-2 rounded-full @click="dec()">
<button rounded-full p-2 btn @click="dec()">
<div i-carbon-subtract />
</button>
<div font="mono" w="15" m-auto inline-block>
{{ count }}
</div>
<button btn p-2 rounded-full @click="inc()">
<button rounded-full p-2 btn @click="inc()">
<div i-carbon-add />
</button>
</div>
+13 -4
View File
@@ -1,12 +1,21 @@
<script setup lang='ts'>
<script setup lang="ts">
const color = useColorMode()
useHead({
meta: [{
id: 'theme-color',
name: 'theme-color',
content: () => color.value === 'dark' ? '#222222' : '#ffffff',
}],
})
function toggleDark() {
color.value = color.value === 'dark' ? 'light' : 'dark'
color.preference = color.value === 'dark' ? 'light' : 'dark'
}
</script>
<template>
<button class="!outline-none" @click="toggleDark()">
<div class="dark:i-carbon-moon i-carbon-sun" />
<button class="!outline-none" @click="toggleDark">
<div class="i-carbon-sun dark:i-carbon-moon" />
</button>
</template>
+2 -8
View File
@@ -1,13 +1,7 @@
<template>
<div
text="xl gray4"
m-5
flex
justify-center
gap-3
>
<div text="xl gray4" m-5 flex="~ gap3" justify-center>
<NuxtLink i-carbon-campsite to="/" />
<a i-carbon-logo-github href="https://github.com/antfu/vitesse-nuxt3" target="__blank" />
<a i-carbon-logo-github href="https://github.com/antfu/vitesse-nuxt3" target="_blank" />
<DarkToggle />
</div>
</template>
+5 -9
View File
@@ -2,7 +2,7 @@
const name = ref('')
const router = useRouter()
const go = () => {
function go() {
if (name.value)
router.push(`/hi/${encodeURIComponent(name.value)}`)
}
@@ -14,20 +14,16 @@ const go = () => {
id="input"
v-model="name"
placeholder="What's your name?"
type="text"
autocomplete="false"
p="x-4 y-2"
m="t-5"
w="250px"
text="center"
bg="transparent"
type="text" autocomplete="off"
p="x-4 y-2" m="t-5" 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"
m-3 text-sm btn
:disabled="!name"
@click="go"
>
+6 -9
View File
@@ -1,20 +1,17 @@
<template>
<div inline-flex text-2xl font-300 cursor-default>
<div inline-flex cursor-default text-2xl font-300>
<div flex flex-col children:mx-auto>
<img w-18 h-18 inline-block src="/nuxt.png">
<span text-green5 mt--2>Nuxt 3</span>
<img inline-block h-18 w-18 src="/nuxt.svg">
<span mt--2 text-green5>Nuxt 3</span>
</div>
<div
text="3xl gray4"
m="x-4 y-auto"
transition-all-500
transform
hover:rotate-135
i-carbon-add
i-carbon-add transform transition-all-500 hover:rotate-135
/>
<div flex flex-col children:mx-auto>
<img w-18 h-18 inline-block src="/vite.png">
<span text-purple5 mt--2>Vitesse</span>
<img inline-block h-18 w-18 src="/vite.png">
<span mt--2 text-purple5>Vitesse</span>
</div>
</div>
</template>
+2 -2
View File
@@ -1,12 +1,12 @@
<script setup lang="ts">
const { data } = await useFetch('/api/pageview')
const time = useTimeAgo(computed(() => data.value.startAt))
const time = useTimeAgo(() => data.value?.startAt || 0)
</script>
<template>
<div text-gray:80>
<span font-500 text-gray>{{ data.pageview }}</span>
<span font-500 text-gray>{{ data?.pageview }}</span>
page views since
<span text-gray>{{ time }}</span>
</div>
File renamed without changes.
+78
View File
@@ -0,0 +1,78 @@
import type { ModuleOptions } from '@vite-pwa/nuxt'
import { appDescription, appName } from '../constants/index'
const scope = '/'
export const pwa: ModuleOptions = {
registerType: 'autoUpdate',
scope,
base: scope,
manifest: {
id: scope,
scope,
name: appName,
short_name: appName,
description: appDescription,
theme_color: '#ffffff',
icons: [
{
src: 'pwa-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
},
{
src: 'maskable-icon.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
},
],
},
workbox: {
globPatterns: ['**/*.{js,css,html,txt,png,ico,svg}'],
navigateFallbackDenylist: [/^\/api\//],
navigateFallback: '/',
cleanupOutdatedCaches: true,
runtimeCaching: [
{
urlPattern: /^https:\/\/fonts.googleapis.com\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'google-fonts-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
{
urlPattern: /^https:\/\/fonts.gstatic.com\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'gstatic-fonts-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365, // <== 365 days
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
],
},
registerWebManifestInRouteRules: true,
writePlugin: true,
devOptions: {
enabled: process.env.VITE_PLUGIN_PWA === 'true',
navigateFallback: scope,
},
}
+2
View File
@@ -0,0 +1,2 @@
export const appName = 'Vitesse for Nuxt 3'
export const appDescription = 'Vitesse for Nuxt 3'
+15
View File
@@ -0,0 +1,15 @@
## Layouts
Vue components in this dir are used as layouts.
By default, `default.vue` will be used unless an alternative is specified in the route meta.
```html
<script setup lang="ts">
definePageMeta({
layout: 'home',
})
</script>
```
Learn more on https://nuxt.com/docs/guide/directory-structure/layouts
+9
View File
@@ -0,0 +1,9 @@
<template>
<main class="px-10 py-20 text-center">
<slot />
<Footer />
<div class="mx-auto mt-5 text-center text-sm opacity-25">
[Default Layout]
</div>
</main>
</template>
+9
View File
@@ -0,0 +1,9 @@
<template>
<main class="px-10 py-20 text-center">
<slot />
<Footer />
<div class="mx-auto mt-5 text-center text-sm opacity-25">
[Home Layout]
</div>
</main>
</template>
+1 -2
View File
@@ -1,10 +1,9 @@
[build.environment]
NPM_FLAGS = "--version"
NODE_VERSION = "16"
[build]
publish = "dist"
command = "npx pnpm i --store=node_modules/.pnpm-store && npx pnpm run build"
command = "pnpm run build"
[[redirects]]
from = "/*"
+53 -23
View File
@@ -1,34 +1,64 @@
import { defineNuxtConfig } from 'nuxt3'
import { pwa } from './config/pwa'
import { appDescription } from './constants/index'
export default defineNuxtConfig({
meta: {
title: 'Vitesse Nuxt 3',
link: [
{
rel: 'icon', type: 'image/png', href: '/nuxt.png',
},
],
},
buildModules: [
modules: [
'@vueuse/nuxt',
'@unocss/nuxt',
'@pinia/nuxt',
'@nuxtjs/color-mode',
'@vite-pwa/nuxt',
],
vueuse: {
ssrHandlers: true,
experimental: {
// when using generate, payload js assets included in sw precache manifest
// but missing on offline, disabling extraction it until fixed
payloadExtraction: false,
inlineSSRStyles: false,
renderJsonPayloads: true,
// watcher: 'parcel',
},
unocss: {
uno: true,
attributify: true,
preflight: true,
icons: {
scale: 1.2,
css: [
'@unocss/reset/tailwind.css',
],
colorMode: {
classSuffix: '',
},
shortcuts: [
['btn', 'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
nitro: {
esbuild: {
options: {
target: 'esnext',
},
},
prerender: {
crawlLinks: false,
routes: ['/'],
ignore: ['/hi'],
},
},
app: {
head: {
viewport: 'width=device-width,initial-scale=1',
link: [
{ rel: 'icon', href: '/favicon.ico', sizes: 'any' },
{ rel: 'icon', type: 'image/svg+xml', href: '/nuxt.svg' },
{ rel: 'apple-touch-icon', href: '/apple-touch-icon.png' },
],
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'description', content: appDescription },
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' },
],
},
// experimental: {
// viteNode: true,
// },
},
pwa,
devtools: {
enabled: true,
},
})
+24 -19
View File
@@ -1,29 +1,34 @@
{
"private": true,
"packageManager": "pnpm@8.5.1",
"scripts": {
"build": "nuxi build",
"dev": "nuxi dev",
"dev:pwa": "VITE_PLUGIN_PWA=true nuxi dev",
"start": "node .output/server/index.mjs",
"lint": "eslint ."
},
"dependencies": {
"pinia": "^2.0.12"
"typecheck": "vue-tsc --noEmit",
"lint": "eslint .",
"postinstall": "nuxi prepare",
"generate": "nuxi generate",
"start:generate": "npx serve .output/public"
},
"devDependencies": {
"@antfu/eslint-config": "^0.19.1",
"@iconify-json/carbon": "^1.1.2",
"@iconify-json/twemoji": "^1.1.2",
"@pinia/nuxt": "^0.1.8",
"@unocss/nuxt": "^0.30.8",
"@vueuse/nuxt": "^8.2.3",
"eslint": "^8.12.0",
"nuxt3": "^3.0.0-27478938.fdd6a91",
"typescript": "^4.6.3"
},
"pnpm": {
"overrides": {
"@nuxt/kit": "npm:@nuxt/kit-edge@latest",
"@nuxt/kit-edge": "latest"
}
"@antfu/eslint-config": "^0.38.6",
"@iconify-json/carbon": "^1.1.16",
"@iconify-json/twemoji": "^1.1.11",
"@nuxt/devtools": "npm:@nuxt/devtools-edge@latest",
"@nuxtjs/color-mode": "^3.2.0",
"@parcel/watcher": "^2.1.0",
"@pinia/nuxt": "^0.4.11",
"@unocss/eslint-config": "^0.51.13",
"@unocss/nuxt": "^0.51.13",
"@vite-pwa/nuxt": "^0.0.8",
"@vueuse/nuxt": "^10.1.2",
"consola": "^3.1.0",
"eslint": "^8.40.0",
"nuxt": "^3.5.0",
"pinia": "^2.1.1",
"typescript": "^5.0.4",
"vue-tsc": "^1.6.5"
}
}
+17
View File
@@ -0,0 +1,17 @@
<script setup lang="ts">
const router = useRouter()
</script>
<template>
<main p="x4 y10" text="center teal-700 dark:gray-200">
<div text-4xl>
<div i-carbon-warning inline-block />
</div>
<div>Not found</div>
<div>
<button text-sm btn m="3 t8" @click="router.back()">
Back
</button>
</div>
</main>
</template>
+7 -5
View File
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { useUserStore } from '~/stores/user'
const route = useRoute()
const user = useUserStore()
const name = route.params.id
@@ -8,11 +6,15 @@ const name = route.params.id
watchEffect(() => {
user.setNewName(route.params.id as string)
})
definePageMeta({
layout: 'home',
})
</script>
<template>
<div>
<div i-twemoji:waving-hand text-4xl inline-block animate-shake-x animate-duration-5000 />
<div i-twemoji:waving-hand inline-block animate-shake-x animate-duration-5000 text-4xl />
<h3 text-2xl font-500>
Hi,
</h3>
@@ -21,7 +23,7 @@ watchEffect(() => {
</div>
<template v-if="user.otherNames.length">
<p text-sm my-4>
<p my-4 text-sm>
<span op-50>Also as known as:</span>
<ul>
<li v-for="otherName in user.otherNames" :key="otherName">
@@ -37,7 +39,7 @@ watchEffect(() => {
<div>
<NuxtLink
class="btn m-3 text-sm"
class="m-3 text-sm btn"
to="/"
>
Back
+11 -2
View File
@@ -1,10 +1,19 @@
<script setup lang="ts">
const online = useOnline()
</script>
<template>
<div>
<Logos mb-6 />
<Suspense>
<PageView />
<ClientOnly>
<PageView v-if="online" />
<div v-else text-gray:80>
You're offline
</div>
</ClientOnly>
<template #fallback>
<div op50 italic>
<div italic op50>
<span animate-pulse>Loading...</span>
</div>
</template>
+6873 -3417
View File
File diff suppressed because it is too large. Load diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

+3
View File
@@ -0,0 +1,3 @@
<svg width="900" height="900" viewBox="0 0 900 900" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M504.908 750H839.476C850.103 750.001 860.542 747.229 869.745 741.963C878.948 736.696 886.589 729.121 891.9 719.999C897.211 710.876 900.005 700.529 900 689.997C899.995 679.465 897.193 669.12 891.873 660.002L667.187 274.289C661.876 265.169 654.237 257.595 645.036 252.329C635.835 247.064 625.398 244.291 614.773 244.291C604.149 244.291 593.711 247.064 584.511 252.329C575.31 257.595 567.67 265.169 562.36 274.289L504.908 372.979L392.581 179.993C387.266 170.874 379.623 163.301 370.42 158.036C361.216 152.772 350.777 150 340.151 150C329.525 150 319.086 152.772 309.883 158.036C300.679 163.301 293.036 170.874 287.721 179.993L8.12649 660.002C2.80743 669.12 0.00462935 679.465 5.72978e-06 689.997C-0.00461789 700.529 2.78909 710.876 8.10015 719.999C13.4112 729.121 21.0523 736.696 30.255 741.963C39.4576 747.229 49.8973 750.001 60.524 750H270.538C353.748 750 415.112 713.775 457.336 643.101L559.849 467.145L614.757 372.979L779.547 655.834H559.849L504.908 750ZM267.114 655.737L120.551 655.704L340.249 278.586L449.87 467.145L376.474 593.175C348.433 639.03 316.577 655.737 267.114 655.737Z" fill="#00DC82"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

+2
View File
@@ -0,0 +1,2 @@
User-agent: *
Allow: /
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

+2 -2
View File
@@ -1,7 +1,7 @@
const startAt = Date.now()
let count = 0
export default () => ({
export default defineEventHandler(() => ({
pageview: count++,
startAt,
})
}))
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "../.nuxt/tsconfig.server.json"
}
-12
View File
@@ -1,12 +0,0 @@
html,
body,
#app {
height: 100vh;
margin: 0;
padding: 0;
}
html.dark {
background: #222;
color: white;
}
+36
View File
@@ -0,0 +1,36 @@
import {
defineConfig,
presetAttributify,
presetIcons,
presetTypography,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
export default defineConfig({
shortcuts: [
['btn', 'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
],
presets: [
presetUno(),
presetAttributify(),
presetIcons({
scale: 1.2,
}),
presetTypography(),
presetWebFonts({
fonts: {
sans: 'DM Sans',
serif: 'DM Serif Display',
mono: 'DM Mono',
},
}),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
})