diff --git a/src/pages/services/index.astro b/src/pages/services/index.astro index 38d47bf..ff7b0cc 100644 --- a/src/pages/services/index.astro +++ b/src/pages/services/index.astro @@ -9,9 +9,11 @@ import { t } from '../../lib/content'; const images = import.meta.glob<{ default: ImageMetadata }>('../../assets/img/program-*.jpg', { eager: true }); const imgOf = (slug: string) => Object.entries(images).find(([p]) => p.includes(`program-${slug}.`))?.[1]?.default; const gridServices = services.filter((p) => p.grid !== false); -// Questi servizi rimandano alla pagina Training invece che alla scheda di dettaglio -const TRAINING_LINK = new Set(['one-to-one', 'performance-class']); -const moreHref = (slug: string) => (TRAINING_LINK.has(slug) ? '/training' : `/services/${slug}`); +// Foto e "Per saperne di più" della stessa card portano allo stesso posto, e lo fanno per +// costruzione: erano due espressioni diverse e sono divergute — su One to One e Performance +// Class il testo mandava a /training mentre la foto apriva la scheda del servizio, così la +// destinazione dipendeva da dove capitava il dito. +const hrefOf = (slug: string) => `/services/${slug}`; export const prerender = false; --- @@ -25,7 +27,7 @@ export const prerender = false; {gridServices.map((p, i) => (
{imgOf(p.slug) && ( - + )} @@ -33,7 +35,7 @@ export const prerender = false; - {t('services.card.more-label')} + {t('services.card.more-label')}
))}