diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..66240cd69c7055bdeaebf559817543d0a06c9e8e --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* +package-lock.json + +node_modules +.DS_Store +dist +dist-ssr +coverage +*.local + +/cypress/videos/ +/cypress/screenshots/ + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.inscode b/.inscode index fc90fcf343d827601679bd6a163e84ee4f4edfbb..910e81920bc006f3cc1ce1be771d2d687915a352 100644 --- a/.inscode +++ b/.inscode @@ -1,4 +1,4 @@ -run = "cowsay 欢迎来到 InsCode" +run = "upm add guess;npm run dev" [nix] channel = "stable-22_11" diff --git a/.upm/store.json b/.upm/store.json new file mode 100644 index 0000000000000000000000000000000000000000..61357924aeae3d24ae38650f704d85e36a454ad3 --- /dev/null +++ b/.upm/store.json @@ -0,0 +1 @@ +{"version":2,"languages":{"nodejs-npm":{"specfileHash":"58c9ae4e8687db16ea7925086afedf3b","lockfileHash":"2157a76123c004596bbf191d5ad4beb8"}}} diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2cb2a8034c0d032a113efc6e0e720dfbf78704fd --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# VueJS-with-Vite + +Vue.js 是基于 JavaScript 构建用户界面的库。该模板使用 Vite 来提供应用程序服务。 + +## 推荐的IDE设置 + +[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). + +## 自定义配置 + +请参阅 [[Vite配置参考](https://vitejs.dev/config/). + +## 项目设置 + +```sh +npm install +``` + +### 在开发环境中启动和热更新 + +```sh +npm run dev +``` + +### 编译用于生产环境 + +```sh +npm run build +``` diff --git a/index.html b/index.html new file mode 100644 index 0000000000000000000000000000000000000000..030a6ff51bfc6f6adcc472f6d8c02db92ce947a8 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite App + + +
+ + + diff --git a/inscode.nix b/inscode.nix index 2a5879a58618e489038072b8c86903e4384a77b8..2ffbcf4ad06b1709ec3a3b148e6992e734ae76e4 100644 --- a/inscode.nix +++ b/inscode.nix @@ -1,5 +1,6 @@ { pkgs }: { deps = [ - pkgs.cowsay + pkgs.yarn + pkgs.nodejs-16_x ]; -} +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000000000000000000000000000000000000..aa1c7deb0adb6e6aea5a1380426189ac24eee7a7 --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "vuejs-with-vite", + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview --port 4173" + }, + "dependencies": { + "guess": "^1.0.2", + "vue": "^3.2.37" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^3.0.1", + "vite": "^3.0.1" + } +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..df36fcfb72584e00488330b560ebcf34a41c64c2 Binary files /dev/null and b/public/favicon.ico differ diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000000000000000000000000000000000000..633a5dfe4e547c48bfa93740a290ba5ba370930a --- /dev/null +++ b/src/App.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/src/assets/base.css b/src/assets/base.css new file mode 100644 index 0000000000000000000000000000000000000000..71dc55a3cb5a72589496743a327c738ead3e1c83 --- /dev/null +++ b/src/assets/base.css @@ -0,0 +1,74 @@ +/* color palette from */ +:root { + --vt-c-white: #ffffff; + --vt-c-white-soft: #f8f8f8; + --vt-c-white-mute: #f2f2f2; + + --vt-c-black: #181818; + --vt-c-black-soft: #222222; + --vt-c-black-mute: #282828; + + --vt-c-indigo: #2c3e50; + + --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); + --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); + --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); + --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); + + --vt-c-text-light-1: var(--vt-c-indigo); + --vt-c-text-light-2: rgba(60, 60, 60, 0.66); + --vt-c-text-dark-1: var(--vt-c-white); + --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); +} + +/* semantic color variables for this project */ +:root { + --color-background: var(--vt-c-white); + --color-background-soft: var(--vt-c-white-soft); + --color-background-mute: var(--vt-c-white-mute); + + --color-border: var(--vt-c-divider-light-2); + --color-border-hover: var(--vt-c-divider-light-1); + + --color-heading: var(--vt-c-text-light-1); + --color-text: var(--vt-c-text-light-1); + + --section-gap: 160px; +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--vt-c-black); + --color-background-soft: var(--vt-c-black-soft); + --color-background-mute: var(--vt-c-black-mute); + + --color-border: var(--vt-c-divider-dark-2); + --color-border-hover: var(--vt-c-divider-dark-1); + + --color-heading: var(--vt-c-text-dark-1); + --color-text: var(--vt-c-text-dark-2); + } +} + +*, +*::before, +*::after { + box-sizing: border-box; + margin: 0; + position: relative; + font-weight: normal; +} + +body { + min-height: 100vh; + color: var(--color-text); + background: var(--color-background); + transition: color 0.5s, background-color 0.5s; + line-height: 1.6; + font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, + Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; + font-size: 15px; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} diff --git a/src/assets/logo.svg b/src/assets/logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..bc826fed80ad0c846e5ca25978776f555f4a2370 --- /dev/null +++ b/src/assets/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/main.css b/src/assets/main.css new file mode 100644 index 0000000000000000000000000000000000000000..c133f9156b43080992482c4805bb9d6ad813c187 --- /dev/null +++ b/src/assets/main.css @@ -0,0 +1,35 @@ +@import "./base.css"; + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + + font-weight: normal; +} + +a, +.green { + text-decoration: none; + color: hsla(160, 100%, 37%, 1); + transition: 0.4s; +} + +@media (hover: hover) { + a:hover { + background-color: hsla(160, 100%, 37%, 0.2); + } +} + +@media (min-width: 1024px) { + body { + display: flex; + place-items: center; + } + + #app { + display: grid; + grid-template-columns: 1fr 1fr; + padding: 0 2rem; + } +} diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue new file mode 100644 index 0000000000000000000000000000000000000000..1b8faac1521345513353e96050dd24d94610d432 --- /dev/null +++ b/src/components/HelloWorld.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/src/components/TheWelcome.vue b/src/components/TheWelcome.vue new file mode 100644 index 0000000000000000000000000000000000000000..d3d2e7acc8a9deeb26e48169ee3cbc64d2b54f2f --- /dev/null +++ b/src/components/TheWelcome.vue @@ -0,0 +1,84 @@ + + + diff --git a/src/components/WelcomeItem.vue b/src/components/WelcomeItem.vue new file mode 100644 index 0000000000000000000000000000000000000000..ba0def33c0e523d8c82426d76d76c39b482b21e0 --- /dev/null +++ b/src/components/WelcomeItem.vue @@ -0,0 +1,86 @@ + + + diff --git a/src/components/icons/IconCommunity.vue b/src/components/icons/IconCommunity.vue new file mode 100644 index 0000000000000000000000000000000000000000..2dc8b055253af30fb797037e2fe260505f0cf711 --- /dev/null +++ b/src/components/icons/IconCommunity.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/icons/IconDocumentation.vue b/src/components/icons/IconDocumentation.vue new file mode 100644 index 0000000000000000000000000000000000000000..6d4791cfbcf2782b3e5ffbabd042d4c47b2fbbed --- /dev/null +++ b/src/components/icons/IconDocumentation.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/icons/IconEcosystem.vue b/src/components/icons/IconEcosystem.vue new file mode 100644 index 0000000000000000000000000000000000000000..c3a4f078c0bd340a33c61ea9ecd8a755d03571ed --- /dev/null +++ b/src/components/icons/IconEcosystem.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/icons/IconSupport.vue b/src/components/icons/IconSupport.vue new file mode 100644 index 0000000000000000000000000000000000000000..7452834d3ef961ce24c3a072ddba2620b6158bae --- /dev/null +++ b/src/components/icons/IconSupport.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/icons/IconTooling.vue b/src/components/icons/IconTooling.vue new file mode 100644 index 0000000000000000000000000000000000000000..660598d7c76644ffe126a1a1feb1606650bfb937 --- /dev/null +++ b/src/components/icons/IconTooling.vue @@ -0,0 +1,19 @@ + + diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000000000000000000000000000000000000..90e6400b4d8ad8aba0c1caa53874eb4b81380648 --- /dev/null +++ b/src/main.js @@ -0,0 +1,6 @@ +import { createApp } from 'vue' +import App from './App.vue' + +import './assets/main.css' + +createApp(App).mount('#app') diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000000000000000000000000000000000000..4ad898dec614e030adad5e4f80523145bce56245 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,10 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vitejs.dev/config/ +export default defineConfig({ + server: { + host: true + }, + plugins: [vue()] +})