Aggiunge pagina di test promo-eventi2 con stili unificati al design system

Variante di /promo-eventi con font Montserrat/Open Sans e palette --c-* al posto di
Inter e dei colori hardcoded; struttura e contenuti identici (stessi tag promo.*).
Root class `.lp2` per isolare gli stili is:global dalla pagina originale. Aggiunta la
voce di menu "Promo 2 (test)" → /promo-eventi2 per il confronto affiancato.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-13 16:51:42 +02:00
parent a7b05d703a
commit 931c1e43ad
3 changed files with 199 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ export const contentSeed: SeedEntry[] = [
T('global.nav.4.label', site.navigation[3].label, []), T('global.nav.4.label', site.navigation[3].label, []),
T('global.nav.5.label', site.navigation[4].label, []), T('global.nav.5.label', site.navigation[4].label, []),
T('global.nav.6.label', site.navigation[5].label, []), T('global.nav.6.label', site.navigation[5].label, []),
T('global.nav.7.label', site.navigation[6].label, []),
// --- Header --- // --- Header ---
T('header.logo.alt', 'InsanityLab', []), T('header.logo.alt', 'InsanityLab', []),
+1
View File
@@ -18,6 +18,7 @@ export const site = {
{ label: "Blog & Edugo", href: "/blog" }, { label: "Blog & Edugo", href: "/blog" },
{ label: "Promo ed eventi", href: "/promo-eventi" }, { label: "Promo ed eventi", href: "/promo-eventi" },
{ label: "Contatti", href: "/contact" }, { label: "Contatti", href: "/contact" },
{ label: "Promo 2 (test)", href: "/promo-eventi2" },
], ],
footerTraining: [ footerTraining: [
{ label: "One to one", href: "/training#one-to-one" }, { label: "One to one", href: "/training#one-to-one" },
+197
View File
@@ -0,0 +1,197 @@
---
import Base from '../layouts/Base.astro';
import T from '../components/content/T.astro';
import { t, resolveContent } from '../lib/content';
// Variante di test di /promo-eventi con stili UNIFICATI al design system del sito
// (font Montserrat/Open Sans, palette --c-*). Struttura e contenuti identici: usa gli
// stessi tag `promo.*`, così il confronto è solo sull'aspetto. Root class `.lp2` per non
// far collidere gli stili is:global con quelli della pagina originale.
const BSPORT_URL = 'https://backoffice.bsport.io/login/signup?membership=3428';
export const prerender = false;
const cards = [
{ id: 1, features: 4, featured: false },
{ id: 2, features: 4, featured: true },
{ id: 3, features: 3, featured: false },
{ id: 4, features: 3, featured: false },
];
const faqs = [1, 2, 3, 4, 5, 6];
const wa = t('global.whatsapp');
---
<Base title="Promo ed eventi — InsanityLab" description="Edizione apertura: pacchetti a 5 incontri per One to One, Small Group, Reformer e Holistic Class. Acquisto online, pagamento sicuro via Stripe.">
<div class="lp2">
<div class="page">
<section class="hero">
<T tag="promo.hero.badge" as="div" class="badge" />
<T tag="promo.hero.title1" as="h1" />
<T tag="promo.hero.accent" as="p" class="accent" />
<T tag="promo.hero.title2" as="h1" />
<T tag="promo.hero.desc" as="p" class="desc" />
<a class="btn-sand" href="#proposte"><T tag="promo.hero.cta" as="span" /></a>
</section>
<section class="launch">
<T tag="promo.launch.badge" as="div" class="badge" />
<T tag="promo.launch.title" as="h1" />
<T tag="promo.launch.accent" as="p" class="accent" />
<T tag="promo.launch.desc" as="p" class="desc" />
</section>
<section class="why5">
<T tag="promo.why5.text" as="p" />
</section>
<section class="cards-wrap" id="proposte">
<div class="cards">
{cards.map((c) => (
<div class:list={['card', c.featured && 'featured']}>
{c.featured && <T tag={`promo.card.${c.id}.badge`} as="div" class="featured-badge" />}
<T tag={`promo.card.${c.id}.eyebrow`} as="div" class="eyebrow" />
<T tag={`promo.card.${c.id}.title`} as="div" class="title" />
<div class="price-row">
<T tag={`promo.card.${c.id}.price`} as="div" class="price" />
<T tag={`promo.card.${c.id}.price-old`} as="div" class="price-old" />
</div>
<T tag={`promo.card.${c.id}.unit`} as="div" class="unit" />
<ul>
{Array.from({ length: c.features }, (_, i) => i + 1).map((m) => (
<T tag={`promo.card.${c.id}.feature.${m}`} as="li" />
))}
</ul>
<a class="buy" href={BSPORT_URL} target="_blank" rel="noopener"><T tag="promo.buy-label" as="span" /></a>
</div>
))}
</div>
<T tag="promo.validity-note" as="p" class="validity-note" />
</section>
<section class="faq-wrap">
<T tag="promo.faq.title" as="h1" />
{faqs.map((n) => {
const a = resolveContent(`promo.faq.${n}.a`);
return (
<div class="faq-block">
<div class="faq-q"><T tag={`promo.faq.${n}.q`} as="p" /><div class="faq-toggle">+</div></div>
<p class:list={['faq-a', a.classes]} data-tag={`promo.faq.${n}.a`} data-guid={a.guid || undefined} set:html={a.value.replaceAll('{{whatsapp}}', wa)} />
</div>
);
})}
</section>
</div>
</div>
</Base>
<script>
// Accordion FAQ: click (o Invio/Spazio) sul quesito apre/chiude la risposta.
document.querySelectorAll('.lp2 .faq-block .faq-q').forEach((q) => {
const block = q.closest('.faq-block');
const toggle = q.querySelector('.faq-toggle');
q.setAttribute('role', 'button');
q.setAttribute('tabindex', '0');
q.setAttribute('aria-expanded', 'false');
const set = (open: boolean) => {
block?.classList.toggle('is-open', open);
q.setAttribute('aria-expanded', String(open));
if (toggle) toggle.textContent = open ? '' : '+';
};
q.addEventListener('click', () => set(!block?.classList.contains('is-open')));
q.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); set(!block?.classList.contains('is-open')); }
});
});
</script>
<!-- is:global perché i testi editabili sono renderizzati dal componente <T> (fuori dallo
scope della pagina). Ogni regola è prefissata `.lp2`, quindi resta confinata a questa
pagina di test. Stili ricondotti ai token del design system (var(--c-*), var(--font-*)). -->
<style is:global>
.lp2 { background: var(--c-bg-alt); }
.lp2 .page { max-width: 1000px; margin: 0 auto; background: var(--c-bg); font-family: var(--font-body); }
/* HERO */
.lp2 .hero { background: var(--c-dark); padding: 72px 64px 84px; }
.lp2 .badge {
display: inline-block; padding: 7px 16px; border: 0.5px solid rgba(184,169,140,0.5);
border-radius: 999px; margin-bottom: 24px; font-size: 11px; letter-spacing: 0.08em;
color: var(--c-accent); font-weight: 600; text-transform: uppercase; font-family: var(--font-heading);
}
.lp2 .hero h1 { margin: 0; font-family: var(--font-heading); font-size: 44px; line-height: 1.2; font-weight: 600; color: #fff; letter-spacing: .02em; }
.lp2 .hero .accent { margin: 4px 0; font-family: var(--font-heading); font-size: 34px; line-height: 1.3; font-style: italic; color: var(--c-accent); }
.lp2 .hero p.desc { margin: 28px 0 32px; font-size: 16px; line-height: 1.7; color: #cfc6bd; max-width: 480px; }
.lp2 .btn-sand {
display: inline-flex; align-items: center; gap: 14px; background: var(--c-accent); color: #fff;
border: none; padding: 15px 30px; border-radius: 999px; font-family: var(--font-heading);
font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
text-decoration: none; transition: background .2s;
}
.lp2 .btn-sand:hover { background: var(--c-accent-dark); }
/* LAUNCH */
.lp2 .launch { background: var(--c-bg-alt); padding: 72px 64px; }
.lp2 .launch .badge { border-color: rgba(156,139,112,0.35); color: var(--c-accent-dark); }
.lp2 .launch h1 { margin: 0; font-family: var(--font-heading); font-size: 38px; line-height: 1.25; font-weight: 600; color: var(--c-heading); letter-spacing: .02em; }
.lp2 .launch .accent { margin: 8px 0 28px; font-family: var(--font-heading); font-size: 26px; line-height: 1.35; font-style: italic; color: var(--c-accent-dark); }
.lp2 .launch p.desc { margin: 0; font-size: 16px; line-height: 1.7; color: var(--c-text); max-width: 540px; }
/* PERCHE 5 */
.lp2 .why5 { padding: 48px 64px 8px; }
.lp2 .why5 p { margin: 0; font-family: var(--font-heading); font-size: 18px; line-height: 1.7; font-style: italic; color: var(--c-heading); max-width: 620px; }
/* CARDS */
.lp2 .cards-wrap { padding: 32px 64px 72px; }
.lp2 .cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.lp2 .card { background: var(--c-bg); border: 0.5px solid #ddd5ca; border-radius: 14px; padding: 26px; position: relative; }
.lp2 .card.featured { border: 2px solid var(--c-dark); }
.lp2 .featured-badge {
position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--c-dark);
color: #fff; font-size: 11px; padding: 4px 14px; border-radius: 999px; white-space: nowrap; font-weight: 600;
font-family: var(--font-heading); letter-spacing: .04em;
}
.lp2 .card .eyebrow { font-family: var(--font-heading); font-size: 11px; letter-spacing: 0.15em; color: var(--c-text-light); margin: 0 0 4px; text-transform: uppercase; font-weight: 600; }
.lp2 .card .title { font-family: var(--font-heading); font-size: 19px; font-weight: 600; color: var(--c-heading); margin: 0 0 14px; letter-spacing: .02em; }
.lp2 .card .price-row { display: flex; align-items: baseline; gap: 10px; margin: 0 0 2px; }
.lp2 .card .price { font-family: var(--font-heading); font-size: 26px; font-weight: 700; color: var(--c-heading); margin: 0; }
.lp2 .card .price-old { font-size: 15px; color: var(--c-text-light); text-decoration: line-through; font-weight: 400; }
.lp2 .card .unit { font-size: 12px; color: var(--c-text-light); margin: 0 0 18px; }
.lp2 .card ul { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 9px; }
.lp2 .card li { font-size: 13.5px; line-height: 1.5; color: var(--c-text); display: flex; gap: 8px; }
.lp2 .card li::before { content: "—"; color: var(--c-accent); font-weight: 700; flex-shrink: 0; }
.lp2 .card .buy {
display: block; width: 100%; box-sizing: border-box; text-align: center; text-decoration: none;
background: var(--c-dark); color: #fff; border: none; padding: 13px; border-radius: 999px;
font-family: var(--font-heading); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
transition: background .2s;
}
.lp2 .card .buy:hover { background: var(--c-dark-2); }
.lp2 .card.featured .buy { background: var(--c-accent); }
.lp2 .card.featured .buy:hover { background: var(--c-accent-dark); }
.lp2 .validity-note { text-align: center; font-size: 12px; color: var(--c-text-light); margin: 22px 0 0; }
/* FAQ */
.lp2 .faq-wrap { padding: 72px 64px; }
.lp2 .faq-wrap h1 { margin: 0 0 40px; font-family: var(--font-heading); font-size: 32px; line-height: 1.25; font-weight: 600; color: var(--c-heading); max-width: 480px; letter-spacing: .02em; }
.lp2 .faq-block { border-top: 0.5px solid #ddd5ca; padding: 22px 0; }
.lp2 .faq-block:last-child { border-bottom: 0.5px solid #ddd5ca; }
.lp2 .faq-q { display: flex; justify-content: space-between; align-items: center; gap: 24px; cursor: pointer; }
.lp2 .faq-q p { margin: 0; font-family: var(--font-heading); font-size: 16px; font-weight: 600; color: var(--c-heading); letter-spacing: .01em; }
.lp2 .faq-q:focus-visible { outline: 2px solid var(--c-accent-dark); outline-offset: 4px; }
.lp2 .faq-toggle {
width: 30px; height: 30px; border-radius: 50%; border: 0.5px solid #c9c3b4; display: flex;
align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; color: var(--c-heading);
transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.lp2 .faq-block.is-open .faq-toggle { background: var(--c-dark); color: #fff; border-color: var(--c-dark); }
.lp2 .faq-a { display: none; margin: 14px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--c-text-light); max-width: 620px; }
.lp2 .faq-block.is-open .faq-a { display: block; }
.lp2 .faq-a .hl { color: var(--c-accent-dark); font-weight: 600; }
@media (max-width: 700px) {
.lp2 .hero, .lp2 .launch, .lp2 .why5, .lp2 .cards-wrap, .lp2 .faq-wrap { padding-left: 28px; padding-right: 28px; }
.lp2 .cards { grid-template-columns: 1fr; }
.lp2 .hero h1 { font-size: 32px; }
.lp2 .launch h1 { font-size: 28px; }
}
</style>