diff --git a/LICENSE b/LICENSE index a15baef..9bae1a2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Anthony Fu // free feel to change it to your name. +Copyright (c) 2020 Anthony Fu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 25da18f..c4dff32 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,14 @@ - 📲 [PWA](https://github.com/antfu/vite-plugin-pwa) -- 🎨 TailwindCSS with dark mode out-of-box +- 🎨 [TailwindCSS **v2.0**](https://blog.tailwindcss.com/tailwindcss-v2) with dark mode out-of-box - 😃 [Use icons from any icon sets, with no compromise](./src/components) - 🌍 [i18n ready](./locales) +- 🔥 Use the [new ` diff --git a/src/pages/hi/[name].vue b/src/pages/hi/[name].vue index 4eca2ef..66fdfab 100644 --- a/src/pages/hi/[name].vue +++ b/src/pages/hi/[name].vue @@ -14,7 +14,7 @@
@@ -22,17 +22,18 @@
- diff --git a/src/pages/index.vue b/src/pages/index.vue index f5e68ae..d7e9813 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -39,14 +39,13 @@ import { ref } from 'vue' import { useRouter } from 'vue-router' import { useI18n } from 'vue-i18n' -export const name = ref('') +const name = ref('') const router = useRouter() -export const go = () => { +const go = () => { if (name.value) router.push(`/hi/${name.value}`) } const { t } = useI18n() -export { t } diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts new file mode 100644 index 0000000..515d323 --- /dev/null +++ b/src/plugins/i18n.ts @@ -0,0 +1,12 @@ +import { App } from 'vue' +import { createI18n } from 'vue-i18n' +import { messages } from '../messages' + +export default (app: App) => { + const i18n = createI18n({ + locale: 'en', + messages, + }) + + app.use(i18n) +} diff --git a/src/plugins/icons.ts b/src/plugins/icons.ts new file mode 100644 index 0000000..bf41c02 --- /dev/null +++ b/src/plugins/icons.ts @@ -0,0 +1,2 @@ +// import icons data generated by PurgeIcons +import '@purge-icons/generated' diff --git a/src/plugins/index.ts b/src/plugins/index.ts new file mode 100644 index 0000000..e640371 --- /dev/null +++ b/src/plugins/index.ts @@ -0,0 +1,8 @@ +import { App } from 'vue' +import installRouter from './router' +import installI18n from './i18n' + +export default (app: App) => { + installRouter(app) + installI18n(app) +} diff --git a/src/plugins/router.ts b/src/plugins/router.ts new file mode 100644 index 0000000..5e5bf40 --- /dev/null +++ b/src/plugins/router.ts @@ -0,0 +1,13 @@ +import { App } from 'vue' +// import routes generated by Voie +import { createRouter, createWebHistory } from 'vue-router' +import routes from 'voie-pages' + +export default (app: App) => { + const router = createRouter({ + history: createWebHistory(), + routes, + }) + + app.use(router) +} diff --git a/src/store/index.ts b/src/store/index.ts deleted file mode 100644 index 87c2c0a..0000000 --- a/src/store/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './local' diff --git a/src/store/local.ts b/src/store/local.ts deleted file mode 100644 index 45fe7cb..0000000 --- a/src/store/local.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Ref } from 'vue' -import { useStorage } from '@vueuse/core' - -export const colorSchema = useStorage('vitesse-schema', 'auto') as Ref<'auto' | 'dark' | 'light'> diff --git a/src/utils/index.ts b/src/utils/index.ts deleted file mode 100644 index e8d1566..0000000 --- a/src/utils/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dark' diff --git a/tailwind.config.js b/tailwind.config.js index 8f48a78..10fe4ad 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,4 +1,5 @@ /* eslint-disable @typescript-eslint/no-var-requires */ +const colors = require('tailwindcss/colors') module.exports = { purge: { @@ -12,6 +13,9 @@ module.exports = { }, theme: { extend: { + colors: { + teal: colors.teal, + }, opacity: { 10: '0.1', 85: '0.85', @@ -25,17 +29,5 @@ module.exports = { textColor: ['dark', 'hover', 'active', 'disabled'], opacity: ['dark', 'hover', 'active', 'focus', 'disabled'], }, - future: { - purgeLayersByDefault: true, - removeDeprecatedGapUtilities: true, - }, - experimental: { - darkModeVariant: true, - applyComplexClasses: true, - uniformColorPalette: true, - extendedSpacingScale: true, - defaultLineHeights: true, - extendedFontSizeScale: true, - }, - dark: 'class', + darkMode: 'class', }