feat: design system, layout e componenti di base
- 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
This commit is contained in:
58 files changed
+5077
-16
No files matched your search
@@ -0,0 +1,98 @@
|
||||
---
|
||||
/**
|
||||
* Marchio + logotipo dello Studio. Variante `dark` per i fondi navy (footer, menu mobile no).
|
||||
* Il marchio è un SVG con la «G» già convertita in tracciato (vedi scripts/generate-icons.mjs).
|
||||
*/
|
||||
import MarkDark from '../assets/logo-mark-dark.svg';
|
||||
import Mark from '../assets/logo-mark.svg';
|
||||
import { studio } from '../data/studio';
|
||||
|
||||
interface Props {
|
||||
variant?: 'light' | 'dark';
|
||||
/** Link della home; `null` per un logo non cliccabile. */
|
||||
href?: string | null;
|
||||
class?: string;
|
||||
}
|
||||
|
||||
const { variant = 'light', href = '/', class: className } = Astro.props;
|
||||
const tag = studio.sottotitolo.replace(/^Studio\s+/i, '');
|
||||
const isHome = Astro.url.pathname === '/';
|
||||
const MarkSvg = variant === 'dark' ? MarkDark : Mark;
|
||||
---
|
||||
|
||||
{href ? (
|
||||
<a
|
||||
class:list={['brand', `brand--${variant}`, className]}
|
||||
href={href}
|
||||
aria-current={isHome && href === '/' ? 'page' : undefined}
|
||||
>
|
||||
<MarkSvg class="brand__mark" width={44} height={44} aria-hidden="true" />
|
||||
<span class="brand__text">
|
||||
<span class="brand__name">{studio.nome}</span>
|
||||
<span class="brand__tag">{tag}</span>
|
||||
</span>
|
||||
</a>
|
||||
) : (
|
||||
<span class:list={['brand', `brand--${variant}`, className]}>
|
||||
<MarkSvg class="brand__mark" width={44} height={44} aria-hidden="true" />
|
||||
<span class="brand__text">
|
||||
<span class="brand__name">{studio.nome}</span>
|
||||
<span class="brand__tag">{tag}</span>
|
||||
</span>
|
||||
</span>
|
||||
)}
|
||||
|
||||
<style>
|
||||
.brand {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.8rem;
|
||||
min-height: var(--tap);
|
||||
text-decoration: none;
|
||||
color: var(--navy-900);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.brand:hover {
|
||||
color: var(--navy-900);
|
||||
}
|
||||
|
||||
.brand__mark {
|
||||
flex: none;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.brand__text {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.brand__name {
|
||||
font-family: var(--font-display);
|
||||
font-size: 1.35rem;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.brand__tag {
|
||||
display: block;
|
||||
margin-top: 0.35rem;
|
||||
font-family: var(--font-body);
|
||||
font-size: 0.65rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
letter-spacing: 0.16em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-600);
|
||||
}
|
||||
|
||||
.brand--dark,
|
||||
.brand--dark:hover {
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
.brand--dark .brand__tag {
|
||||
color: var(--on-dark-muted);
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user