feat: add demonstrative home images

Three AI-generated images replace the home photo placeholders, served
as AVIF/WebP with srcset; forecourt image also used as og:image.
To be replaced by real workshop photos before launch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 15:37:38 +01:00
co-authored by Claude Opus 5.5
parent 0571890d47
commit 55adee2286
10 changed files with 49 additions and 5 deletions
+1
View File
@@ -7,6 +7,7 @@
- `src/data/officina.ts` → single source of business data (NAP, hours, services, FAQ) - `src/data/officina.ts` → single source of business data (NAP, hours, services, FAQ)
- `src/styles/global.css` → design tokens and shared styles (ADR 0002) - `src/styles/global.css` → design tokens and shared styles (ADR 0002)
- `public/` → favicon, robots.txt, partner logos - `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/proposte/` → static design proposals (reference; 02 is the chosen direction)
- `design/assets/sito-attuale/` → images downloaded from the current site - `design/assets/sito-attuale/` → images downloaded from the current site
- `docs/analisi/`, `docs/progetto/` → audit and development plan - `docs/analisi/`, `docs/progetto/` → audit and development plan
+29
View File
@@ -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 `<Picture>` → 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
Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 KiB

+4 -1
View File
@@ -5,9 +5,10 @@ import { officina } from '../data/officina';
interface Props { interface Props {
title: string; title: string;
description: 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) // URL puliti come sul sito attuale: /officina, /servizi … (niente .html)
const path = Astro.url.pathname.replace(/(index)?\.html$/, '') || '/'; const path = Astro.url.pathname.replace(/(index)?\.html$/, '') || '/';
const canonical = new URL(path, Astro.site).href; const canonical = new URL(path, Astro.site).href;
@@ -65,6 +66,8 @@ const schema = {
<meta property="og:title" content={title}> <meta property="og:title" content={title}>
<meta property="og:description" content={description}> <meta property="og:description" content={description}>
<meta property="og:url" content={canonical}> <meta property="og:url" content={canonical}>
{image && <meta property="og:image" content={new URL(image, Astro.site).href}>}
{image && <meta name="twitter:card" content="summary_large_image">}
<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 href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap" rel="stylesheet">
+15 -4
View File
@@ -1,4 +1,5 @@
--- ---
import { Picture, getImage } from 'astro:assets';
import Base from '../layouts/Base.astro'; import Base from '../layouts/Base.astro';
import Insegna from '../components/Insegna.astro'; import Insegna from '../components/Insegna.astro';
import ServiziLista from '../components/ServiziLista.astro'; import ServiziLista from '../components/ServiziLista.astro';
@@ -6,10 +7,18 @@ import Marchi from '../components/Marchi.astro';
import Faq from '../components/Faq.astro'; import Faq from '../components/Faq.astro';
import BloccoContatti from '../components/BloccoContatti.astro'; import BloccoContatti from '../components/BloccoContatti.astro';
import { officina, faqHome } from '../data/officina'; 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' });
--- ---
<Base <Base
title="Impianti GPL e metano a Udine | Officine Zuliani" title="Impianti GPL e metano a Udine | Officine Zuliani"
description="Officine Zuliani, Viale Venezia 446 a Udine: impianti GPL e metano BRC e Prins, revisioni, tagliandi e ganci di traino. Preventivo gratuito, tel. 0432 234000." description="Officine Zuliani, Viale Venezia 446 a Udine: impianti GPL e metano BRC e Prins, revisioni, tagliandi e ganci di traino. Preventivo gratuito, tel. 0432 234000."
image={og.src}
> >
<div class="wrap hero"> <div class="wrap hero">
<div class="su"> <div class="su">
@@ -21,9 +30,9 @@ import { officina, faqHome } from '../data/officina';
</div> </div>
<div class="wrap strip su"> <div class="wrap strip su">
<div class="foto"><b>Foto reale: il piazzale e l'ingresso in Viale Venezia 446</b></div> <Picture src={piazzale} formats={['avif', 'webp']} widths={[480, 800, 1200]} sizes="(max-width: 900px) 100vw, 760px" alt="Il piazzale dell'officina con auto parcheggiate, un camper e il portone aperto sull'area di lavoro" class="foto-img" loading="eager" fetchpriority="high" />
<div class="foto"><b>Foto: un meccanico al lavoro su un impianto GPL</b></div> <Picture src={impiantoGpl} formats={['avif', 'webp']} widths={[400, 760]} sizes="(max-width: 900px) 100vw, 370px" alt="Un meccanico con tuta blu e guanti collega il riduttore di un impianto GPL nel vano motore" class="foto-img" loading="eager" />
<div class="foto"><b>Foto: il team</b></div> <Picture src={officinaLavoro} formats={['avif', 'webp']} widths={[400, 760]} sizes="(max-width: 900px) 100vw, 370px" alt="Due meccanici controllano il sottoscocca di un'auto sul ponte sollevatore; in primo piano lo strumento di diagnosi" class="foto-img" loading="eager" />
</div> </div>
<section><div class="wrap due"> <section><div class="wrap due">
@@ -48,6 +57,8 @@ import { officina, faqHome } from '../data/officina';
<style> <style>
.hero{display:grid;grid-template-columns:1.25fr 1fr;gap:48px;align-items:end;padding:40px 0 80px} .hero{display:grid;grid-template-columns:1.25fr 1fr;gap:48px;align-items:end;padding:40px 0 80px}
.strip :global(.foto-img){width:100%;height:100%;object-fit:cover;border-radius:14px;display:block}
.strip :global(picture){display:block;height:100%;min-height:0}
.fascia{background:var(--carta);border-top:1px solid var(--riga);border-bottom:1px solid var(--riga)} .fascia{background:var(--carta);border-top:1px solid var(--riga);border-bottom:1px solid var(--riga)}
@media (max-width:900px){.hero{grid-template-columns:1fr}} @media (max-width:900px){.hero{grid-template-columns:1fr}.strip :global(.foto-img){height:240px}}
</style> </style>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB