diff --git a/docs/context/module-map.md b/docs/context/module-map.md index 3b0f31b..d54a3c7 100644 --- a/docs/context/module-map.md +++ b/docs/context/module-map.md @@ -7,6 +7,7 @@ - `src/data/officina.ts` → single source of business data (NAP, hours, services, FAQ) - `src/styles/global.css` → design tokens and shared styles (ADR 0002) - `public/` → favicon, robots.txt, partner logos +- `src/assets/home/` → home photos (demonstrative, AI-generated; optimized by astro:assets) - `design/proposte/` → static design proposals (reference; 02 is the chosen direction) - `design/assets/sito-attuale/` → images downloaded from the current site - `docs/analisi/`, `docs/progetto/` → audit and development plan diff --git a/docs/handoffs/2026-11-04-immagini-home.md b/docs/handoffs/2026-11-04-immagini-home.md new file mode 100644 index 0000000..7dc3e15 --- /dev/null +++ b/docs/handoffs/2026-11-04-immagini-home.md @@ -0,0 +1,29 @@ +# Handoff + +## Issue +None (explicit user instruction: add the three home images) + +## Goal +Replace the three photo placeholders in the home with demonstrative images. + +## Status +done + +## What changed +- Three AI-generated demonstrative images (ChatGPT, prompts written in this session) in `src/assets/home/`: `piazzale.jpg`, `impianto-gpl.jpg`, `officina-lavoro.jpg` +- Home uses Astro `` → AVIF/WebP with srcset and descriptive `alt`; first image `fetchpriority="high"` +- `og:image` (1200×630 from the forecourt image) and `twitter:card` via new optional `image` prop in `Base.astro` + +## Files touched +- `src/pages/index.astro`, `src/layouts/Base.astro`, `src/assets/home/*` + +## Tests +- Run: build OK; browser check 1280px and 375px — all three images load, no horizontal scroll +- Not run: Lighthouse + +## Risks / open questions +- The images are AI-generated and do not show the real workshop: replace with real photos before the final launch (same file names → no code change) +- The third slot shows "the workshop at work" instead of "the team" on purpose, to avoid presenting invented people as staff + +## Suggested next step +- Photo shoot of the real workshop; then the remaining photo slots on /officina diff --git a/src/assets/home/impianto-gpl.jpg b/src/assets/home/impianto-gpl.jpg new file mode 100644 index 0000000..df41e5d Binary files /dev/null and b/src/assets/home/impianto-gpl.jpg differ diff --git a/src/assets/home/officina-lavoro.jpg b/src/assets/home/officina-lavoro.jpg new file mode 100644 index 0000000..d6e9559 Binary files /dev/null and b/src/assets/home/officina-lavoro.jpg differ diff --git a/src/assets/home/piazzale.jpg b/src/assets/home/piazzale.jpg new file mode 100644 index 0000000..cb74345 Binary files /dev/null and b/src/assets/home/piazzale.jpg differ diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 92075ac..6a11f7c 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -5,9 +5,10 @@ import { officina } from '../data/officina'; interface Props { title: string; description: string; + image?: string; } -const { title, description } = Astro.props; +const { title, description, image } = Astro.props; // URL puliti come sul sito attuale: /officina, /servizi … (niente .html) const path = Astro.url.pathname.replace(/(index)?\.html$/, '') || '/'; const canonical = new URL(path, Astro.site).href; @@ -65,6 +66,8 @@ const schema = { + {image && } + {image && } diff --git a/src/pages/index.astro b/src/pages/index.astro index f467694..dcf8366 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,4 +1,5 @@ --- +import { Picture, getImage } from 'astro:assets'; import Base from '../layouts/Base.astro'; import Insegna from '../components/Insegna.astro'; import ServiziLista from '../components/ServiziLista.astro'; @@ -6,10 +7,18 @@ import Marchi from '../components/Marchi.astro'; import Faq from '../components/Faq.astro'; import BloccoContatti from '../components/BloccoContatti.astro'; import { officina, faqHome } from '../data/officina'; +// Immagini dimostrative generate con AI (docs/handoffs/2026-11-04-immagini-home.md): +// da sostituire con foto reali dell'officina prima del lancio. +import piazzale from '../assets/home/piazzale.jpg'; +import impiantoGpl from '../assets/home/impianto-gpl.jpg'; +import officinaLavoro from '../assets/home/officina-lavoro.jpg'; + +const og = await getImage({ src: piazzale, width: 1200, height: 630, fit: 'cover', format: 'jpg' }); ---
@@ -21,9 +30,9 @@ import { officina, faqHome } from '../data/officina';
-
Foto reale: il piazzale e l'ingresso in Viale Venezia 446
-
Foto: un meccanico al lavoro su un impianto GPL
-
Foto: il team
+ + +
@@ -48,6 +57,8 @@ import { officina, faqHome } from '../data/officina'; diff --git a/temp/impianto-gpl.png b/temp/impianto-gpl.png new file mode 100644 index 0000000..1adbd56 Binary files /dev/null and b/temp/impianto-gpl.png differ diff --git a/temp/officina-lavoro.png b/temp/officina-lavoro.png new file mode 100644 index 0000000..548a3a9 Binary files /dev/null and b/temp/officina-lavoro.png differ diff --git a/temp/piazzale.png b/temp/piazzale.png new file mode 100644 index 0000000..21b62c7 Binary files /dev/null and b/temp/piazzale.png differ