build: switch to local tailwind build and update docker static mounts

This commit is contained in:
Luca Sacchi Ricciardi
2026-04-23 18:18:31 +02:00
parent f881c2b993
commit 14941aa6c8
9 changed files with 1093 additions and 17 deletions
+1
View File
@@ -1 +1,2 @@
.vscode/ .vscode/
node_modules/
+17 -1
View File
@@ -4,7 +4,9 @@ Landing page statica per i servizi pubblici HomeLab del dominio `*.home.lucasacc
## Contenuto progetto ## Contenuto progetto
- `index.html`: pagina principale moderna con Tailwind CSS (CDN), ricerca live e card servizi. - `index.html`: pagina principale moderna con Tailwind CSS compilato localmente, ricerca live e card servizi.
- `tailwind.input.css`: file sorgente Tailwind.
- `tailwind.css`: CSS compilato usato in produzione.
- `docker-compose.yml`: avvio rapido con web server `nginx:alpine`. - `docker-compose.yml`: avvio rapido con web server `nginx:alpine`.
## Avvio rapido ## Avvio rapido
@@ -21,6 +23,14 @@ Prerequisiti:
- Docker - Docker
- Docker Compose v2 (`docker compose`) - Docker Compose v2 (`docker compose`)
- Node.js + npm (solo per ricompilare `tailwind.css`)
Build CSS (quando cambi classi Tailwind in `index.html`):
```bash
npm install
npm run build
```
Comandi: Comandi:
@@ -38,6 +48,12 @@ Stop:
docker compose down docker compose down
``` ```
Se aggiorni file montati (es. `tailwind.css` o `favicon.svg`), forza il refresh del container:
```bash
docker compose up -d --force-recreate
```
## Aggiornare i servizi nella pagina ## Aggiornare i servizi nella pagina
Per aggiungere/modificare un servizio: Per aggiungere/modificare un servizio:
+1
View File
@@ -6,5 +6,6 @@ services:
- "8380:80" - "8380:80"
volumes: volumes:
- ./index.html:/usr/share/nginx/html/index.html:ro - ./index.html:/usr/share/nginx/html/index.html:ro
- ./tailwind.css:/usr/share/nginx/html/tailwind.css:ro
- ./favicon.svg:/usr/share/nginx/html/favicon.svg:ro - ./favicon.svg:/usr/share/nginx/html/favicon.svg:ro
restart: unless-stopped restart: unless-stopped
+13 -16
View File
@@ -10,22 +10,7 @@
content="Directory moderna dei servizi pubblici sul dominio home.lucasacchi.net" content="Directory moderna dei servizi pubblici sul dominio home.lucasacchi.net"
/> />
<script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="./tailwind.css" />
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
display: ["Space Grotesk", "ui-sans-serif", "system-ui"],
body: ["Manrope", "ui-sans-serif", "system-ui"]
},
boxShadow: {
glow: "0 0 0 1px rgba(255,255,255,.08), 0 12px 30px rgba(8, 20, 40, .28)"
}
}
}
};
</script>
<link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link <link
@@ -71,6 +56,18 @@
.reveal { .reveal {
animation: rise 0.45s ease-out both; animation: rise 0.45s ease-out both;
} }
.font-display {
font-family: "Space Grotesk", ui-sans-serif, system-ui;
}
.font-body {
font-family: "Manrope", ui-sans-serif, system-ui;
}
.shadow-glow {
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 30px rgba(8, 20, 40, 0.28);
}
</style> </style>
</head> </head>
+1029
View File
File diff suppressed because it is too large Load Diff
+21
View File
@@ -0,0 +1,21 @@
{
"name": "home.lucasacchi.net",
"version": "1.0.0",
"description": "Landing page statica per i servizi pubblici HomeLab del dominio `*.home.lucasacchi.net`.",
"main": "index.js",
"scripts": {
"build:css": "tailwindcss -i ./tailwind.input.css -o ./tailwind.css --minify",
"build": "npm run build:css"
},
"repository": {
"type": "git",
"url": "ssh://git@gitea.lab.home.lucasacchi.net:222/lucasacchi/home.lucasacchi.net.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"devDependencies": {
"tailwindcss": "^3.4.19"
}
}
+7
View File
@@ -0,0 +1,7 @@
module.exports = {
content: ["./index.html"],
theme: {
extend: {}
},
plugins: []
};
+1
View File
File diff suppressed because one or more lines are too long
+3
View File
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;