forked from Ruderverein-Donau-Linz/rowt
		
	[TASK] add frontend process and basic files
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -2,3 +2,5 @@ target/ | |||||||
| db.sqlite | db.sqlite | ||||||
| .history/ | .history/ | ||||||
| Rocket.toml | Rocket.toml | ||||||
|  | static/* | ||||||
|  | frontend/node_modules/* | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								frontend/main.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								frontend/main.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | import './scss/app.scss' | ||||||
							
								
								
									
										1615
									
								
								frontend/package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										1615
									
								
								frontend/package-lock.json
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										21
									
								
								frontend/package.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								frontend/package.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | |||||||
|  | { | ||||||
|  |   "name": "liwest", | ||||||
|  |   "private": true, | ||||||
|  |   "version": "0.0.0", | ||||||
|  |   "type": "module", | ||||||
|  |   "scripts": { | ||||||
|  |     "watch": "vite build --emptyOutDir --watch", | ||||||
|  |     "build": "tsc && vite build --emptyOutDir", | ||||||
|  |     "preview": "vite preview" | ||||||
|  |   }, | ||||||
|  |   "devDependencies": { | ||||||
|  |     "sass": "^1.60.0", | ||||||
|  |     "typescript": "^4.9.3", | ||||||
|  |     "vite": "^4.2.0", | ||||||
|  |     "vite-plugin-static-copy": "^0.13.1" | ||||||
|  |   }, | ||||||
|  |   "dependencies": { | ||||||
|  |     "@popperjs/core": "^2.11.7", | ||||||
|  |     "bootstrap": "^5.2.3" | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										3
									
								
								frontend/scss/app.scss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								frontend/scss/app.scss
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | body { | ||||||
|  |   background: red; | ||||||
|  | } | ||||||
							
								
								
									
										18
									
								
								frontend/tsconfig.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								frontend/tsconfig.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | { | ||||||
|  |   "compilerOptions": { | ||||||
|  |     "target": "ESNext", | ||||||
|  |     "useDefineForClassFields": true, | ||||||
|  |     "module": "ESNext", | ||||||
|  |     "lib": ["ESNext", "DOM"], | ||||||
|  |     "moduleResolution": "Node", | ||||||
|  |     "strict": true, | ||||||
|  |     "resolveJsonModule": true, | ||||||
|  |     "isolatedModules": true, | ||||||
|  |     "esModuleInterop": true, | ||||||
|  |     "noEmit": true, | ||||||
|  |     "noUnusedLocals": true, | ||||||
|  |     "noUnusedParameters": true, | ||||||
|  |     "noImplicitReturns": true, | ||||||
|  |     "skipLibCheck": true | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										34
									
								
								frontend/vite.config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								frontend/vite.config.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | |||||||
|  | import { defineConfig } from 'vite'; | ||||||
|  | import { viteStaticCopy } from 'vite-plugin-static-copy' | ||||||
|  |  | ||||||
|  | export default defineConfig({ | ||||||
|  |   plugins: [ | ||||||
|  |     viteStaticCopy({ | ||||||
|  |       targets: [ | ||||||
|  |         { | ||||||
|  |           src: './static/[!.]*', | ||||||
|  |           dest: './', | ||||||
|  |         }, | ||||||
|  |       ], | ||||||
|  |     }) | ||||||
|  |   ], | ||||||
|  |   publicDir: false, // disable copy `public/` to outDir | ||||||
|  |   build: { | ||||||
|  |     rollupOptions: { | ||||||
|  |       input: { | ||||||
|  |         main: './main.ts', | ||||||
|  |         // Example for more entry points | ||||||
|  |         // test: './src/test.ts', | ||||||
|  |       }, | ||||||
|  |       output: { | ||||||
|  |         entryFileNames: '[name].js', | ||||||
|  |         assetFileNames: '[name].css', | ||||||
|  |       }, | ||||||
|  |     }, | ||||||
|  |     manifest: true, // generate manifest.json in outDir | ||||||
|  |     outDir: '../static/', | ||||||
|  |   }, | ||||||
|  |   css: { | ||||||
|  |     devSourcemap: true, // disabled by default because of performance reasons | ||||||
|  |   }, | ||||||
|  | }) | ||||||
| @@ -1,3 +1,7 @@ | |||||||
|  | {% extends "base" %} | ||||||
|  |  | ||||||
|  | {% block content %} | ||||||
|  |  | ||||||
| {% if flash %} | {% if flash %} | ||||||
|       {% if flash.0 == "success" %} |       {% if flash.0 == "success" %} | ||||||
|         <div class="row"> |         <div class="row"> | ||||||
| @@ -24,3 +28,6 @@ | |||||||
|  |  | ||||||
|         <button type="submit">Login</button> |         <button type="submit">Login</button> | ||||||
| </form> | </form> | ||||||
|  |  | ||||||
|  |  | ||||||
|  | {% endblock content %} | ||||||
| @@ -1,12 +1,11 @@ | |||||||
| <!DOCTYPE html> | <!DOCTYPE html> | ||||||
| <html lang="en"> | <html lang="de"> | ||||||
| <head> | <head> | ||||||
|  |   <link rel="manifest" href="public/manifest.json" /> | ||||||
|  |   <link rel="stylesheet" href="/public/main.css"> | ||||||
| </head> | </head> | ||||||
| <body> | <body> | ||||||
|  |  | ||||||
|  |  | ||||||
| {% block content %} | {% block content %} | ||||||
| {% endblock content %} | {% endblock content %} | ||||||
|        |        | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Marie Birner
					Marie Birner