Merge branch 'setup-fe'
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1,3 @@
|
||||
/target
|
||||
.history
|
||||
/frontend/node_modules/*
|
3
frontend/main.ts
Normal file
3
frontend/main.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import '@fontsource/rubik-doodle-shadow';
|
||||
|
||||
import "./scss/app.scss";
|
3467
frontend/package-lock.json
generated
Normal file
3467
frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
24
frontend/package.json
Normal file
24
frontend/package.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "aef-website",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite build --emptyOutDir --watch",
|
||||
"build": "tsc && vite build --emptyOutDir",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/postcss": "^4.1.11",
|
||||
"fluid-tailwind": "^1.0.4",
|
||||
"postcss": "^8.5.6",
|
||||
"sass": "^1.89.2",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "^5.9.2",
|
||||
"vite": "^7.0.6",
|
||||
"vite-plugin-static-copy": "^3.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource/rubik-doodle-shadow": "^5.2.6"
|
||||
}
|
||||
}
|
5
frontend/postcss.config.cjs
Normal file
5
frontend/postcss.config.cjs
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
}
|
||||
}
|
11
frontend/scss/app.scss
Normal file
11
frontend/scss/app.scss
Normal file
@@ -0,0 +1,11 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
h1 {
|
||||
@apply font-headline;
|
||||
}
|
||||
|
||||
.container {
|
||||
@apply ~p-6/10 max-w-screen-lg w-full;
|
||||
}
|
0
frontend/static/logo.svg
Normal file
0
frontend/static/logo.svg
Normal file
25
frontend/tailwind.config.ts
Normal file
25
frontend/tailwind.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import fluid, { extract, screens, fontSize } from 'fluid-tailwind'
|
||||
|
||||
export default {
|
||||
content: {
|
||||
files: [
|
||||
'../src/'
|
||||
],
|
||||
extract
|
||||
},
|
||||
plugins: [
|
||||
fluid
|
||||
],
|
||||
theme: {
|
||||
fontFamily: {
|
||||
headline: ['Rubik Doodle Shadow', 'sans-serif']
|
||||
},
|
||||
screens, // Tailwind's default screens, in `rem`
|
||||
fontSize, // Tailwind's default font sizes, in `rem` (including line heights)
|
||||
extend: {
|
||||
screens: {
|
||||
xs: '20rem'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
19
frontend/tsconfig.json
Normal file
19
frontend/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"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/serve/',
|
||||
},
|
||||
css: {
|
||||
devSourcemap: true, // disabled by default because of performance reasons
|
||||
},
|
||||
})
|
@@ -6,8 +6,7 @@ pub fn new(content: Markup) -> Markup {
|
||||
head {
|
||||
meta charset="utf-8";
|
||||
meta name="viewport" content="width=device-width, initial-scale=1.0";
|
||||
link rel="stylesheet" href="/static/pico.min.css";
|
||||
link rel="stylesheet" href="/static/style.css";
|
||||
link rel="stylesheet" href="/static/main.css";
|
||||
}
|
||||
body {
|
||||
header.container {
|
||||
@@ -38,7 +37,7 @@ pub fn new(content: Markup) -> Markup {
|
||||
a target="_blank" href="https://www.digidow.eu/impressum/" { "Impressum" }
|
||||
}
|
||||
}
|
||||
script src="/static/theme.js" {}
|
||||
script src="/static/main.js" {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user