From 0ffe87dc38fe418ea6448e636291972a2fcce260 Mon Sep 17 00:00:00 2001 From: riooocn Date: Tue, 31 Dec 2024 14:44:49 +0700 Subject: [PATCH] #3-develop-frontend --- backend/target/classes/application.properties | 2 + .../backend/BackendApplication.class | Bin 0 -> 748 bytes .../backend/BackendApplicationTests.class | Bin 0 -> 546 bytes frontend/.gitignore | 24 +++++++ frontend/README.md | 8 +++ frontend/eslint.config.js | 38 ++++++++++ frontend/index.html | 13 ++++ frontend/package.json | 28 ++++++++ frontend/public/vite.svg | 1 + frontend/src/App.css | 42 +++++++++++ frontend/src/App.jsx | 35 +++++++++ frontend/src/assets/react.svg | 1 + frontend/src/index.css | 68 ++++++++++++++++++ frontend/src/main.jsx | 10 +++ frontend/vite.config.js | 7 ++ 15 files changed, 277 insertions(+) create mode 100644 backend/target/classes/application.properties create mode 100644 backend/target/classes/difabelzone/backend/BackendApplication.class create mode 100644 backend/target/test-classes/difabelzone/backend/BackendApplicationTests.class create mode 100644 frontend/.gitignore create mode 100644 frontend/README.md create mode 100644 frontend/eslint.config.js create mode 100644 frontend/index.html create mode 100644 frontend/package.json create mode 100644 frontend/public/vite.svg create mode 100644 frontend/src/App.css create mode 100644 frontend/src/App.jsx create mode 100644 frontend/src/assets/react.svg create mode 100644 frontend/src/index.css create mode 100644 frontend/src/main.jsx create mode 100644 frontend/vite.config.js diff --git a/backend/target/classes/application.properties b/backend/target/classes/application.properties new file mode 100644 index 0000000..82b2c0a --- /dev/null +++ b/backend/target/classes/application.properties @@ -0,0 +1,2 @@ +spring.application.name=backend +server.port=8088 diff --git a/backend/target/classes/difabelzone/backend/BackendApplication.class b/backend/target/classes/difabelzone/backend/BackendApplication.class new file mode 100644 index 0000000000000000000000000000000000000000..6a532ae0b61bf45db3231691ae1ddf8392b329a3 GIT binary patch literal 748 zcma)4%T60H6g>_J2}5{=cMA(PC}e?m-2{*z603n$O_eUX@=Tn;FtH<#r>*!aRv;F9 z03U_89*`1=ELhCFb00qU++#n#JU#(9#%>iQhW)-8h)AZlMoS)v_(tkJKYR11qfx42 z;gr!;lo^(<#b3cwp%eZ+x|XqHm_1Tjxf6z&=0T64+%bI_U!U1ya}+6TP=D_E_f!O$`` z;n~RN2UZN_KVxrrWQ^n8A~~^R9cx&pO>9oUQF8*flZq^BPn#4@gO81N^1tI9qX#O< ztzUFv4yAqBFClC~Yp+g0Cbci5yE6SB!qaxrQe)6HxsBzy@X^ffSue9z_ zyDQ28SziV<%#*FZHIQGRXby{5A`pN0TLA{t8m#qz<=^A;0abvYKp11xuz^j=Z_!tw SM?kKG?ZSS+SMq-B4)6*Hx5B>w literal 0 HcmV?d00001 diff --git a/backend/target/test-classes/difabelzone/backend/BackendApplicationTests.class b/backend/target/test-classes/difabelzone/backend/BackendApplicationTests.class new file mode 100644 index 0000000000000000000000000000000000000000..8e12e1e0dbee059d50023020e79a0af3435cfa06 GIT binary patch literal 546 zcmb7A%T59@6g?df6i^V|n6PlE679~7j|5CyO*9e0zB5y>Ftn3SQR82^GI8Mt_)*5& zff!@r!bR`%+|zr{$LHHSfD7za5ioQUH5QRfpN*D067fvxg!h-emu0Dng;PckW$yAS z$_%Zkcn~}ldctp`sf-;%jyE*VM(ha-mal}Tg`C2TaXh6+P7R9fCF=8?2R5v7u$ z9hz9ABVm=#SH-fsS2@FR_>Yy&7#gwBPCmKNh=j)X?iSjqxg4on5qD2(=;7JAa69;_qiTEvWL$Dm@unF_(|V&Uj>u + + + + + + Vite + React + + +
+ + + diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 0000000..7d99c6c --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,28 @@ +{ + "name": "frontend", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@eslint/js": "^9.17.0", + "@types/react": "^18.3.18", + "@types/react-dom": "^18.3.5", + "@vitejs/plugin-react": "^4.3.4", + "eslint": "^9.17.0", + "eslint-plugin-react": "^7.37.2", + "eslint-plugin-react-hooks": "^5.0.0", + "eslint-plugin-react-refresh": "^0.4.16", + "globals": "^15.14.0", + "vite": "^6.0.5" + } +} diff --git a/frontend/public/vite.svg b/frontend/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/frontend/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/App.css b/frontend/src/App.css new file mode 100644 index 0000000..b9d355d --- /dev/null +++ b/frontend/src/App.css @@ -0,0 +1,42 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.react:hover { + filter: drop-shadow(0 0 2em #61dafbaa); +} + +@keyframes logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: no-preference) { + a:nth-of-type(2) .logo { + animation: logo-spin infinite 20s linear; + } +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx new file mode 100644 index 0000000..f67355a --- /dev/null +++ b/frontend/src/App.jsx @@ -0,0 +1,35 @@ +import { useState } from 'react' +import reactLogo from './assets/react.svg' +import viteLogo from '/vite.svg' +import './App.css' + +function App() { + const [count, setCount] = useState(0) + + return ( + <> + +

Vite + React

+
+ +

+ Edit src/App.jsx and save to test HMR +

+
+

+ Click on the Vite and React logos to learn more +

+ + ) +} + +export default App diff --git a/frontend/src/assets/react.svg b/frontend/src/assets/react.svg new file mode 100644 index 0000000..6c87de9 --- /dev/null +++ b/frontend/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/index.css b/frontend/src/index.css new file mode 100644 index 0000000..6119ad9 --- /dev/null +++ b/frontend/src/index.css @@ -0,0 +1,68 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/frontend/src/main.jsx b/frontend/src/main.jsx new file mode 100644 index 0000000..b9a1a6d --- /dev/null +++ b/frontend/src/main.jsx @@ -0,0 +1,10 @@ +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import './index.css' +import App from './App.jsx' + +createRoot(document.getElementById('root')).render( + + + , +) diff --git a/frontend/vite.config.js b/frontend/vite.config.js new file mode 100644 index 0000000..8b0f57b --- /dev/null +++ b/frontend/vite.config.js @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react()], +})