From 4dc8f6f64914ebc5abe58b1cff4c9f2602eaf611 Mon Sep 17 00:00:00 2001 From: XiaoLFeng Date: Thu, 30 Nov 2023 21:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + FrontEnd/.gitignore | 28 ++++++ FrontEnd/README.md | 29 ++++++ FrontEnd/index.html | 13 +++ FrontEnd/package.json | 23 +++++ FrontEnd/postcss.config.js | 6 ++ FrontEnd/public/favicon.ico | Bin 0 -> 4286 bytes FrontEnd/src/App.vue | 7 ++ FrontEnd/src/assets/logo.svg | 1 + FrontEnd/src/assets/main.css | 3 + FrontEnd/src/components/HelloWorld.vue | 44 +++++++++ FrontEnd/src/components/TheWelcome.vue | 88 ++++++++++++++++++ FrontEnd/src/components/WelcomeItem.vue | 86 +++++++++++++++++ .../src/components/icons/IconCommunity.vue | 7 ++ .../components/icons/IconDocumentation.vue | 7 ++ .../src/components/icons/IconEcosystem.vue | 7 ++ FrontEnd/src/components/icons/IconSupport.vue | 7 ++ FrontEnd/src/components/icons/IconTooling.vue | 19 ++++ FrontEnd/src/main.js | 12 +++ FrontEnd/src/router/index.js | 14 +++ FrontEnd/src/views/IndexWelcome.vue | 28 ++++++ FrontEnd/tailwind.config.js | 15 +++ FrontEnd/vite.config.js | 16 ++++ .../controllers/ViewController.kt | 13 +++ src/main/resources/application.yml | 6 ++ 25 files changed, 481 insertions(+) create mode 100644 FrontEnd/.gitignore create mode 100644 FrontEnd/README.md create mode 100644 FrontEnd/index.html create mode 100644 FrontEnd/package.json create mode 100644 FrontEnd/postcss.config.js create mode 100644 FrontEnd/public/favicon.ico create mode 100644 FrontEnd/src/App.vue create mode 100644 FrontEnd/src/assets/logo.svg create mode 100644 FrontEnd/src/assets/main.css create mode 100644 FrontEnd/src/components/HelloWorld.vue create mode 100644 FrontEnd/src/components/TheWelcome.vue create mode 100644 FrontEnd/src/components/WelcomeItem.vue create mode 100644 FrontEnd/src/components/icons/IconCommunity.vue create mode 100644 FrontEnd/src/components/icons/IconDocumentation.vue create mode 100644 FrontEnd/src/components/icons/IconEcosystem.vue create mode 100644 FrontEnd/src/components/icons/IconSupport.vue create mode 100644 FrontEnd/src/components/icons/IconTooling.vue create mode 100644 FrontEnd/src/main.js create mode 100644 FrontEnd/src/router/index.js create mode 100644 FrontEnd/src/views/IndexWelcome.vue create mode 100644 FrontEnd/tailwind.config.js create mode 100644 FrontEnd/vite.config.js create mode 100644 src/main/kotlin/com/xlf/dromstarkotlin/controllers/ViewController.kt diff --git a/.gitignore b/.gitignore index 549e00a..5c5b724 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,5 @@ build/ ### VS Code ### .vscode/ + +/src/main/resources/static/ diff --git a/FrontEnd/.gitignore b/FrontEnd/.gitignore new file mode 100644 index 0000000..38adffa --- /dev/null +++ b/FrontEnd/.gitignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +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/FrontEnd/README.md b/FrontEnd/README.md new file mode 100644 index 0000000..db5db98 --- /dev/null +++ b/FrontEnd/README.md @@ -0,0 +1,29 @@ +# FrontEnd + +This template should help get you started developing with Vue 3 in Vite. + +## Recommended IDE Setup + +[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). + +## Customize configuration + +See [Vite Configuration Reference](https://vitejs.dev/config/). + +## Project Setup + +```sh +npm install +``` + +### Compile and Hot-Reload for Development + +```sh +npm run dev +``` + +### Compile and Minify for Production + +```sh +npm run build +``` diff --git a/FrontEnd/index.html b/FrontEnd/index.html new file mode 100644 index 0000000..244f13c --- /dev/null +++ b/FrontEnd/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite App + + +
+ + + diff --git a/FrontEnd/package.json b/FrontEnd/package.json new file mode 100644 index 0000000..102026c --- /dev/null +++ b/FrontEnd/package.json @@ -0,0 +1,23 @@ +{ + "name": "frontend", + "version": "0.0.0", + "private": true, + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "@heroicons/vue": "^2.0.18", + "flowbite": "^2.2.0", + "vue": "^3.3.4", + "vue-router": "^4.2.5" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^4.4.0", + "autoprefixer": "^10.4.16", + "postcss": "^8.4.31", + "tailwindcss": "^3.3.5", + "vite": "^4.4.11" + } +} diff --git a/FrontEnd/postcss.config.js b/FrontEnd/postcss.config.js new file mode 100644 index 0000000..33ad091 --- /dev/null +++ b/FrontEnd/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/FrontEnd/public/favicon.ico b/FrontEnd/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..df36fcfb72584e00488330b560ebcf34a41c64c2 GIT binary patch literal 4286 zcmds*O-Phc6o&64GDVCEQHxsW(p4>LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S literal 0 HcmV?d00001 diff --git a/FrontEnd/src/App.vue b/FrontEnd/src/App.vue new file mode 100644 index 0000000..6787880 --- /dev/null +++ b/FrontEnd/src/App.vue @@ -0,0 +1,7 @@ + + + diff --git a/FrontEnd/src/assets/logo.svg b/FrontEnd/src/assets/logo.svg new file mode 100644 index 0000000..7565660 --- /dev/null +++ b/FrontEnd/src/assets/logo.svg @@ -0,0 +1 @@ + diff --git a/FrontEnd/src/assets/main.css b/FrontEnd/src/assets/main.css new file mode 100644 index 0000000..bd6213e --- /dev/null +++ b/FrontEnd/src/assets/main.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/FrontEnd/src/components/HelloWorld.vue b/FrontEnd/src/components/HelloWorld.vue new file mode 100644 index 0000000..5fb372c --- /dev/null +++ b/FrontEnd/src/components/HelloWorld.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/FrontEnd/src/components/TheWelcome.vue b/FrontEnd/src/components/TheWelcome.vue new file mode 100644 index 0000000..dab9536 --- /dev/null +++ b/FrontEnd/src/components/TheWelcome.vue @@ -0,0 +1,88 @@ + + + diff --git a/FrontEnd/src/components/WelcomeItem.vue b/FrontEnd/src/components/WelcomeItem.vue new file mode 100644 index 0000000..ac366d0 --- /dev/null +++ b/FrontEnd/src/components/WelcomeItem.vue @@ -0,0 +1,86 @@ + + + diff --git a/FrontEnd/src/components/icons/IconCommunity.vue b/FrontEnd/src/components/icons/IconCommunity.vue new file mode 100644 index 0000000..2dc8b05 --- /dev/null +++ b/FrontEnd/src/components/icons/IconCommunity.vue @@ -0,0 +1,7 @@ + diff --git a/FrontEnd/src/components/icons/IconDocumentation.vue b/FrontEnd/src/components/icons/IconDocumentation.vue new file mode 100644 index 0000000..6d4791c --- /dev/null +++ b/FrontEnd/src/components/icons/IconDocumentation.vue @@ -0,0 +1,7 @@ + diff --git a/FrontEnd/src/components/icons/IconEcosystem.vue b/FrontEnd/src/components/icons/IconEcosystem.vue new file mode 100644 index 0000000..c3a4f07 --- /dev/null +++ b/FrontEnd/src/components/icons/IconEcosystem.vue @@ -0,0 +1,7 @@ + diff --git a/FrontEnd/src/components/icons/IconSupport.vue b/FrontEnd/src/components/icons/IconSupport.vue new file mode 100644 index 0000000..7452834 --- /dev/null +++ b/FrontEnd/src/components/icons/IconSupport.vue @@ -0,0 +1,7 @@ + diff --git a/FrontEnd/src/components/icons/IconTooling.vue b/FrontEnd/src/components/icons/IconTooling.vue new file mode 100644 index 0000000..660598d --- /dev/null +++ b/FrontEnd/src/components/icons/IconTooling.vue @@ -0,0 +1,19 @@ + + diff --git a/FrontEnd/src/main.js b/FrontEnd/src/main.js new file mode 100644 index 0000000..534f296 --- /dev/null +++ b/FrontEnd/src/main.js @@ -0,0 +1,12 @@ +import './assets/main.css' +import 'flowbite'; + +import { createApp } from 'vue' +import App from './App.vue' +import router from './router' + +const app = createApp(App) + +app.use(router) + +app.mount('#app') diff --git a/FrontEnd/src/router/index.js b/FrontEnd/src/router/index.js new file mode 100644 index 0000000..0c80538 --- /dev/null +++ b/FrontEnd/src/router/index.js @@ -0,0 +1,14 @@ +import { createRouter, createWebHistory } from 'vue-router' + +const router = createRouter({ + history: createWebHistory(import.meta.env.BASE_URL), + base: '/', + routes: [ + { + path: '/', + component: () => import('../views/IndexWelcome.vue'), + } + ] +}) + +export default router diff --git a/FrontEnd/src/views/IndexWelcome.vue b/FrontEnd/src/views/IndexWelcome.vue new file mode 100644 index 0000000..c4a4119 --- /dev/null +++ b/FrontEnd/src/views/IndexWelcome.vue @@ -0,0 +1,28 @@ + diff --git a/FrontEnd/tailwind.config.js b/FrontEnd/tailwind.config.js new file mode 100644 index 0000000..a1cf42b --- /dev/null +++ b/FrontEnd/tailwind.config.js @@ -0,0 +1,15 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + "./index.html", + "./src/**/*.{vue,js,ts,jsx,tsx}", + "./node_modules/flowbite/**/*.js" + ], + theme: { + extend: {}, + }, + plugins: [ + require('flowbite/plugin') + ] +} + diff --git a/FrontEnd/vite.config.js b/FrontEnd/vite.config.js new file mode 100644 index 0000000..5c45e1d --- /dev/null +++ b/FrontEnd/vite.config.js @@ -0,0 +1,16 @@ +import { fileURLToPath, URL } from 'node:url' + +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + vue(), + ], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)) + } + } +}) diff --git a/src/main/kotlin/com/xlf/dromstarkotlin/controllers/ViewController.kt b/src/main/kotlin/com/xlf/dromstarkotlin/controllers/ViewController.kt new file mode 100644 index 0000000..80dc2e7 --- /dev/null +++ b/src/main/kotlin/com/xlf/dromstarkotlin/controllers/ViewController.kt @@ -0,0 +1,13 @@ +package com.xlf.dromstarkotlin.controllers + +import org.springframework.stereotype.Controller +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.RequestMapping + +@Controller +class ViewController { + @RequestMapping("/{path:[^.]*}") + fun forward(@PathVariable path: String): String? { + return "forward:/index.html" + } +} \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index e69de29..7699b8b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -0,0 +1,6 @@ +server: + port: 8080 +spring: + web: + resources: + static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,classpath:/static/frontend/ \ No newline at end of file