- token, font self-hosted (Fraunces e Inter, sottoinsieme latin) con preload - BaseLayout con head completo (SEO, Open Graph, favicon) e JSON-LD dello studio - intestazione con barra superiore, navigazione e sottomenu servizi accessibili - menu mobile con dialog modale e alternativa senza JavaScript - footer con P.IVA, recapiti, servizi, orari e link legali - componenti: Logo, Icon (Lucide inline), Hero, card servizio, scheda professionista, badge abilitazione, card sede, mappa click-to-load, modulo di contatto, banda CTA, breadcrumb, intestazioni di sezione - generate-icons.mjs: marchio, favicon, apple-touch-icon e immagine OG - collection dei servizi e dei link utili con schemi Zod Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016zJ9ZWGKvoKoxYwbmnRKdJ
245 lines
5.1 KiB
Plaintext
245 lines
5.1 KiB
Plaintext
---
|
|
/**
|
|
* Hero della home: occhiello, titolo con seconda parte in corsivo, testo introduttivo, due
|
|
* inviti all'azione, riga di fiducia e, a destra, illustrazione in CSS (forma navy e anello
|
|
* oro, decorativi) con tre «fact card». Su mobile le card si impilano e l'illustrazione sparisce.
|
|
*/
|
|
import Icon from './Icon.astro';
|
|
|
|
interface Props {
|
|
eyebrow: string;
|
|
titolo: string;
|
|
titoloCorsivo: string;
|
|
testo: string;
|
|
ctaPrimaria: { label: string; href: string };
|
|
ctaSecondaria: { label: string; href: string };
|
|
fiducia: string[];
|
|
fatti: { titolo: string; testo: string; icona: string }[];
|
|
}
|
|
|
|
const { eyebrow, titolo, titoloCorsivo, testo, ctaPrimaria, ctaSecondaria, fiducia, fatti } =
|
|
Astro.props;
|
|
---
|
|
|
|
<section class="hero" aria-labelledby="hero-titolo">
|
|
<div class="container hero__inner">
|
|
<div class="hero__text">
|
|
<p class="eyebrow">{eyebrow}</p>
|
|
<h1 id="hero-titolo">
|
|
{titolo} <em>{titoloCorsivo}</em>
|
|
</h1>
|
|
<p class="hero__lead">{testo}</p>
|
|
<div class="hero__actions">
|
|
<a class="btn btn--primary" href={ctaPrimaria.href}>
|
|
{ctaPrimaria.label}
|
|
<Icon name="arrow-right" size={18} />
|
|
</a>
|
|
<a class="btn btn--outline" href={ctaSecondaria.href}>
|
|
{ctaSecondaria.label}
|
|
</a>
|
|
</div>
|
|
<ul class="hero__trust" role="list">
|
|
{fiducia.map((voce) => (
|
|
<li>
|
|
<Icon name="circle-check" size={18} />
|
|
{voce}
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</div>
|
|
<div class="hero__visual">
|
|
<div class="hero__blob" aria-hidden="true"></div>
|
|
<div class="hero__ring" aria-hidden="true"></div>
|
|
<ul class="hero__facts" role="list">
|
|
{fatti.map((f, i) => (
|
|
<li class:list={['fact', `fact--${i + 1}`]}>
|
|
<span class="fact__icon">
|
|
<Icon name={f.icona} size={20} />
|
|
</span>
|
|
<span>
|
|
<strong>{f.titolo}</strong>
|
|
<span>{f.testo}</span>
|
|
</span>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<style>
|
|
.hero {
|
|
position: relative;
|
|
overflow: hidden;
|
|
background: linear-gradient(180deg, var(--navy-050) 0%, var(--white) 100%);
|
|
}
|
|
|
|
.hero__inner {
|
|
display: grid;
|
|
grid-template-columns: 1.15fr 0.85fr;
|
|
gap: var(--space-8);
|
|
align-items: center;
|
|
padding-block: clamp(3rem, 8vw, 6.5rem);
|
|
}
|
|
|
|
.hero h1 {
|
|
margin-bottom: var(--space-5);
|
|
max-width: 16ch;
|
|
}
|
|
|
|
.hero h1 em {
|
|
font-style: italic;
|
|
color: var(--navy-700);
|
|
}
|
|
|
|
.hero__lead {
|
|
font-size: var(--fs-lg);
|
|
color: var(--ink-600);
|
|
max-width: 36rem;
|
|
margin-bottom: var(--space-6);
|
|
}
|
|
|
|
.hero__actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-3);
|
|
margin-bottom: var(--space-6);
|
|
}
|
|
|
|
.hero__trust {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-3) var(--space-5);
|
|
list-style: none;
|
|
font-size: var(--fs-sm);
|
|
color: var(--ink-700);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.hero__trust li {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.45rem;
|
|
}
|
|
|
|
.hero__trust :global(svg) {
|
|
flex: none;
|
|
width: 18px;
|
|
height: 18px;
|
|
color: var(--gold-700);
|
|
}
|
|
|
|
.hero__visual {
|
|
position: relative;
|
|
min-height: 420px;
|
|
}
|
|
|
|
.hero__blob {
|
|
position: absolute;
|
|
inset: 8% -6% 4% 6%;
|
|
background: radial-gradient(120% 110% at 80% 10%, var(--navy-700) 0%, var(--navy-900) 70%);
|
|
border-radius: 48% 52% 44% 56% / 52% 40% 60% 48%;
|
|
}
|
|
|
|
.hero__ring {
|
|
position: absolute;
|
|
width: 160px;
|
|
height: 160px;
|
|
border-radius: 50%;
|
|
border: 10px solid var(--gold-500);
|
|
right: 4%;
|
|
top: 2%;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.hero__facts {
|
|
list-style: none;
|
|
}
|
|
|
|
.fact {
|
|
position: absolute;
|
|
display: flex;
|
|
gap: var(--space-3);
|
|
align-items: flex-start;
|
|
width: 300px;
|
|
padding: var(--space-4) var(--space-5);
|
|
background: var(--white);
|
|
border: 1px solid var(--line);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.fact__icon {
|
|
display: grid;
|
|
place-items: center;
|
|
flex: none;
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 10px;
|
|
background: var(--gold-100);
|
|
color: var(--gold-700);
|
|
}
|
|
|
|
.fact__icon :global(svg) {
|
|
width: 20px;
|
|
height: 20px;
|
|
}
|
|
|
|
.fact strong {
|
|
display: block;
|
|
font-size: var(--fs-sm);
|
|
color: var(--navy-900);
|
|
line-height: 1.35;
|
|
}
|
|
|
|
.fact strong + span {
|
|
display: block;
|
|
margin-top: 0.15rem;
|
|
font-size: var(--fs-xs);
|
|
color: var(--ink-600);
|
|
line-height: 1.45;
|
|
}
|
|
|
|
.fact--1 {
|
|
left: 0;
|
|
top: 14%;
|
|
}
|
|
|
|
.fact--2 {
|
|
right: 2%;
|
|
top: 42%;
|
|
}
|
|
|
|
.fact--3 {
|
|
left: 10%;
|
|
bottom: 6%;
|
|
}
|
|
|
|
@media (max-width: 960px) {
|
|
.hero__inner {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
gap: var(--space-6);
|
|
}
|
|
|
|
.hero__visual {
|
|
min-height: 0;
|
|
}
|
|
|
|
.hero__facts {
|
|
display: grid;
|
|
gap: var(--space-3);
|
|
}
|
|
|
|
.hero__blob,
|
|
.hero__ring {
|
|
display: none;
|
|
}
|
|
|
|
.fact {
|
|
position: static;
|
|
width: 100%;
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
}
|
|
</style>
|