Consulenza: bottone nel menu in alto su ogni pagina, voce nel menu mobile (#22)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
import { site } from '../data/site';
|
import { site } from '../data/site';
|
||||||
import { t, contentImageUrl } from '../lib/content';
|
import { t, contentImageUrl } from '../lib/content';
|
||||||
import { landingFor } from '../lib/auth';
|
import { landingFor } from '../lib/auth';
|
||||||
|
import { linkConsulenza } from '../data/consulenza';
|
||||||
interface Props {
|
interface Props {
|
||||||
user: { username: string; role: string } | null;
|
user: { username: string; role: string } | null;
|
||||||
showTags: boolean;
|
showTags: boolean;
|
||||||
@@ -17,6 +18,8 @@ const path = Astro.url.pathname;
|
|||||||
// si cambia una riga — ed e' l'unico posto del sito che nomina l'area riservata.
|
// si cambia una riga — ed e' l'unico posto del sito che nomina l'area riservata.
|
||||||
const AREA_RISERVATA = 'https://piattaforme.tielogic.xyz';
|
const AREA_RISERVATA = 'https://piattaforme.tielogic.xyz';
|
||||||
const areaHref = user ? landingFor(user.role) : '/admin';
|
const areaHref = user ? landingFor(user.role) : '/admin';
|
||||||
|
// Consulenza con Nicola su ogni pagina, non solo sulla Reformer Class (Adriano 30/09, #22).
|
||||||
|
const consulenzaHref = linkConsulenza(t('global.consulenza.url'));
|
||||||
---
|
---
|
||||||
<header class="hdr" id="site-header">
|
<header class="hdr" id="site-header">
|
||||||
<div class="container hdr__in">
|
<div class="container hdr__in">
|
||||||
@@ -27,7 +30,9 @@ const areaHref = user ? landingFor(user.role) : '/admin';
|
|||||||
<a href={item.href} class:list={['hdr__link', { 'is-active': path === item.href || (item.href !== '/' && path.startsWith(item.href)) }]}>{t(`global.nav.${i + 1}.label`)}</a>
|
<a href={item.href} class:list={['hdr__link', { 'is-active': path === item.href || (item.href !== '/' && path.startsWith(item.href)) }]}>{t(`global.nav.${i + 1}.label`)}</a>
|
||||||
)
|
)
|
||||||
))}
|
))}
|
||||||
|
<a class="hdr__link hdr__consulenza-mob" href={consulenzaHref} target="_blank" rel="noopener noreferrer">{t('global.consulenza.cta-breve')}</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
<a class="hdr__consulenza" href={consulenzaHref} target="_blank" rel="noopener noreferrer">{t('global.consulenza.cta-breve')}</a>
|
||||||
<div class="hdr__user">
|
<div class="hdr__user">
|
||||||
{user ? (
|
{user ? (
|
||||||
<details class="umenu">
|
<details class="umenu">
|
||||||
@@ -55,6 +60,8 @@ const areaHref = user ? landingFor(user.role) : '/admin';
|
|||||||
.hdr.is-scrolled { box-shadow: 0 2px 14px rgba(0,0,0,.08); }
|
.hdr.is-scrolled { box-shadow: 0 2px 14px rgba(0,0,0,.08); }
|
||||||
.hdr__in { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
|
.hdr__in { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
|
||||||
.hdr__nav { display: flex; gap: 34px; }
|
.hdr__nav { display: flex; gap: 34px; }
|
||||||
|
/* Col bottone Consulenza nella barra le voci non devono andare a capo (#22). */
|
||||||
|
@media (min-width: 992px) { .hdr__nav { gap: 22px; } .hdr__link, .hdr__login { white-space: nowrap; } .hdr__logo { flex-shrink: 0; margin-right: 28px; } }
|
||||||
.hdr__link { font-family: var(--font-heading); font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--c-heading); transition: color .3s ease; }
|
.hdr__link { font-family: var(--font-heading); font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--c-heading); transition: color .3s ease; }
|
||||||
.hdr__link:hover, .hdr__link.is-active { color: var(--c-accent-dark); }
|
.hdr__link:hover, .hdr__link.is-active { color: var(--c-accent-dark); }
|
||||||
.hdr__link--bio { color: var(--c-accent-dark); }
|
.hdr__link--bio { color: var(--c-accent-dark); }
|
||||||
@@ -79,6 +86,13 @@ const areaHref = user ? landingFor(user.role) : '/admin';
|
|||||||
.plat__panel { position: static; box-shadow: none; padding: 0 0 8px; min-width: 0; }
|
.plat__panel { position: static; box-shadow: none; padding: 0 0 8px; min-width: 0; }
|
||||||
.plat__item { padding: 10px 0 10px 14px; }
|
.plat__item { padding: 10px 0 10px 14px; }
|
||||||
}
|
}
|
||||||
|
.hdr__consulenza { font-family: var(--font-heading); font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: #fff; background: #6b5d5b; padding: 10px 14px; margin: 0 18px; white-space: nowrap; transition: background .2s; }
|
||||||
|
.hdr__consulenza:hover { background: var(--c-accent-dark); }
|
||||||
|
.hdr__consulenza-mob { display: none; }
|
||||||
|
@media (max-width: 991px) {
|
||||||
|
.hdr__consulenza { display: none; }
|
||||||
|
.hdr__consulenza-mob { display: block; color: var(--c-accent-dark); }
|
||||||
|
}
|
||||||
.hdr__user { display: flex; align-items: center; }
|
.hdr__user { display: flex; align-items: center; }
|
||||||
.hdr__login { font-family: var(--font-heading); font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--c-heading); }
|
.hdr__login { font-family: var(--font-heading); font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--c-heading); }
|
||||||
.hdr__login:hover { color: var(--c-accent-dark); }
|
.hdr__login:hover { color: var(--c-accent-dark); }
|
||||||
|
|||||||
@@ -274,6 +274,7 @@ export const contentSeed: SeedEntry[] = [
|
|||||||
T('service.consulenza-cta', 'Prenota una consulenza conoscitiva gratuita', []),
|
T('service.consulenza-cta', 'Prenota una consulenza conoscitiva gratuita', []),
|
||||||
T('service.consulenza-note', '30-45 minuti con Nicola, in sede: via Leandro Alberti 76, primo piano', []),
|
T('service.consulenza-note', '30-45 minuti con Nicola, in sede: via Leandro Alberti 76, primo piano', []),
|
||||||
T('global.consulenza.url', CONSULENZA_URL_DEFAULT, []),
|
T('global.consulenza.url', CONSULENZA_URL_DEFAULT, []),
|
||||||
|
T('global.consulenza.cta-breve', 'Consulenza gratuita', []),
|
||||||
|
|
||||||
// --- Pricing performance class (data-driven da pricing.ts; monthly/entries restano nel data file) ---
|
// --- Pricing performance class (data-driven da pricing.ts; monthly/entries restano nel data file) ---
|
||||||
T('pricing.heading', performanceClassPricing.heading),
|
T('pricing.heading', performanceClassPricing.heading),
|
||||||
|
|||||||
Reference in New Issue
Block a user