Compare commits
69
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d41ea0fa8 | ||
|
|
c2f8645161 | ||
|
|
581aac3df1 | ||
|
|
b7222f4bed | ||
|
|
b3b200237c | ||
|
|
142acb2ef3 | ||
|
|
f706d556a0 | ||
|
|
f71cc96893 | ||
|
|
25d790b0fc | ||
|
|
a78589bbd5 | ||
|
|
878995238e | ||
|
|
62733ae631 | ||
|
|
3466e17cc5 | ||
|
|
8e0a2061c7 | ||
|
|
e65d912cd1 | ||
|
|
e834d4f15b | ||
|
|
776494a657 | ||
|
|
8ca3e1aee7 | ||
|
|
6e4e40d834 | ||
|
|
793e8b9da1 | ||
|
|
ff4fa578fc | ||
|
|
433aabe44c | ||
|
|
b7824239a8 | ||
|
|
ac0dca982d | ||
|
|
2a5b6fb046 | ||
|
|
f144cd42a1 | ||
|
|
58ceb77b06 | ||
|
|
32676ae335 | ||
|
|
b6779111c8 | ||
|
|
1d07e5281d | ||
|
|
23dc1cd483 | ||
|
|
711d1c845d | ||
|
|
c1939905c9 | ||
|
|
b03a0e71be | ||
|
|
d5a595d7a2 | ||
|
|
424907e458 | ||
|
|
0562a2e591 | ||
|
|
a2e8e0b742 | ||
|
|
c001c52177 | ||
|
|
97f146150c | ||
|
|
e5dffdb8d5 | ||
|
|
7e09d5b341 | ||
|
|
2487c1827c | ||
|
|
0e40c550f8 | ||
|
|
74812d9bba | ||
|
|
b1ce79d3ec | ||
|
|
b0696b4f25 | ||
|
|
6886db4ce9 | ||
|
|
25c7d351c7 | ||
|
|
7c903def7b | ||
|
|
773ad02748 | ||
|
|
586d28134d | ||
|
|
e4c56de6a8 | ||
|
|
06de10de8f | ||
|
|
d86f93234b | ||
|
|
51265b18be | ||
|
|
b4f9438c45 | ||
|
|
dc81304f33 | ||
|
|
92f0f0252f | ||
|
|
ca352cedd4 | ||
|
|
5878fb1ae0 | ||
|
|
11147a9f58 | ||
|
|
a491fa4b88 | ||
|
|
7387e3734d | ||
|
|
f541621286 | ||
|
|
1c183947c3 | ||
|
|
d7916b54b7 | ||
|
|
8f74cd2bed | ||
|
|
53da3f8315 |
No files matched your search
@@ -0,0 +1,3 @@
|
|||||||
|
dist
|
||||||
|
node_modules
|
||||||
|
public
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
name: General
|
||||||
|
about: General issue
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
PLEASE READ: I originally made this template for myself to mocking up apps quicker. I am glad to see you are willing to give it a try! Before your open the issue, please make sure you are reporting bugs in the template itself. **I am NOT creating this template to solve the problems you faced in your project, please use Vue or Vite's discord server to ask questions.** Thank you.
|
||||||
|
|
||||||
|
**Describe the bug/issue**
|
||||||
@@ -5,3 +5,5 @@
|
|||||||
dist
|
dist
|
||||||
dist-ssr
|
dist-ssr
|
||||||
node_modules
|
node_modules
|
||||||
|
# intellij stuff
|
||||||
|
.idea/
|
||||||
Vendored
+3
-1
@@ -1,9 +1,11 @@
|
|||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
|
"antfu.vite",
|
||||||
"johnsoncodehk.volar",
|
"johnsoncodehk.volar",
|
||||||
"lokalise.i18n-ally",
|
"lokalise.i18n-ally",
|
||||||
"antfu.iconify",
|
"antfu.iconify",
|
||||||
"dbaeumer.vscode-eslint",
|
"dbaeumer.vscode-eslint",
|
||||||
"bradlc.vscode-tailwindcss"
|
"voorjaar.windicss-intellisense",
|
||||||
|
"csstools.postcss"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Vendored
+13
-6
@@ -1,10 +1,17 @@
|
|||||||
{
|
{
|
||||||
"volar.tsPlugin": true,
|
"cSpell.words": ["Vitesse"],
|
||||||
"i18n-ally.localesPaths": "locales",
|
|
||||||
"i18n-ally.keystyle": "nested",
|
"i18n-ally.keystyle": "nested",
|
||||||
|
"i18n-ally.localesPaths": "locales",
|
||||||
"i18n-ally.sortKeys": true,
|
"i18n-ally.sortKeys": true,
|
||||||
"cSpell.words": [
|
"prettier.enable": false,
|
||||||
"Vitesse"
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
],
|
"volar.style.defaultLanguage": "postcss",
|
||||||
"typescript.tsdk": "node_modules/typescript/lib"
|
"volar.tsPlugin": true,
|
||||||
|
"volar.tsPluginStatus": false,
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.fixAll.eslint": true,
|
||||||
|
},
|
||||||
|
"files.associations": {
|
||||||
|
"*.css": "postcss",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2020 Anthony Fu
|
Copyright (c) 2020-2021 Anthony Fu
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<p align='center'>
|
<p align='center'>
|
||||||
<img src='https://repository-images.githubusercontent.com/286295150/b1b1be80-354a-11eb-87c0-5dc96cae2bd9' alt='Vitesse - Opinionated Vite Starter Template' width='600'/>
|
<img src='https://user-images.githubusercontent.com/11247099/111864893-a457fd00-899e-11eb-9f05-f4b88987541d.png' alt='Vitesse - Opinionated Vite Starter Template' width='600'/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align='center'>
|
<p align='center'>
|
||||||
Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
|
Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
|
||||||
<sub><em>Now with Vite 2.0! ⚡️</em></sub>
|
<sub><em>Now with <a href="http://windicss.netlify.app/">Windi CSS</a>! ⚡️</em></sub>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@@ -27,7 +27,7 @@ Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
|
|||||||
|
|
||||||
- 📲 [PWA](https://github.com/antfu/vite-plugin-pwa)
|
- 📲 [PWA](https://github.com/antfu/vite-plugin-pwa)
|
||||||
|
|
||||||
- 🎨 [TailwindCSS **v2.0**](https://blog.tailwindcss.com/tailwindcss-v2) with dark mode out-of-box
|
- 🎨 [Windi CSS](https://github.com/windicss/windicss) - next generation utility-first CSS framework
|
||||||
|
|
||||||
- 😃 [Use icons from any icon sets, with no compromise](./src/components)
|
- 😃 [Use icons from any icon sets, with no compromise](./src/components)
|
||||||
|
|
||||||
@@ -49,8 +49,8 @@ Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
|
|||||||
|
|
||||||
### UI Frameworks
|
### UI Frameworks
|
||||||
|
|
||||||
- [Tailwind CSS](https://tailwindcss.com/) - with built-in dark mode!
|
- [Windi CSS](https://github.com/windicss/windicss) (On-demand [TailwindCSS](https://tailwindcss.com/)) - lighter and faster, with a bundle additional features!
|
||||||
- [Tailwind Typography](https://github.com/tailwindlabs/tailwindcss-typography) - Typography for Tailwind
|
- [Windi CSS Typography](https://windicss.netlify.app/guide/plugins.html#typography) - similar to [Tailwind CSS Typography](https://github.com/tailwindlabs/tailwindcss-typograph) but for Windi CSS
|
||||||
|
|
||||||
### Icons
|
### Icons
|
||||||
|
|
||||||
@@ -64,6 +64,7 @@ Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
|
|||||||
- [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts) - layouts for pages
|
- [`vite-plugin-vue-layouts`](https://github.com/JohnCampionJr/vite-plugin-vue-layouts) - layouts for pages
|
||||||
- [`vite-plugin-components`](https://github.com/antfu/vite-plugin-components) - components auto import
|
- [`vite-plugin-components`](https://github.com/antfu/vite-plugin-components) - components auto import
|
||||||
- [`vite-plugin-pwa`](https://github.com/antfu/vite-plugin-pwa) - PWA
|
- [`vite-plugin-pwa`](https://github.com/antfu/vite-plugin-pwa) - PWA
|
||||||
|
- [`vite-plugin-windicss`](https://github.com/antfu/vite-plugin-windicss) - WindiCSS support
|
||||||
- [`vite-plugin-md`](https://github.com/antfu/vite-plugin-md) - Markdown as components / components in Markdown
|
- [`vite-plugin-md`](https://github.com/antfu/vite-plugin-md) - Markdown as components / components in Markdown
|
||||||
- [`markdown-it-prism`](https://github.com/jGleitz/markdown-it-prism) - [Prism](https://prismjs.com/) for syntax highlighting
|
- [`markdown-it-prism`](https://github.com/jGleitz/markdown-it-prism) - [Prism](https://prismjs.com/) for syntax highlighting
|
||||||
- [`prism-theme-vars`](https://github.com/antfu/prism-theme-vars) - customizable Prism.js theme using CSS variables
|
- [`prism-theme-vars`](https://github.com/antfu/prism-theme-vars) - customizable Prism.js theme using CSS variables
|
||||||
@@ -74,27 +75,31 @@ Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
|
|||||||
|
|
||||||
### Coding Style
|
### Coding Style
|
||||||
|
|
||||||
- Use Composition API with [`<script setup>` SFC](https://github.com/vuejs/rfcs/pull/227)
|
- Use Composition API with [`<script setup>` SFC syntax](https://github.com/vuejs/rfcs/pull/227)
|
||||||
- [ESLint](https://eslint.org/) with [@antfu/eslint-config-vue](https://github.com/antfu/eslint-config), single quotes, no semi.
|
- [ESLint](https://eslint.org/) with [@antfu/eslint-config](https://github.com/antfu/eslint-config), single quotes, no semi.
|
||||||
|
|
||||||
### Dev tools
|
### Dev tools
|
||||||
|
|
||||||
- [TypeScript](https://www.typescriptlang.org/)
|
- [TypeScript](https://www.typescriptlang.org/)
|
||||||
- [pnpm](https://pnpm.js.org/) - fast, disk space efficient package manager
|
- [pnpm](https://pnpm.js.org/) - fast, disk space efficient package manager
|
||||||
- [`vite-ssg`](https://github.com/antfu/vite-ssg) - Server-side generation
|
- [`vite-ssg`](https://github.com/antfu/vite-ssg) - Server-side generation
|
||||||
- [Netlify](https://www.netlify.com/) - deploy
|
- [Netlify](https://www.netlify.com/) - zero-config deployment
|
||||||
- [VS Code Extensions](./.vscode/extensions.json)
|
- [VS Code Extensions](./.vscode/extensions.json)
|
||||||
- [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
|
- [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) - Fire up Vite server automatically
|
||||||
- [Iconify IntelliSense](https://marketplace.visualstudio.com/items?itemName=antfu.iconify)
|
- [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) - Vue 3 `<script setup>` IDE support
|
||||||
- [i18n Ally](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally)
|
- [Iconify IntelliSense](https://marketplace.visualstudio.com/items?itemName=antfu.iconify) - Icon inline display and autocomplete
|
||||||
- [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
|
- [i18n Ally](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally) - All in one i18n support
|
||||||
|
- [Windi CSS Intellisense](https://marketplace.visualstudio.com/items?itemName=voorjaar.windicss-intellisense) - IDE support for Windi CSS
|
||||||
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
|
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
|
||||||
|
|
||||||
## Variations
|
## Variations
|
||||||
|
|
||||||
As this template is strongly opinionated, the following provides a curated list for community maintained variations with different preferences and feature sets. Check them out as well. PR to add yours are also welcome!
|
As this template is strongly opinionated, the following provides a curated list for community maintained variations with different preferences and feature sets. Check them out as well. PR to add yours are also welcome!
|
||||||
|
|
||||||
- [vitesse-lite](https://github.com/kn0wn/vitesse-lite) by [@kn0wn](https://github.com/kn0wn)
|
- [vitesse-addons](https://github.com/JohnCampionJr/vitesse-addons) by [@johncampionjr](https://github.com/johncampionjr) - additional options for integrations, including [Prettier](https://prettier.io) and [Storybook](https://storybook.js.org)
|
||||||
|
- [vitesse-ssr-template](https://github.com/frandiox/vitesse-ssr-template) by [@frandiox](https://github.com/frandiox) - Vitesse with SSR
|
||||||
|
- [vitesse-nuxt](https://github.com/antfu/vitesse-nuxt) - Vitesse for Nuxt 2 (expiremental)
|
||||||
|
- [vitespa](https://github.com/ctholho/vitespa) - Like Vitesse but without SSG/SSR
|
||||||
|
|
||||||
## Try it now!
|
## Try it now!
|
||||||
|
|
||||||
@@ -118,7 +123,7 @@ When you use this template, try follow the checklist to update your info properl
|
|||||||
|
|
||||||
- [ ] Rename `name` field in `package.json`
|
- [ ] Rename `name` field in `package.json`
|
||||||
- [ ] Change the author name in `LICENSE`
|
- [ ] Change the author name in `LICENSE`
|
||||||
- [ ] Change the title in `index.html`
|
- [ ] Change the title in `App.vue`
|
||||||
- [ ] Change the favicon in `public`
|
- [ ] Change the favicon in `public`
|
||||||
- [ ] Remove the `.github` folder which contains the funding info
|
- [ ] Remove the `.github` folder which contains the funding info
|
||||||
- [ ] Clean up the READMEs and remove routes
|
- [ ] Clean up the READMEs and remove routes
|
||||||
|
|||||||
Vendored
+11
@@ -0,0 +1,11 @@
|
|||||||
|
// generated by vite-plugin-components
|
||||||
|
// read more https://github.com/vuejs/vue-next/pull/3399
|
||||||
|
|
||||||
|
declare module 'vue' {
|
||||||
|
export interface GlobalComponents {
|
||||||
|
Footer: typeof import('./src/components/Footer.vue')
|
||||||
|
README: typeof import('./src/components/README.md')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export { }
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
## i18n
|
## i18n
|
||||||
|
|
||||||
This directory is to serve your locale translation files. JSON under this folder would be loaded automatically and register with their filenames as locale code.
|
This directory is to serve your locale translation files. YAML under this folder would be loaded automatically and register with their filenames as locale code.
|
||||||
|
|
||||||
Check out [`vue-i18n`](https://github.com/intlify/vue-i18n-next) for more details.
|
Check out [`vue-i18n`](https://github.com/intlify/vue-i18n-next) for more details.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
button:
|
||||||
|
about: Über
|
||||||
|
back: Zurück
|
||||||
|
go: Los
|
||||||
|
home: Startseite
|
||||||
|
toggle_dark: Dunkelmodus umschalten
|
||||||
|
toggle_langs: Sprachen ändern
|
||||||
|
intro:
|
||||||
|
desc: Vite Startvorlage mit Vorlieben
|
||||||
|
dynamic-route: Demo einer dynamischen Route
|
||||||
|
hi: Hi, {name}!
|
||||||
|
whats-your-name: Wie heißt du?
|
||||||
|
not-found: Nicht gefunden
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"button": {
|
|
||||||
"about": "About",
|
|
||||||
"back": "Back",
|
|
||||||
"go": "GO",
|
|
||||||
"home": "Home",
|
|
||||||
"toggle_dark": "Toggle dark mode",
|
|
||||||
"toggle_langs": "Change languages"
|
|
||||||
},
|
|
||||||
"intro": {
|
|
||||||
"desc": "Opinionated Vite Starter Template",
|
|
||||||
"dynamic-route": "Demo of dynamic route",
|
|
||||||
"hi": "Hi, {name}!",
|
|
||||||
"whats-your-name": "What's your name?"
|
|
||||||
},
|
|
||||||
"not-found": "Not found"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
button:
|
||||||
|
about: About
|
||||||
|
back: Back
|
||||||
|
go: GO
|
||||||
|
home: Home
|
||||||
|
toggle_dark: Toggle dark mode
|
||||||
|
toggle_langs: Change languages
|
||||||
|
intro:
|
||||||
|
desc: Opinionated Vite Starter Template
|
||||||
|
dynamic-route: Demo of dynamic route
|
||||||
|
hi: Hi, {name}!
|
||||||
|
whats-your-name: What's your name?
|
||||||
|
not-found: Not found
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"button": {
|
|
||||||
"about": "Acerca de",
|
|
||||||
"back": "Atrás",
|
|
||||||
"go": "Ir",
|
|
||||||
"home": "Inicio",
|
|
||||||
"toggle_dark": "Alternar modo oscuro",
|
|
||||||
"toggle_langs": "Cambiar idiomas"
|
|
||||||
},
|
|
||||||
"intro": {
|
|
||||||
"desc": "Plantilla de Inicio de Vite Dogmática",
|
|
||||||
"dynamic-route": "Demo de ruta dinámica",
|
|
||||||
"hi": "¡Hola, {name}!",
|
|
||||||
"whats-your-name": "¿Cómo te llamas?"
|
|
||||||
},
|
|
||||||
"not-found": "No se ha encontrado"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
button:
|
||||||
|
about: Acerca de
|
||||||
|
back: Atrás
|
||||||
|
go: Ir
|
||||||
|
home: Inicio
|
||||||
|
toggle_dark: Alternar modo oscuro
|
||||||
|
toggle_langs: Cambiar idiomas
|
||||||
|
intro:
|
||||||
|
desc: Plantilla de Inicio de Vite Dogmática
|
||||||
|
dynamic-route: Demo de ruta dinámica
|
||||||
|
hi: ¡Hola, {name}!
|
||||||
|
whats-your-name: ¿Cómo te llamas?
|
||||||
|
not-found: No se ha encontrado
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"button": {
|
|
||||||
"about": "À propos de",
|
|
||||||
"back": "Retour",
|
|
||||||
"go": "Essayer",
|
|
||||||
"home": "Maison",
|
|
||||||
"toggle_dark": "Basculer en mode sombre",
|
|
||||||
"toggle_langs": "Changer de langue"
|
|
||||||
},
|
|
||||||
"intro": {
|
|
||||||
"desc": "Example d'application Vite",
|
|
||||||
"dynamic-route": "Démo de route dynamique",
|
|
||||||
"hi": "Salut, {name} !",
|
|
||||||
"whats-your-name": "Comment t'appelles-tu ?"
|
|
||||||
},
|
|
||||||
"not-found": "Page non trouvée"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
button:
|
||||||
|
about: À propos de
|
||||||
|
back: Retour
|
||||||
|
go: Essayer
|
||||||
|
home: Accueil
|
||||||
|
toggle_dark: Basculer en mode sombre
|
||||||
|
toggle_langs: Changer de langue
|
||||||
|
intro:
|
||||||
|
desc: Exemple d'application Vite
|
||||||
|
dynamic-route: Démo de route dynamique
|
||||||
|
hi: Salut, {name}!
|
||||||
|
whats-your-name: Comment t'appelles-tu ?
|
||||||
|
not-found: Page non trouvée
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
button:
|
||||||
|
about: Su di me
|
||||||
|
back: Indietro
|
||||||
|
go: Vai
|
||||||
|
home: Home
|
||||||
|
toggle_dark: Attiva/disattiva modalità scura
|
||||||
|
toggle_langs: Cambia lingua
|
||||||
|
intro:
|
||||||
|
desc: Modello per una Applicazione Vite
|
||||||
|
dynamic-route: Demo di rotta dinamica
|
||||||
|
hi: Ciao, {name}!
|
||||||
|
whats-your-name: Come ti chiami?
|
||||||
|
not-found: Non trovato
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"button": {
|
|
||||||
"about": "これは?",
|
|
||||||
"back": "戻る",
|
|
||||||
"go": "進む",
|
|
||||||
"home": "ホーム",
|
|
||||||
"toggle_dark": "ダークモード切り替え",
|
|
||||||
"toggle_langs": "言語切り替え"
|
|
||||||
},
|
|
||||||
"intro": {
|
|
||||||
"desc": "固執された Vite スターターテンプレート",
|
|
||||||
"dynamic-route": "動的ルートのデモ",
|
|
||||||
"hi": "こんにちは、{name}!",
|
|
||||||
"whats-your-name": "あなたの名前は?"
|
|
||||||
},
|
|
||||||
"not-found": "見つかりませんでした"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
button:
|
||||||
|
about: これは?
|
||||||
|
back: 戻る
|
||||||
|
go: 進む
|
||||||
|
home: ホーム
|
||||||
|
toggle_dark: ダークモード切り替え
|
||||||
|
toggle_langs: 言語切り替え
|
||||||
|
intro:
|
||||||
|
desc: 固執された Vite スターターテンプレート
|
||||||
|
dynamic-route: 動的ルートのデモ
|
||||||
|
hi: こんにちは、{name}!
|
||||||
|
whats-your-name: 君の名は。
|
||||||
|
not-found: 見つかりませんでした
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"button": {
|
|
||||||
"about": "소개",
|
|
||||||
"back": "뒤로가기",
|
|
||||||
"go": "이동",
|
|
||||||
"home": "홈",
|
|
||||||
"toggle_dark": "다크모드 토글",
|
|
||||||
"toggle_langs": "언어 변경"
|
|
||||||
},
|
|
||||||
"intro": {
|
|
||||||
"desc": "Vite 애플리케이션 템플릿",
|
|
||||||
"dynamic-route": "다이나믹 라우트 데모",
|
|
||||||
"hi": "안녕, {name}!",
|
|
||||||
"whats-your-name": "이름이 뭐예요?"
|
|
||||||
},
|
|
||||||
"not-found": "찾을 수 없습니다"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
button:
|
||||||
|
about: 소개
|
||||||
|
back: 뒤로가기
|
||||||
|
go: 이동
|
||||||
|
home: 홈
|
||||||
|
toggle_dark: 다크모드 토글
|
||||||
|
toggle_langs: 언어 변경
|
||||||
|
intro:
|
||||||
|
desc: Vite 애플리케이션 템플릿
|
||||||
|
dynamic-route: 다이나믹 라우트 데모
|
||||||
|
hi: 안녕, {name}!
|
||||||
|
whats-your-name: 이름이 뭐예요?
|
||||||
|
not-found: 찾을 수 없습니다
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
button:
|
||||||
|
about: Sobre
|
||||||
|
back: Voltar
|
||||||
|
go: Ir
|
||||||
|
home: Início
|
||||||
|
toggle_dark: Alternar modo escuro
|
||||||
|
toggle_langs: Mudar de idioma
|
||||||
|
intro:
|
||||||
|
desc: Modelo Opinativo de Partida de Vite
|
||||||
|
dynamic-route: Demonstração de rota dinâmica
|
||||||
|
hi: Olá, {name}!
|
||||||
|
whats-your-name: Qual é o seu nome?
|
||||||
|
not-found: Não encontrado
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
button:
|
||||||
|
about: О шаблоне
|
||||||
|
back: Назад
|
||||||
|
go: Перейти
|
||||||
|
home: Главная
|
||||||
|
toggle_dark: Включить темный режим
|
||||||
|
toggle_langs: Сменить язык
|
||||||
|
intro:
|
||||||
|
desc: Самостоятельный начальный шаблон Vite
|
||||||
|
dynamic-route: Демо динамического маршрута
|
||||||
|
hi: Привет, {name}!
|
||||||
|
whats-your-name: Как тебя зовут?
|
||||||
|
not-found: Не найден
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"button": {
|
|
||||||
"about": "Hakkımda",
|
|
||||||
"back": "Geri",
|
|
||||||
"go": "İLERİ",
|
|
||||||
"home": "Anasayfa",
|
|
||||||
"toggle_dark": "Karanlık modu değiştir",
|
|
||||||
"toggle_langs": "Dilleri değiştir"
|
|
||||||
},
|
|
||||||
"intro": {
|
|
||||||
"desc": "Görüşlü Vite Başlangıç Şablonu",
|
|
||||||
"dynamic-route": "Dinamik rota demosu",
|
|
||||||
"hi": "Merhaba, {name}!",
|
|
||||||
"whats-your-name": "Adınız nedir ?"
|
|
||||||
},
|
|
||||||
"not-found": "Bulunamadı"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
button:
|
||||||
|
about: Hakkımda
|
||||||
|
back: Geri
|
||||||
|
go: İLERİ
|
||||||
|
home: Anasayfa
|
||||||
|
toggle_dark: Karanlık modu değiştir
|
||||||
|
toggle_langs: Dilleri değiştir
|
||||||
|
intro:
|
||||||
|
desc: Görüşlü Vite Başlangıç Şablonu
|
||||||
|
dynamic-route: Dinamik rota demosu
|
||||||
|
hi: Merhaba, {name}!
|
||||||
|
whats-your-name: Adınız nedir?
|
||||||
|
not-found: Bulunamadı
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"button": {
|
|
||||||
"back": "Quay lại",
|
|
||||||
"go": "Đi"
|
|
||||||
},
|
|
||||||
"intro": {
|
|
||||||
"desc": "Ý kiến cá nhân Vite Template để bắt đầu",
|
|
||||||
"dynamic-route": "Bản giới thiệu về dynamic route",
|
|
||||||
"hi": "Hi, {name}!",
|
|
||||||
"whats-your-name": "Tên bạn là gì?"
|
|
||||||
},
|
|
||||||
"not-found": "Không tìm thấy"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
button:
|
||||||
|
about: Về
|
||||||
|
back: Quay lại
|
||||||
|
go: Đi
|
||||||
|
home: Khởi đầu
|
||||||
|
toggle_dark: Chuyển đổi chế độ tối
|
||||||
|
toggle_langs: Thay đổi ngôn ngữ
|
||||||
|
intro:
|
||||||
|
desc: Ý kiến cá nhân Vite Template để bắt đầu
|
||||||
|
dynamic-route: Bản giới thiệu về dynamic route
|
||||||
|
hi: Hi, {name}!
|
||||||
|
whats-your-name: Tên bạn là gì?
|
||||||
|
not-found: Không tìm thấy
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"button": {
|
|
||||||
"about": "关于",
|
|
||||||
"back": "返回",
|
|
||||||
"go": "确定",
|
|
||||||
"home": "首页",
|
|
||||||
"toggle_dark": "切换深色模式",
|
|
||||||
"toggle_langs": "切换语言"
|
|
||||||
},
|
|
||||||
"intro": {
|
|
||||||
"desc": "固执己见的 Vite 项目模板",
|
|
||||||
"dynamic-route": "动态路由演示",
|
|
||||||
"hi": "你好,{name}!",
|
|
||||||
"whats-your-name": "输入你的名字"
|
|
||||||
},
|
|
||||||
"not-found": "未找到页面"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
button:
|
||||||
|
about: 关于
|
||||||
|
back: 返回
|
||||||
|
go: 确定
|
||||||
|
home: 首页
|
||||||
|
toggle_dark: 切换深色模式
|
||||||
|
toggle_langs: 切换语言
|
||||||
|
intro:
|
||||||
|
desc: 固执己见的 Vite 项目模板
|
||||||
|
dynamic-route: 动态路由演示
|
||||||
|
hi: 你好,{name}
|
||||||
|
whats-your-name: 输入你的名字
|
||||||
|
not-found: 未找到页面
|
||||||
+31
-38
@@ -2,50 +2,43 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --port 3333 --open",
|
"dev": "vite --port 3333 --open",
|
||||||
"build": "cross-env NODE_ENV=production vite-ssg build"
|
"build": "cross-env NODE_ENV=production vite-ssg build",
|
||||||
|
"preview": "vite preview",
|
||||||
|
"preview-https": "serve dist"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vueuse/core": "^4.1.1",
|
"@vueuse/core": "^4.11.1",
|
||||||
"@vueuse/head": "^0.2.3",
|
"@vueuse/head": "^0.5.1",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"prism-theme-vars": "^0.1.4",
|
"prism-theme-vars": "^0.2.2",
|
||||||
"vue": "^3.0.5",
|
"vue": "^3.0.11",
|
||||||
"vue-i18n": "^9.0.0-rc.7",
|
"vue-i18n": "^9.1.6",
|
||||||
"vue-router": "^4.0.3"
|
"vue-router": "^4.0.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^0.4.3",
|
"@antfu/eslint-config": "^0.6.5",
|
||||||
"@iconify/json": "^1.1.303",
|
"@iconify/json": "^1.1.348",
|
||||||
"@intlify/vite-plugin-vue-i18n": "^1.0.0-beta.17",
|
"@intlify/vite-plugin-vue-i18n": "^2.1.2",
|
||||||
"@tailwindcss/typography": "^0.4.0",
|
|
||||||
"@types/nprogress": "^0.2.0",
|
"@types/nprogress": "^0.2.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.15.1",
|
"@typescript-eslint/eslint-plugin": "^4.25.0",
|
||||||
"@vitejs/plugin-vue": "^1.1.4",
|
"@vitejs/plugin-vue": "^1.2.2",
|
||||||
"@vue/compiler-sfc": "^3.0.5",
|
"@vue/compiler-sfc": "^3.0.11",
|
||||||
"@vue/server-renderer": "^3.0.5",
|
"@vue/server-renderer": "^3.0.11",
|
||||||
"autoprefixer": "^10.2.4",
|
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^7.20.0",
|
"eslint": "^7.27.0",
|
||||||
"markdown-it-prism": "^2.1.4",
|
"https-localhost": "^4.6.5",
|
||||||
"pnpm": "^5.17.2",
|
"markdown-it-prism": "^2.1.6",
|
||||||
"postcss": "^8.2.6",
|
"pnpm": "^6.5.0",
|
||||||
"postcss-nested": "^5.0.3",
|
"typescript": "^4.2.4",
|
||||||
"tailwindcss": "^2.0.3",
|
"vite": "^2.3.4",
|
||||||
"typescript": "^4.1.5",
|
"vite-plugin-components": "^0.10.1",
|
||||||
"vite": "^2.0.1",
|
"vite-plugin-icons": "^0.5.1",
|
||||||
"vite-plugin-components": "^0.6.12",
|
"vite-plugin-md": "^0.6.7",
|
||||||
"vite-plugin-icons": "^0.2.2",
|
"vite-plugin-pages": "^0.12.1",
|
||||||
"vite-plugin-md": "^0.5.1",
|
"vite-plugin-pwa": "^0.7.3",
|
||||||
"vite-plugin-pages": "^0.4.4",
|
"vite-plugin-vue-layouts": "^0.3.1",
|
||||||
"vite-plugin-pwa": "^0.4.7",
|
"vite-plugin-windicss": "^0.16.0",
|
||||||
"vite-plugin-vue-layouts": "^0.2.2",
|
"vite-ssg": "^0.11.1",
|
||||||
"vite-ssg": "^0.8.9"
|
"vue-tsc": "^0.1.6"
|
||||||
},
|
|
||||||
"eslintConfig": {
|
|
||||||
"extends": "@antfu/eslint-config",
|
|
||||||
"rules": {
|
|
||||||
"no-unused-vars": "off",
|
|
||||||
"@typescript-eslint/no-unused-vars": "off"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Generated
+5527
-3785
File diff suppressed because it is too large.
Load diff
@@ -1,7 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
plugins: {
|
|
||||||
'postcss-nested': {},
|
|
||||||
tailwindcss: {},
|
|
||||||
autoprefixer: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
+1
-1
@@ -3,7 +3,7 @@ import { useHead } from '@vueuse/head'
|
|||||||
|
|
||||||
// https://github.com/vueuse/head
|
// https://github.com/vueuse/head
|
||||||
// you can use this to manipulate the document head in any components,
|
// you can use this to manipulate the document head in any components,
|
||||||
// they will be renedered correctly in the html results with vite-ssg
|
// they will be rendered correctly in the html results with vite-ssg
|
||||||
useHead({
|
useHead({
|
||||||
title: 'Vitesse',
|
title: 'Vitesse',
|
||||||
meta: [
|
meta: [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { isDark, toggleDark } from '~/logics'
|
import { isDark, toggleDark } from '~/logic'
|
||||||
|
|
||||||
const { t, availableLocales, locale } = useI18n()
|
const { t, availableLocales, locale } = useI18n()
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ Components in this dir will be auto-registered and on-demand, powered by [`vite-
|
|||||||
|
|
||||||
### Icons
|
### Icons
|
||||||
|
|
||||||
You can uses icons from almost any icon sets by the power of [Iconify](https://iconify.design/).
|
You can use icons from almost any icon sets by the power of [Iconify](https://iconify.design/).
|
||||||
|
|
||||||
It will only bundles the icons you use, check out [vite-plugin-icons](https://github.com/antfu/vite-plugin-icons) for more details.
|
It will only bundle the icons you use. Check out [vite-plugin-icons](https://github.com/antfu/vite-plugin-icons) for more details.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import { useDark, useToggle } from '@vueuse/core'
|
||||||
|
|
||||||
|
export const isDark = useDark()
|
||||||
|
export const toggleDark = useToggle(isDark)
|
||||||
File renamed without changes.
@@ -1,25 +0,0 @@
|
|||||||
import { watch, computed } from 'vue'
|
|
||||||
import { usePreferredDark, useToggle } from '@vueuse/core'
|
|
||||||
import { colorSchema } from './store'
|
|
||||||
|
|
||||||
const preferredDark = usePreferredDark()
|
|
||||||
|
|
||||||
export const isDark = computed({
|
|
||||||
get() {
|
|
||||||
return colorSchema.value === 'auto' ? preferredDark.value : colorSchema.value === 'dark'
|
|
||||||
},
|
|
||||||
set(v: boolean) {
|
|
||||||
if (v === preferredDark.value)
|
|
||||||
colorSchema.value = 'auto'
|
|
||||||
else
|
|
||||||
colorSchema.value = v ? 'dark' : 'light'
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
export const toggleDark = useToggle(isDark)
|
|
||||||
|
|
||||||
watch(
|
|
||||||
isDark,
|
|
||||||
v => typeof document !== 'undefined' && document.documentElement.classList.toggle('dark', v),
|
|
||||||
{ immediate: true },
|
|
||||||
)
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
import { Ref } from 'vue'
|
|
||||||
import { useStorage } from '@vueuse/core'
|
|
||||||
|
|
||||||
export const colorSchema = useStorage('color-schema', 'auto') as Ref<'auto' | 'dark' | 'light'>
|
|
||||||
+5
-9
@@ -1,14 +1,10 @@
|
|||||||
// this allows much faster HMR
|
|
||||||
// discussed here: https://github.com/tailwindlabs/tailwindcss/issues/2820
|
|
||||||
import './styles/tw-base.postcss'
|
|
||||||
import './styles/tw-components.postcss'
|
|
||||||
import './styles/tw-utilities.postcss'
|
|
||||||
import './styles/main.postcss'
|
|
||||||
|
|
||||||
import { ViteSSG } from 'vite-ssg'
|
import { ViteSSG } from 'vite-ssg'
|
||||||
import generatedRoutes from 'pages-generated'
|
import generatedRoutes from 'virtual:generated-pages'
|
||||||
import { setupLayouts } from 'layouts-generated'
|
import { setupLayouts } from 'virtual:generated-layouts'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
|
import 'virtual:windi.css'
|
||||||
|
import 'virtual:windi-devtools'
|
||||||
|
import './styles/main.css'
|
||||||
|
|
||||||
const routes = setupLayouts(generatedRoutes)
|
const routes = setupLayouts(generatedRoutes)
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -5,9 +5,10 @@ import { UserModule } from '~/types'
|
|||||||
// https://vitejs.dev/guide/features.html#glob-import
|
// https://vitejs.dev/guide/features.html#glob-import
|
||||||
const messages = Object.fromEntries(
|
const messages = Object.fromEntries(
|
||||||
Object.entries(
|
Object.entries(
|
||||||
import.meta.globEager('../../locales/*.json'))
|
import.meta.globEager('../../locales/*.y(a)?ml'))
|
||||||
.map(([key, value]) => {
|
.map(([key, value]) => {
|
||||||
return [key.slice(14, -5), value.default]
|
const yaml = key.endsWith('.yaml')
|
||||||
|
return [key.slice(14, yaml ? -5 : -4), value.default]
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { UserModule } from '~/types'
|
||||||
|
|
||||||
|
// https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available
|
||||||
|
export const install: UserModule = ({ isClient, router }) => {
|
||||||
|
if (!isClient)
|
||||||
|
return
|
||||||
|
|
||||||
|
router.isReady().then(async() => {
|
||||||
|
const { registerSW } = await import('virtual:pwa-register')
|
||||||
|
registerSW({ immediate: true })
|
||||||
|
})
|
||||||
|
}
|
||||||
+4
-4
@@ -1,6 +1,6 @@
|
|||||||
## File-based Routing
|
## File-based Routing
|
||||||
|
|
||||||
Routes will auto-generated for Vue files in this dir with the same file structure.
|
Routes will be auto-generated for Vue files in this dir with the same file structure.
|
||||||
Check out [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) for more details.
|
Check out [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) for more details.
|
||||||
|
|
||||||
### Path Aliasing
|
### Path Aliasing
|
||||||
@@ -10,11 +10,11 @@ Check out [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) f
|
|||||||
For example, instead of having
|
For example, instead of having
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { isDark } from '../../../../logics'
|
import { isDark } from '../../../../logic'
|
||||||
```
|
```
|
||||||
|
|
||||||
now you can use
|
now, you can use
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { isDark } from '~/logics'
|
import { isDark } from '~/logic'
|
||||||
```
|
```
|
||||||
+1
-1
@@ -8,7 +8,7 @@ title: About
|
|||||||
<h3>About</h3>
|
<h3>About</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
[Vitesse](https://github.com/antfu/vitesse) is an opinionated [Vite](https://github.com/vitejs/vite) starter template made by [@antfu](https://github.com/antfu) for mocking apps swiftly. With **file-based routing**, **components auto importing**, **markdown support**, I18n, PWA and uses **Tailwind** v2 for UI.
|
[Vitesse](https://github.com/antfu/vitesse) is an opinionated [Vite](https://github.com/vitejs/vite) starter template made by [@antfu](https://github.com/antfu) for mocking apps swiftly. With **file-based routing**, **components auto importing**, **markdown support**, I18n, PWA and uses **WindiCSS** for UI.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// syntax highlighting example
|
// syntax highlighting example
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
@import './markdown.postcss';
|
@import './markdown.css';
|
||||||
|
|
||||||
html,
|
html,
|
||||||
body,
|
body,
|
||||||
#app {
|
#app {
|
||||||
height: 100vh;
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
html.dark {
|
html.dark {
|
||||||
background: #222;
|
background: #121212;
|
||||||
}
|
}
|
||||||
|
|
||||||
#nprogress {
|
#nprogress {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.bar {
|
#nprogress .bar {
|
||||||
@apply bg-teal-600 opacity-75;
|
@apply bg-teal-600 opacity-75;
|
||||||
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1031;
|
z-index: 1031;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
@@ -8,36 +8,42 @@
|
|||||||
html:not(.dark) {
|
html:not(.dark) {
|
||||||
--prism-foreground: #393a34;
|
--prism-foreground: #393a34;
|
||||||
--prism-background: #fbfbfb;
|
--prism-background: #fbfbfb;
|
||||||
--prism-comment: #8e8f8e;
|
--prism-comment: #a0ada0;
|
||||||
--prism-string: #a1644c;
|
--prism-string: #b56959;
|
||||||
--prism-literal: #3a9c9b;
|
--prism-literal: #2f8a89;
|
||||||
--prism-keyword: #248358;
|
--prism-number: #296aa3;
|
||||||
--prism-function: #7e8a42;
|
--prism-keyword: #1c6b48;
|
||||||
|
--prism-function: #6c7834;
|
||||||
|
--prism-boolean: #1c6b48;
|
||||||
|
--prism-constant: #a65e2b;
|
||||||
--prism-deleted: #a14f55;
|
--prism-deleted: #a14f55;
|
||||||
--prism-class: #2b91af;
|
--prism-class: #2993a3;
|
||||||
--prism-builtin: #a52727;
|
--prism-builtin: #ab5959;
|
||||||
--prism-property: #ad502b;
|
--prism-property: #b58451;
|
||||||
--prism-namespace: #c96880;
|
--prism-namespace: #b05a78;
|
||||||
--prism-punctuation: #8e8f8b;
|
--prism-punctuation: #8e8f8b;
|
||||||
--prism-decorator: #bd8f8f;
|
--prism-decorator: #bd8f8f;
|
||||||
|
--prism-regex: #ab5e3f;
|
||||||
--prism-json-property: #698c96;
|
--prism-json-property: #698c96;
|
||||||
}
|
}
|
||||||
|
|
||||||
html.dark {
|
html.dark {
|
||||||
--prism-scheme: dark;
|
|
||||||
--prism-foreground: #d4cfbf;
|
--prism-foreground: #d4cfbf;
|
||||||
--prism-background: #1e1e1e;
|
--prism-background: #151515;
|
||||||
--prism-comment: #758575;
|
--prism-comment: #758575;
|
||||||
--prism-string: #ce9178;
|
--prism-string: #d48372;
|
||||||
--prism-literal: #4fb09d;
|
--prism-literal: #429988;
|
||||||
--prism-keyword: #4d9375;
|
--prism-keyword: #4d9375;
|
||||||
--prism-function: #c2c275;
|
--prism-boolean: #1c6b48;
|
||||||
|
--prism-number: #6394bf;
|
||||||
|
--prism-variable: #c2b36e;
|
||||||
|
--prism-function: #a1b567;
|
||||||
--prism-deleted: #a14f55;
|
--prism-deleted: #a14f55;
|
||||||
--prism-class: #5ebaa8;
|
--prism-class: #54b1bf;
|
||||||
--prism-builtin: #cb7676;
|
--prism-builtin: #e0a569;
|
||||||
--prism-property: #dd8e6e;
|
--prism-property: #dd8e6e;
|
||||||
--prism-namespace: #c96880;
|
--prism-namespace: #db889a;
|
||||||
--prism-punctuation: #d4d4d4;
|
--prism-punctuation: #858585;
|
||||||
--prism-decorator: #bd8f8f;
|
--prism-decorator: #bd8f8f;
|
||||||
--prism-regex: #ab5e3f;
|
--prism-regex: #ab5e3f;
|
||||||
--prism-json-property: #6b8b9e;
|
--prism-json-property: #6b8b9e;
|
||||||
@@ -46,10 +52,3 @@ html.dark {
|
|||||||
--prism-line-highlight-background: #444444;
|
--prism-line-highlight-background: #444444;
|
||||||
--prism-selection-background: #444444;
|
--prism-selection-background: #444444;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fix tailwind typography in darkmode */
|
|
||||||
.prose {
|
|
||||||
a code {
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
@import 'tailwindcss/base';
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
@import 'tailwindcss/components';
|
|
||||||
/*
|
|
||||||
html,
|
|
||||||
body,
|
|
||||||
#app {
|
|
||||||
height: 100vh;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
html.dark {
|
|
||||||
background: #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
#nprogress {
|
|
||||||
pointer-events: none;
|
|
||||||
|
|
||||||
.bar {
|
|
||||||
@apply bg-teal-600 opacity-75;
|
|
||||||
|
|
||||||
position: fixed;
|
|
||||||
z-index: 1031;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
height: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
@apply 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 {
|
|
||||||
@apply inline-block cursor-pointer select-none
|
|
||||||
opacity-75 transition duration-200 ease-in-out
|
|
||||||
hover:opacity-100 hover:text-teal-600;
|
|
||||||
font-size: 0.8em;
|
|
||||||
} */
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
@import 'tailwindcss/utilities';
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
||||||
const colors = require('tailwindcss/colors')
|
|
||||||
const typography = require('@tailwindcss/typography')
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
purge: {
|
|
||||||
enabled: process.env.NODE_ENV === 'production',
|
|
||||||
content: [
|
|
||||||
'./index.html',
|
|
||||||
'./src/**/*.vue',
|
|
||||||
'./src/**/*.md',
|
|
||||||
'./src/**/*.js',
|
|
||||||
'./src/**/*.ts',
|
|
||||||
],
|
|
||||||
options: {
|
|
||||||
safelist: ['prose', 'prose-sm', 'm-auto'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
variants: {
|
|
||||||
extend: {
|
|
||||||
cursor: ['disabled'],
|
|
||||||
backgroundColor: ['disabled'],
|
|
||||||
borderColor: ['active', 'disabled'],
|
|
||||||
textColor: ['active', 'disabled'],
|
|
||||||
opacity: ['dark', 'active', 'disabled'],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
darkMode: 'class',
|
|
||||||
plugins: [typography],
|
|
||||||
theme: {
|
|
||||||
extend: {
|
|
||||||
colors: {
|
|
||||||
teal: colors.teal,
|
|
||||||
},
|
|
||||||
typography: {
|
|
||||||
DEFAULT: {
|
|
||||||
css: {
|
|
||||||
color: 'inherit',
|
|
||||||
a: {
|
|
||||||
color: 'inherit',
|
|
||||||
opacity: 0.75,
|
|
||||||
'&:hover': {
|
|
||||||
opacity: 1,
|
|
||||||
color: colors.teal[600],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
b: { color: 'inherit' },
|
|
||||||
strong: { color: 'inherit' },
|
|
||||||
em: { color: 'inherit' },
|
|
||||||
h1: { color: 'inherit' },
|
|
||||||
h2: { color: 'inherit' },
|
|
||||||
h3: { color: 'inherit' },
|
|
||||||
h4: { color: 'inherit' },
|
|
||||||
code: { color: 'inherit' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
+1
-2
@@ -6,7 +6,7 @@
|
|||||||
"lib": ["DOM", "ESNext"],
|
"lib": ["DOM", "ESNext"],
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"incremental": true,
|
"incremental": false,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
@@ -15,7 +15,6 @@
|
|||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"types": [
|
"types": [
|
||||||
"vite/client",
|
"vite/client",
|
||||||
"vite-plugin-pages/client",
|
|
||||||
"vite-plugin-vue-layouts/client"
|
"vite-plugin-vue-layouts/client"
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
|
|||||||
+9
-1
@@ -6,6 +6,7 @@ import Layouts from 'vite-plugin-vue-layouts'
|
|||||||
import ViteIcons, { ViteIconsResolver } from 'vite-plugin-icons'
|
import ViteIcons, { ViteIconsResolver } from 'vite-plugin-icons'
|
||||||
import ViteComponents from 'vite-plugin-components'
|
import ViteComponents from 'vite-plugin-components'
|
||||||
import Markdown from 'vite-plugin-md'
|
import Markdown from 'vite-plugin-md'
|
||||||
|
import WindiCSS from 'vite-plugin-windicss'
|
||||||
import { VitePWA } from 'vite-plugin-pwa'
|
import { VitePWA } from 'vite-plugin-pwa'
|
||||||
import VueI18n from '@intlify/vite-plugin-vue-i18n'
|
import VueI18n from '@intlify/vite-plugin-vue-i18n'
|
||||||
import Prism from 'markdown-it-prism'
|
import Prism from 'markdown-it-prism'
|
||||||
@@ -47,6 +48,8 @@ export default defineConfig({
|
|||||||
// allow auto import and register components used in markdown
|
// allow auto import and register components used in markdown
|
||||||
customLoaderMatcher: id => id.endsWith('.md'),
|
customLoaderMatcher: id => id.endsWith('.md'),
|
||||||
|
|
||||||
|
globalComponentsDeclaration: true,
|
||||||
|
|
||||||
// auto import icons
|
// auto import icons
|
||||||
customComponentResolvers: [
|
customComponentResolvers: [
|
||||||
// https://github.com/antfu/vite-plugin-icons
|
// https://github.com/antfu/vite-plugin-icons
|
||||||
@@ -60,9 +63,14 @@ export default defineConfig({
|
|||||||
// https://github.com/antfu/vite-plugin-icons
|
// https://github.com/antfu/vite-plugin-icons
|
||||||
ViteIcons(),
|
ViteIcons(),
|
||||||
|
|
||||||
|
// https://github.com/antfu/vite-plugin-windicss
|
||||||
|
WindiCSS({
|
||||||
|
safelist: 'prose prose-sm m-auto text-left',
|
||||||
|
}),
|
||||||
|
|
||||||
// https://github.com/antfu/vite-plugin-pwa
|
// https://github.com/antfu/vite-plugin-pwa
|
||||||
VitePWA({
|
VitePWA({
|
||||||
inlineRegister: false,
|
registerType: 'autoUpdate',
|
||||||
manifest: {
|
manifest: {
|
||||||
name: 'Vitesse',
|
name: 'Vitesse',
|
||||||
short_name: 'Vitesse',
|
short_name: 'Vitesse',
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import { defineConfig } from 'vite-plugin-windicss'
|
||||||
|
import colors from 'windicss/colors'
|
||||||
|
import typography from 'windicss/plugin/typography'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
darkMode: 'class',
|
||||||
|
plugins: [
|
||||||
|
typography(),
|
||||||
|
],
|
||||||
|
attributify: true,
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
typography: {
|
||||||
|
DEFAULT: {
|
||||||
|
css: {
|
||||||
|
maxWidth: '65ch',
|
||||||
|
color: 'inherit',
|
||||||
|
a: {
|
||||||
|
'color': 'inherit',
|
||||||
|
'opacity': 0.75,
|
||||||
|
'fontWeight': '500',
|
||||||
|
'textDecoration': 'underline',
|
||||||
|
'&:hover': {
|
||||||
|
opacity: 1,
|
||||||
|
color: colors.teal[600],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
b: { color: 'inherit' },
|
||||||
|
strong: { color: 'inherit' },
|
||||||
|
em: { color: 'inherit' },
|
||||||
|
h1: { color: 'inherit' },
|
||||||
|
h2: { color: 'inherit' },
|
||||||
|
h3: { color: 'inherit' },
|
||||||
|
h4: { color: 'inherit' },
|
||||||
|
code: { color: 'inherit' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
Reference in new issue
Block a user