Compare commits
13 Commits
chore/upgr
...
main
Author | SHA1 | Date | |
---|---|---|---|
d349196139 | |||
80948492e5 | |||
d3e82d46a1 | |||
1849b79e21 | |||
061694cabc | |||
c2e28a90d7 | |||
0678008e3b | |||
|
12c56497b5 | ||
|
d62b83b0b7 | ||
|
cc7f7fe146 | ||
|
99c52ed4e5 | ||
|
a10bb5bd9c | ||
|
0bd792022a |
48
.drone.yml
Normal file
48
.drone.yml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: install & build # 流水线名称
|
||||||
|
image: node # 定义创建容器的Docker镜像
|
||||||
|
commands: # 定义在Docker容器中执行的shell命令
|
||||||
|
- npm config set registry http://mirrors.cloud.tencent.com/npm/
|
||||||
|
- npm i -g pnpm
|
||||||
|
- pnpm i
|
||||||
|
- pnpm run build
|
||||||
|
|
||||||
|
- name: upload
|
||||||
|
image: appleboy/drone-scp # 上传插件
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: host # 作为环境变量传进来
|
||||||
|
username:
|
||||||
|
from_secret: username
|
||||||
|
password:
|
||||||
|
from_secret: password
|
||||||
|
port: 22
|
||||||
|
command_timeout: 2m
|
||||||
|
target: /home/hxx/app/NginxProxyManager/data/access/myIndex/${DRONE_REPO_NAME}_new # 这里的${DRONE_REPO_NAME}是vitesse
|
||||||
|
source:
|
||||||
|
- ./dist # 相对路径, 绝对路径是/app/dist
|
||||||
|
|
||||||
|
- name: deploy # 部署
|
||||||
|
image: appleboy/drone-ssh # ssh插件
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: host
|
||||||
|
username:
|
||||||
|
from_secret: username
|
||||||
|
password:
|
||||||
|
from_secret: password
|
||||||
|
port: 22
|
||||||
|
command_timeout: 2m
|
||||||
|
envs: [DEPLOY_PATH] # 给 script 用
|
||||||
|
script:
|
||||||
|
- cd /home/hxx/app/NginxProxyManager/data/access/myIndex/
|
||||||
|
- rm -rf vitesse_old
|
||||||
|
- mv vitesse vitesse_old
|
||||||
|
- mv vitesse_new vitesse
|
||||||
|
- cd vitesse
|
||||||
|
- mv ./dist/* ./
|
||||||
|
- rm -rf ./dist
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -47,7 +47,7 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [14.x, 16.x]
|
node-version: [16.x, 18.x]
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
|
@ -48,8 +48,6 @@ Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
|
|||||||
|
|
||||||
- 🔥 Use the [new `<script setup>` syntax](https://github.com/vuejs/rfcs/pull/227)
|
- 🔥 Use the [new `<script setup>` syntax](https://github.com/vuejs/rfcs/pull/227)
|
||||||
|
|
||||||
- 🤙🏻 [Reactivity Transform](https://vuejs.org/guide/extras/reactivity-transform.html) enabled
|
|
||||||
|
|
||||||
- 📥 [APIs auto importing](https://github.com/antfu/unplugin-auto-import) - use Composition API and others directly
|
- 📥 [APIs auto importing](https://github.com/antfu/unplugin-auto-import) - use Composition API and others directly
|
||||||
|
|
||||||
- 🖨 Static-site generation (SSG) via [vite-ssg](https://github.com/antfu/vite-ssg)
|
- 🖨 Static-site generation (SSG) via [vite-ssg](https://github.com/antfu/vite-ssg)
|
||||||
|
@ -45,8 +45,6 @@
|
|||||||
|
|
||||||
- 🔥 使用 [新的 `<script setup>` 语法](https://github.com/vuejs/rfcs/pull/227)
|
- 🔥 使用 [新的 `<script setup>` 语法](https://github.com/vuejs/rfcs/pull/227)
|
||||||
|
|
||||||
- 🤙🏻 默认开启 [响应性语法糖](https://vuejs.org/guide/extras/reactivity-transform.html)
|
|
||||||
|
|
||||||
- 📥 [API 自动加载](https://github.com/antfu/unplugin-auto-import) - 直接使用 Composition API 无需引入
|
- 📥 [API 自动加载](https://github.com/antfu/unplugin-auto-import) - 直接使用 Composition API 无需引入
|
||||||
|
|
||||||
- 🖨 使用 [vite-ssg](https://github.com/antfu/vite-ssg) 进行服务端生成 (SSG)
|
- 🖨 使用 [vite-ssg](https://github.com/antfu/vite-ssg) 进行服务端生成 (SSG)
|
||||||
|
@ -18,5 +18,6 @@
|
|||||||
<body class="font-sans">
|
<body class="font-sans">
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
|
<noscript>This website requires JavaScript to function properly. Please enable JavaScript to continue.</noscript>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
55
package.json
55
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@7.30.3",
|
"packageManager": "pnpm@8.3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite-ssg build",
|
"build": "vite-ssg build",
|
||||||
"dev": "vite --port 3333 --open",
|
"dev": "vite --port 3333 --open",
|
||||||
@ -17,57 +17,58 @@
|
|||||||
"sizecheck": "npx vite-bundle-visualizer"
|
"sizecheck": "npx vite-bundle-visualizer"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@unocss/reset": "^0.50.6",
|
"@unocss/reset": "^0.51.4",
|
||||||
"@vueuse/core": "^9.13.0",
|
"@vueuse/core": "^10.0.2",
|
||||||
"@vueuse/head": "^1.1.23",
|
"@vueuse/head": "^1.1.26",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"pinia": "^2.0.33",
|
"pinia": "^2.0.34",
|
||||||
"vue": "^3.2.47",
|
"vue": "^3.2.47",
|
||||||
"vue-demi": "^0.13.11",
|
"vue-demi": "^0.14.0",
|
||||||
"vue-i18n": "^9.2.2",
|
"vue-i18n": "^9.2.2",
|
||||||
"vue-router": "^4.1.6"
|
"vue-router": "^4.1.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^0.37.0",
|
"@antfu/eslint-config": "^0.38.5",
|
||||||
"@iconify-json/carbon": "^1.1.16",
|
"@iconify-json/carbon": "^1.1.16",
|
||||||
"@intlify/unplugin-vue-i18n": "^0.10.0",
|
"@intlify/unplugin-vue-i18n": "^0.10.0",
|
||||||
"@types/markdown-it-link-attributes": "^3.0.1",
|
"@types/markdown-it-link-attributes": "^3.0.1",
|
||||||
"@types/nprogress": "^0.2.0",
|
"@types/nprogress": "^0.2.0",
|
||||||
|
"@unocss/eslint-config": "^0.51.4",
|
||||||
"@vitejs/plugin-vue": "^4.1.0",
|
"@vitejs/plugin-vue": "^4.1.0",
|
||||||
"@vue-macros/volar": "^0.9.4",
|
"@vue-macros/volar": "^0.9.5",
|
||||||
"@vue/test-utils": "^2.3.2",
|
"@vue/test-utils": "^2.3.2",
|
||||||
"critters": "^0.0.16",
|
"critters": "^0.0.16",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"cypress": "^12.8.1",
|
"cypress": "^12.10.0",
|
||||||
"cypress-vite": "^1.3.1",
|
"cypress-vite": "^1.3.2",
|
||||||
"eslint": "^8.36.0",
|
"eslint": "^8.38.0",
|
||||||
"eslint-plugin-cypress": "^2.12.1",
|
"eslint-plugin-cypress": "^2.13.2",
|
||||||
"https-localhost": "^4.7.1",
|
"https-localhost": "^4.7.1",
|
||||||
"lint-staged": "^13.2.0",
|
"lint-staged": "^13.2.1",
|
||||||
"markdown-it-link-attributes": "^4.0.1",
|
"markdown-it-link-attributes": "^4.0.1",
|
||||||
"markdown-it-shiki": "^0.8.0",
|
"markdown-it-shiki": "^0.8.1",
|
||||||
"pnpm": "^7.30.3",
|
"pnpm": "^8.3.0",
|
||||||
"shiki": "^0.14.1",
|
"shiki": "^0.14.1",
|
||||||
"simple-git-hooks": "^2.8.1",
|
"simple-git-hooks": "^2.8.1",
|
||||||
"taze": "^0.9.1",
|
"taze": "^0.9.1",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^5.0.4",
|
||||||
"unocss": "^0.50.6",
|
"unocss": "^0.51.4",
|
||||||
"unplugin-auto-import": "^0.15.2",
|
"unplugin-auto-import": "^0.15.3",
|
||||||
"unplugin-vue-components": "^0.24.1",
|
"unplugin-vue-components": "^0.24.1",
|
||||||
"unplugin-vue-macros": "^1.11.2",
|
"unplugin-vue-macros": "^2.0.0",
|
||||||
"vite": "^4.2.1",
|
"vite": "^4.2.2",
|
||||||
"vite-bundle-visualizer": "^0.6.0",
|
"vite-bundle-visualizer": "^0.6.0",
|
||||||
"vite-plugin-inspect": "^0.7.18",
|
"vite-plugin-inspect": "^0.7.22",
|
||||||
"vite-plugin-pages": "^0.29.0",
|
"vite-plugin-pages": "^0.29.0",
|
||||||
"vite-plugin-pwa": "^0.14.6",
|
"vite-plugin-pwa": "^0.14.7",
|
||||||
"vite-plugin-vue-component-preview": "^1.1.5",
|
"vite-plugin-vue-component-preview": "^1.1.6",
|
||||||
"vite-plugin-vue-inspector": "^3.4.0",
|
"vite-plugin-vue-inspector": "^3.4.0",
|
||||||
"vite-plugin-vue-layouts": "^0.8.0",
|
"vite-plugin-vue-layouts": "^0.8.0",
|
||||||
"vite-plugin-vue-markdown": "^0.22.4",
|
"vite-plugin-vue-markdown": "^0.22.6",
|
||||||
"vite-plugin-webfont-dl": "^3.6.4",
|
"vite-plugin-webfont-dl": "^3.7.3",
|
||||||
"vite-ssg": "^0.22.1",
|
"vite-ssg": "^0.22.2",
|
||||||
"vite-ssg-sitemap": "^0.4.3",
|
"vite-ssg-sitemap": "^0.4.3",
|
||||||
"vitest": "^0.29.7",
|
"vitest": "^0.30.1",
|
||||||
"vue-tsc": "^1.2.0"
|
"vue-tsc": "^1.2.0"
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
"simple-git-hooks": {
|
||||||
|
4336
pnpm-lock.yaml
4336
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -8,14 +8,14 @@ useHead({
|
|||||||
{ name: 'description', content: 'Opinionated Vite Starter Template' },
|
{ name: 'description', content: 'Opinionated Vite Starter Template' },
|
||||||
{
|
{
|
||||||
name: 'theme-color',
|
name: 'theme-color',
|
||||||
content: computed(() => isDark.value ? '#00aba9' : '#ffffff'),
|
content: () => isDark.value ? '#00aba9' : '#ffffff',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
link: [
|
link: [
|
||||||
{
|
{
|
||||||
rel: 'icon',
|
rel: 'icon',
|
||||||
type: 'image/svg+xml',
|
type: 'image/svg+xml',
|
||||||
href: computed(() => preferredDark.value ? '/favicon-dark.svg' : '/favicon.svg'),
|
href: () => preferredDark.value ? '/favicon-dark.svg' : '/favicon.svg',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
34
src/auto-imports.d.ts
vendored
34
src/auto-imports.d.ts
vendored
@ -4,13 +4,6 @@
|
|||||||
// Generated by unplugin-auto-import
|
// Generated by unplugin-auto-import
|
||||||
export {}
|
export {}
|
||||||
declare global {
|
declare global {
|
||||||
const $$: typeof import('vue/macros')['$$']
|
|
||||||
const $: typeof import('vue/macros')['$']
|
|
||||||
const $computed: typeof import('vue/macros')['$computed']
|
|
||||||
const $customRef: typeof import('vue/macros')['$customRef']
|
|
||||||
const $ref: typeof import('vue/macros')['$ref']
|
|
||||||
const $shallowRef: typeof import('vue/macros')['$shallowRef']
|
|
||||||
const $toRef: typeof import('vue/macros')['$toRef']
|
|
||||||
const EffectScope: typeof import('vue')['EffectScope']
|
const EffectScope: typeof import('vue')['EffectScope']
|
||||||
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
|
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
|
||||||
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
|
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
|
||||||
@ -26,7 +19,9 @@ declare global {
|
|||||||
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
|
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
|
||||||
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
|
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
|
||||||
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
|
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
|
||||||
|
const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate']
|
||||||
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
|
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
|
||||||
|
const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise']
|
||||||
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
|
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
|
||||||
const customRef: typeof import('vue')['customRef']
|
const customRef: typeof import('vue')['customRef']
|
||||||
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
|
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
|
||||||
@ -111,11 +106,14 @@ declare global {
|
|||||||
const unrefElement: typeof import('@vueuse/core')['unrefElement']
|
const unrefElement: typeof import('@vueuse/core')['unrefElement']
|
||||||
const until: typeof import('@vueuse/core')['until']
|
const until: typeof import('@vueuse/core')['until']
|
||||||
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
|
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
|
||||||
|
const useAnimate: typeof import('@vueuse/core')['useAnimate']
|
||||||
|
const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference']
|
||||||
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
|
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
|
||||||
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
|
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
|
||||||
const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
|
const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
|
||||||
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
|
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
|
||||||
const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
|
const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
|
||||||
|
const useArrayIncludes: typeof import('@vueuse/core')['useArrayIncludes']
|
||||||
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
|
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
|
||||||
const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
|
const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
|
||||||
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
|
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
|
||||||
@ -204,6 +202,8 @@ declare global {
|
|||||||
const useOnline: typeof import('@vueuse/core')['useOnline']
|
const useOnline: typeof import('@vueuse/core')['useOnline']
|
||||||
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
|
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
|
||||||
const useParallax: typeof import('@vueuse/core')['useParallax']
|
const useParallax: typeof import('@vueuse/core')['useParallax']
|
||||||
|
const useParentElement: typeof import('@vueuse/core')['useParentElement']
|
||||||
|
const usePerformanceObserver: typeof import('@vueuse/core')['usePerformanceObserver']
|
||||||
const usePermission: typeof import('@vueuse/core')['usePermission']
|
const usePermission: typeof import('@vueuse/core')['usePermission']
|
||||||
const usePointer: typeof import('@vueuse/core')['usePointer']
|
const usePointer: typeof import('@vueuse/core')['usePointer']
|
||||||
const usePointerLock: typeof import('@vueuse/core')['usePointerLock']
|
const usePointerLock: typeof import('@vueuse/core')['usePointerLock']
|
||||||
@ -224,6 +224,7 @@ declare global {
|
|||||||
const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
|
const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
|
||||||
const useScroll: typeof import('@vueuse/core')['useScroll']
|
const useScroll: typeof import('@vueuse/core')['useScroll']
|
||||||
const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
|
const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
|
||||||
|
const useSeoMeta: typeof import('@vueuse/head')['useSeoMeta']
|
||||||
const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
|
const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
|
||||||
const useShare: typeof import('@vueuse/core')['useShare']
|
const useShare: typeof import('@vueuse/core')['useShare']
|
||||||
const useSlots: typeof import('vue')['useSlots']
|
const useSlots: typeof import('vue')['useSlots']
|
||||||
@ -272,8 +273,10 @@ declare global {
|
|||||||
const watchArray: typeof import('@vueuse/core')['watchArray']
|
const watchArray: typeof import('@vueuse/core')['watchArray']
|
||||||
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
|
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
|
||||||
const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
|
const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
|
||||||
|
const watchDeep: typeof import('@vueuse/core')['watchDeep']
|
||||||
const watchEffect: typeof import('vue')['watchEffect']
|
const watchEffect: typeof import('vue')['watchEffect']
|
||||||
const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
|
const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
|
||||||
|
const watchImmediate: typeof import('@vueuse/core')['watchImmediate']
|
||||||
const watchOnce: typeof import('@vueuse/core')['watchOnce']
|
const watchOnce: typeof import('@vueuse/core')['watchOnce']
|
||||||
const watchPausable: typeof import('@vueuse/core')['watchPausable']
|
const watchPausable: typeof import('@vueuse/core')['watchPausable']
|
||||||
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||||
@ -292,13 +295,6 @@ declare global {
|
|||||||
import { UnwrapRef } from 'vue'
|
import { UnwrapRef } from 'vue'
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
readonly $$: UnwrapRef<typeof import('vue/macros')['$$']>
|
|
||||||
readonly $: UnwrapRef<typeof import('vue/macros')['$']>
|
|
||||||
readonly $computed: UnwrapRef<typeof import('vue/macros')['$computed']>
|
|
||||||
readonly $customRef: UnwrapRef<typeof import('vue/macros')['$customRef']>
|
|
||||||
readonly $ref: UnwrapRef<typeof import('vue/macros')['$ref']>
|
|
||||||
readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
|
|
||||||
readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
|
|
||||||
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
||||||
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
||||||
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
||||||
@ -314,7 +310,9 @@ declare module 'vue' {
|
|||||||
readonly createGlobalState: UnwrapRef<typeof import('@vueuse/core')['createGlobalState']>
|
readonly createGlobalState: UnwrapRef<typeof import('@vueuse/core')['createGlobalState']>
|
||||||
readonly createInjectionState: UnwrapRef<typeof import('@vueuse/core')['createInjectionState']>
|
readonly createInjectionState: UnwrapRef<typeof import('@vueuse/core')['createInjectionState']>
|
||||||
readonly createReactiveFn: UnwrapRef<typeof import('@vueuse/core')['createReactiveFn']>
|
readonly createReactiveFn: UnwrapRef<typeof import('@vueuse/core')['createReactiveFn']>
|
||||||
|
readonly createReusableTemplate: UnwrapRef<typeof import('@vueuse/core')['createReusableTemplate']>
|
||||||
readonly createSharedComposable: UnwrapRef<typeof import('@vueuse/core')['createSharedComposable']>
|
readonly createSharedComposable: UnwrapRef<typeof import('@vueuse/core')['createSharedComposable']>
|
||||||
|
readonly createTemplatePromise: UnwrapRef<typeof import('@vueuse/core')['createTemplatePromise']>
|
||||||
readonly createUnrefFn: UnwrapRef<typeof import('@vueuse/core')['createUnrefFn']>
|
readonly createUnrefFn: UnwrapRef<typeof import('@vueuse/core')['createUnrefFn']>
|
||||||
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
|
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
|
||||||
readonly debouncedRef: UnwrapRef<typeof import('@vueuse/core')['debouncedRef']>
|
readonly debouncedRef: UnwrapRef<typeof import('@vueuse/core')['debouncedRef']>
|
||||||
@ -399,11 +397,14 @@ declare module 'vue' {
|
|||||||
readonly unrefElement: UnwrapRef<typeof import('@vueuse/core')['unrefElement']>
|
readonly unrefElement: UnwrapRef<typeof import('@vueuse/core')['unrefElement']>
|
||||||
readonly until: UnwrapRef<typeof import('@vueuse/core')['until']>
|
readonly until: UnwrapRef<typeof import('@vueuse/core')['until']>
|
||||||
readonly useActiveElement: UnwrapRef<typeof import('@vueuse/core')['useActiveElement']>
|
readonly useActiveElement: UnwrapRef<typeof import('@vueuse/core')['useActiveElement']>
|
||||||
|
readonly useAnimate: UnwrapRef<typeof import('@vueuse/core')['useAnimate']>
|
||||||
|
readonly useArrayDifference: UnwrapRef<typeof import('@vueuse/core')['useArrayDifference']>
|
||||||
readonly useArrayEvery: UnwrapRef<typeof import('@vueuse/core')['useArrayEvery']>
|
readonly useArrayEvery: UnwrapRef<typeof import('@vueuse/core')['useArrayEvery']>
|
||||||
readonly useArrayFilter: UnwrapRef<typeof import('@vueuse/core')['useArrayFilter']>
|
readonly useArrayFilter: UnwrapRef<typeof import('@vueuse/core')['useArrayFilter']>
|
||||||
readonly useArrayFind: UnwrapRef<typeof import('@vueuse/core')['useArrayFind']>
|
readonly useArrayFind: UnwrapRef<typeof import('@vueuse/core')['useArrayFind']>
|
||||||
readonly useArrayFindIndex: UnwrapRef<typeof import('@vueuse/core')['useArrayFindIndex']>
|
readonly useArrayFindIndex: UnwrapRef<typeof import('@vueuse/core')['useArrayFindIndex']>
|
||||||
readonly useArrayFindLast: UnwrapRef<typeof import('@vueuse/core')['useArrayFindLast']>
|
readonly useArrayFindLast: UnwrapRef<typeof import('@vueuse/core')['useArrayFindLast']>
|
||||||
|
readonly useArrayIncludes: UnwrapRef<typeof import('@vueuse/core')['useArrayIncludes']>
|
||||||
readonly useArrayJoin: UnwrapRef<typeof import('@vueuse/core')['useArrayJoin']>
|
readonly useArrayJoin: UnwrapRef<typeof import('@vueuse/core')['useArrayJoin']>
|
||||||
readonly useArrayMap: UnwrapRef<typeof import('@vueuse/core')['useArrayMap']>
|
readonly useArrayMap: UnwrapRef<typeof import('@vueuse/core')['useArrayMap']>
|
||||||
readonly useArrayReduce: UnwrapRef<typeof import('@vueuse/core')['useArrayReduce']>
|
readonly useArrayReduce: UnwrapRef<typeof import('@vueuse/core')['useArrayReduce']>
|
||||||
@ -492,6 +493,8 @@ declare module 'vue' {
|
|||||||
readonly useOnline: UnwrapRef<typeof import('@vueuse/core')['useOnline']>
|
readonly useOnline: UnwrapRef<typeof import('@vueuse/core')['useOnline']>
|
||||||
readonly usePageLeave: UnwrapRef<typeof import('@vueuse/core')['usePageLeave']>
|
readonly usePageLeave: UnwrapRef<typeof import('@vueuse/core')['usePageLeave']>
|
||||||
readonly useParallax: UnwrapRef<typeof import('@vueuse/core')['useParallax']>
|
readonly useParallax: UnwrapRef<typeof import('@vueuse/core')['useParallax']>
|
||||||
|
readonly useParentElement: UnwrapRef<typeof import('@vueuse/core')['useParentElement']>
|
||||||
|
readonly usePerformanceObserver: UnwrapRef<typeof import('@vueuse/core')['usePerformanceObserver']>
|
||||||
readonly usePermission: UnwrapRef<typeof import('@vueuse/core')['usePermission']>
|
readonly usePermission: UnwrapRef<typeof import('@vueuse/core')['usePermission']>
|
||||||
readonly usePointer: UnwrapRef<typeof import('@vueuse/core')['usePointer']>
|
readonly usePointer: UnwrapRef<typeof import('@vueuse/core')['usePointer']>
|
||||||
readonly usePointerLock: UnwrapRef<typeof import('@vueuse/core')['usePointerLock']>
|
readonly usePointerLock: UnwrapRef<typeof import('@vueuse/core')['usePointerLock']>
|
||||||
@ -512,6 +515,7 @@ declare module 'vue' {
|
|||||||
readonly useScriptTag: UnwrapRef<typeof import('@vueuse/core')['useScriptTag']>
|
readonly useScriptTag: UnwrapRef<typeof import('@vueuse/core')['useScriptTag']>
|
||||||
readonly useScroll: UnwrapRef<typeof import('@vueuse/core')['useScroll']>
|
readonly useScroll: UnwrapRef<typeof import('@vueuse/core')['useScroll']>
|
||||||
readonly useScrollLock: UnwrapRef<typeof import('@vueuse/core')['useScrollLock']>
|
readonly useScrollLock: UnwrapRef<typeof import('@vueuse/core')['useScrollLock']>
|
||||||
|
readonly useSeoMeta: UnwrapRef<typeof import('@vueuse/head')['useSeoMeta']>
|
||||||
readonly useSessionStorage: UnwrapRef<typeof import('@vueuse/core')['useSessionStorage']>
|
readonly useSessionStorage: UnwrapRef<typeof import('@vueuse/core')['useSessionStorage']>
|
||||||
readonly useShare: UnwrapRef<typeof import('@vueuse/core')['useShare']>
|
readonly useShare: UnwrapRef<typeof import('@vueuse/core')['useShare']>
|
||||||
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
|
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
|
||||||
@ -560,8 +564,10 @@ declare module 'vue' {
|
|||||||
readonly watchArray: UnwrapRef<typeof import('@vueuse/core')['watchArray']>
|
readonly watchArray: UnwrapRef<typeof import('@vueuse/core')['watchArray']>
|
||||||
readonly watchAtMost: UnwrapRef<typeof import('@vueuse/core')['watchAtMost']>
|
readonly watchAtMost: UnwrapRef<typeof import('@vueuse/core')['watchAtMost']>
|
||||||
readonly watchDebounced: UnwrapRef<typeof import('@vueuse/core')['watchDebounced']>
|
readonly watchDebounced: UnwrapRef<typeof import('@vueuse/core')['watchDebounced']>
|
||||||
|
readonly watchDeep: UnwrapRef<typeof import('@vueuse/core')['watchDeep']>
|
||||||
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
|
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
|
||||||
readonly watchIgnorable: UnwrapRef<typeof import('@vueuse/core')['watchIgnorable']>
|
readonly watchIgnorable: UnwrapRef<typeof import('@vueuse/core')['watchIgnorable']>
|
||||||
|
readonly watchImmediate: UnwrapRef<typeof import('@vueuse/core')['watchImmediate']>
|
||||||
readonly watchOnce: UnwrapRef<typeof import('@vueuse/core')['watchOnce']>
|
readonly watchOnce: UnwrapRef<typeof import('@vueuse/core')['watchOnce']>
|
||||||
readonly watchPausable: UnwrapRef<typeof import('@vueuse/core')['watchPausable']>
|
readonly watchPausable: UnwrapRef<typeof import('@vueuse/core')['watchPausable']>
|
||||||
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
|
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
|
||||||
|
@ -3,7 +3,7 @@ import { availableLocales, loadLanguageAsync } from '~/modules/i18n'
|
|||||||
|
|
||||||
const { t, locale } = useI18n()
|
const { t, locale } = useI18n()
|
||||||
|
|
||||||
const toggleLocales = async () => {
|
async function toggleLocales() {
|
||||||
// change to some real logic
|
// change to some real logic
|
||||||
const locales = availableLocales
|
const locales = availableLocales
|
||||||
const newLocale = locales[(locales.indexOf(locale.value) + 1) % locales.length]
|
const newLocale = locales[(locales.indexOf(locale.value) + 1) % locales.length]
|
||||||
@ -13,24 +13,24 @@ const toggleLocales = async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<nav text-xl mt-6>
|
<nav flex="~ gap-4" mt-6 justify-center text-xl>
|
||||||
<RouterLink class="icon-btn mx-2" to="/" :title="t('button.home')">
|
<RouterLink icon-btn to="/" :title="t('button.home')">
|
||||||
<div i-carbon-campsite />
|
<div i-carbon-campsite />
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
|
||||||
<button class="icon-btn mx-2 !outline-none" :title="t('button.toggle_dark')" @click="toggleDark()">
|
<button icon-btn :title="t('button.toggle_dark')" @click="toggleDark()">
|
||||||
<div i="carbon-sun dark:carbon-moon" />
|
<div i="carbon-sun dark:carbon-moon" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<a class="icon-btn mx-2" :title="t('button.toggle_langs')" @click="toggleLocales()">
|
<a icon-btn :title="t('button.toggle_langs')" @click="toggleLocales()">
|
||||||
<div i-carbon-language />
|
<div i-carbon-language />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<RouterLink class="icon-btn mx-2" to="/about" :title="t('button.about')">
|
<RouterLink icon-btn to="/about" :title="t('button.about')">
|
||||||
<div i-carbon-dicom-overlay />
|
<div i-carbon-dicom-overlay />
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
|
||||||
<a class="icon-btn mx-2" rel="noreferrer" href="https://github.com/antfu/vitesse" target="_blank" title="GitHub">
|
<a icon-btn rel="noreferrer" href="https://github.com/antfu/vitesse" target="_blank" title="GitHub">
|
||||||
<div i-carbon-logo-github />
|
<div i-carbon-logo-github />
|
||||||
</a>
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const { modelValue } = defineModel<{
|
const { modelValue } = defineModels<{
|
||||||
modelValue: string
|
modelValue: string
|
||||||
}>()
|
}>()
|
||||||
</script>
|
</script>
|
||||||
|
@ -10,7 +10,7 @@ const { t } = useI18n()
|
|||||||
</div>
|
</div>
|
||||||
<RouterView />
|
<RouterView />
|
||||||
<div>
|
<div>
|
||||||
<button btn text-sm m="3 t8" @click="router.back()">
|
<button text-sm btn m="3 t8" @click="router.back()">
|
||||||
{{ t('button.back') }}
|
{{ t('button.back') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<main class="px-4 py-10 text-center text-gray-700 dark:text-gray-200">
|
<main
|
||||||
|
px-4 py-10
|
||||||
|
text="center gray-700 dark:gray-200"
|
||||||
|
>
|
||||||
<RouterView />
|
<RouterView />
|
||||||
<TheFooter />
|
<TheFooter />
|
||||||
<div class="mt-5 mx-auto text-center opacity-75 dark:opacity-50 text-sm">
|
<div mx-auto mt-5 text-center text-sm opacity-50>
|
||||||
[Default Layout]
|
[Default Layout]
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<main class="px-4 py-10 text-center text-gray-700 dark:text-gray-200">
|
<main
|
||||||
|
px-4 py-10
|
||||||
|
text="center gray-700 dark:gray-200"
|
||||||
|
>
|
||||||
<RouterView />
|
<RouterView />
|
||||||
<TheFooter />
|
<TheFooter />
|
||||||
<div class="mt-5 mx-auto text-center opacity-75 dark:opacity-50 text-sm">
|
<div mx-auto mt-5 text-center text-sm opacity-50>
|
||||||
[Home Layout]
|
[Home Layout]
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { ViteSSG } from 'vite-ssg'
|
import { ViteSSG } from 'vite-ssg'
|
||||||
import { setupLayouts } from 'virtual:generated-layouts'
|
import { setupLayouts } from 'virtual:generated-layouts'
|
||||||
|
|
||||||
// import Previewer from 'virtual:vue-component-preview'
|
// import Previewer from 'virtual:vue-component-preview'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import type { UserModule } from './types'
|
import type { UserModule } from './types'
|
||||||
|
@ -23,7 +23,7 @@ watchEffect(() => {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<template v-if="user.otherNames.length">
|
<template v-if="user.otherNames.length">
|
||||||
<p text-sm mt-4>
|
<p mt-4 text-sm>
|
||||||
<span opacity-75>{{ t('intro.aka') }}:</span>
|
<span opacity-75>{{ t('intro.aka') }}:</span>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="otherName in user.otherNames" :key="otherName">
|
<li v-for="otherName in user.otherNames" :key="otherName">
|
||||||
@ -37,7 +37,7 @@ watchEffect(() => {
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
btn m="3 t6" text-sm
|
m="3 t6" text-sm btn
|
||||||
@click="router.back()"
|
@click="router.back()"
|
||||||
>
|
>
|
||||||
{{ t('button.back') }}
|
{{ t('button.back') }}
|
||||||
|
@ -3,12 +3,12 @@ defineOptions({
|
|||||||
name: 'IndexPage',
|
name: 'IndexPage',
|
||||||
})
|
})
|
||||||
const user = useUserStore()
|
const user = useUserStore()
|
||||||
const name = $ref(user.savedName)
|
const name = ref(user.savedName)
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const go = () => {
|
function go() {
|
||||||
if (name)
|
if (name.value)
|
||||||
router.push(`/hi/${encodeURIComponent(name)}`)
|
router.push(`/hi/${encodeURIComponent(name.value)}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
@ -40,7 +40,7 @@ const { t } = useI18n()
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
btn m-3 text-sm
|
m-3 text-sm btn
|
||||||
:disabled="!name"
|
:disabled="!name"
|
||||||
@click="go"
|
@click="go"
|
||||||
>
|
>
|
||||||
|
@ -31,4 +31,4 @@ export const useUserStore = defineStore('user', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (import.meta.hot)
|
if (import.meta.hot)
|
||||||
import.meta.hot.accept(acceptHMRUpdate(useUserStore, import.meta.hot))
|
import.meta.hot.accept(acceptHMRUpdate(useUserStore as any, import.meta.hot))
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
},
|
},
|
||||||
"vueCompilerOptions": {
|
"vueCompilerOptions": {
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"@vue-macros/volar/define-model",
|
"@vue-macros/volar/define-models",
|
||||||
"@vue-macros/volar/define-slots"
|
"@vue-macros/volar/define-slots"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -11,7 +11,7 @@ import {
|
|||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
shortcuts: [
|
shortcuts: [
|
||||||
['btn', 'px-4 py-1 rounded inline-block bg-teal-700 text-white cursor-pointer hover:bg-teal-800 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
|
['btn', 'px-4 py-1 rounded inline-block bg-teal-700 text-white cursor-pointer !outline-none hover:bg-teal-800 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'],
|
['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
|
||||||
],
|
],
|
||||||
presets: [
|
presets: [
|
||||||
@ -34,5 +34,5 @@ export default defineConfig({
|
|||||||
transformerDirectives(),
|
transformerDirectives(),
|
||||||
transformerVariantGroup(),
|
transformerVariantGroup(),
|
||||||
],
|
],
|
||||||
safelist: 'prose prose-sm m-auto text-left'.split(' '),
|
safelist: 'prose m-auto text-left'.split(' '),
|
||||||
})
|
})
|
@ -1,6 +1,5 @@
|
|||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
// import Preview from 'vite-plugin-vue-component-preview'
|
|
||||||
import Vue from '@vitejs/plugin-vue'
|
import Vue from '@vitejs/plugin-vue'
|
||||||
import Pages from 'vite-plugin-pages'
|
import Pages from 'vite-plugin-pages'
|
||||||
import generateSitemap from 'vite-ssg-sitemap'
|
import generateSitemap from 'vite-ssg-sitemap'
|
||||||
@ -15,6 +14,8 @@ import Inspector from 'vite-plugin-vue-inspector'
|
|||||||
import LinkAttributes from 'markdown-it-link-attributes'
|
import LinkAttributes from 'markdown-it-link-attributes'
|
||||||
import Unocss from 'unocss/vite'
|
import Unocss from 'unocss/vite'
|
||||||
import Shiki from 'markdown-it-shiki'
|
import Shiki from 'markdown-it-shiki'
|
||||||
|
|
||||||
|
// @ts-expect-error failed to resolve types
|
||||||
import VueMacros from 'unplugin-vue-macros/vite'
|
import VueMacros from 'unplugin-vue-macros/vite'
|
||||||
import WebfontDownload from 'vite-plugin-webfont-dl'
|
import WebfontDownload from 'vite-plugin-webfont-dl'
|
||||||
|
|
||||||
@ -26,13 +27,10 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
// Preview(),
|
|
||||||
|
|
||||||
VueMacros({
|
VueMacros({
|
||||||
plugins: {
|
plugins: {
|
||||||
vue: Vue({
|
vue: Vue({
|
||||||
include: [/\.vue$/, /\.md$/],
|
include: [/\.vue$/, /\.md$/],
|
||||||
reactivityTransform: true,
|
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
@ -51,7 +49,6 @@ export default defineConfig({
|
|||||||
'vue',
|
'vue',
|
||||||
'vue-router',
|
'vue-router',
|
||||||
'vue-i18n',
|
'vue-i18n',
|
||||||
'vue/macros',
|
|
||||||
'@vueuse/head',
|
'@vueuse/head',
|
||||||
'@vueuse/core',
|
'@vueuse/core',
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user