build: switch to local tailwind build and update docker static mounts
This commit is contained in:
@@ -1 +1,2 @@
|
||||
.vscode/
|
||||
node_modules/
|
||||
|
||||
@@ -4,7 +4,9 @@ Landing page statica per i servizi pubblici HomeLab del dominio `*.home.lucasacc
|
||||
|
||||
## 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`.
|
||||
|
||||
## Avvio rapido
|
||||
@@ -21,6 +23,14 @@ Prerequisiti:
|
||||
|
||||
- Docker
|
||||
- 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:
|
||||
|
||||
@@ -38,6 +48,12 @@ Stop:
|
||||
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
|
||||
|
||||
Per aggiungere/modificare un servizio:
|
||||
|
||||
@@ -6,5 +6,6 @@ services:
|
||||
- "8380:80"
|
||||
volumes:
|
||||
- ./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
|
||||
restart: unless-stopped
|
||||
|
||||
+13
-16
@@ -10,22 +10,7 @@
|
||||
content="Directory moderna dei servizi pubblici sul dominio home.lucasacchi.net"
|
||||
/>
|
||||
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<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="stylesheet" href="./tailwind.css" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
@@ -71,6 +56,18 @@
|
||||
.reveal {
|
||||
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>
|
||||
</head>
|
||||
|
||||
|
||||
Generated
+1029
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
content: ["./index.html"],
|
||||
theme: {
|
||||
extend: {}
|
||||
},
|
||||
plugins: []
|
||||
};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
Reference in New Issue
Block a user