fix(tour): restore location map and schedule button
This commit is contained in:
4 files changed
+95
-2
No files matched your search
@@ -7,6 +7,7 @@ import AboutPage from '../components/pages/AboutPage.astro';
|
||||
import ServicesPage from '../components/pages/ServicesPage.astro';
|
||||
import CareersPage from '../components/pages/CareersPage.astro';
|
||||
import ContactPage from '../components/pages/ContactPage.astro';
|
||||
import TourMap from '../components/TourMap.astro';
|
||||
import FaqPage from '../components/pages/FaqPage.astro';
|
||||
import InsurancePage from '../components/pages/InsurancePage.astro';
|
||||
import PageHero from '../components/PageHero.astro';
|
||||
@@ -55,13 +56,14 @@ const pageTitles: Record<string, Record<string, string>> = {
|
||||
const bannerTitle = serviceTitles[entry.data.lang]?.[entry.data.slug] || pageTitles[entry.data.lang]?.[entry.data.slug] || entry.data.title.split('|')[0].trim();
|
||||
const isService = Boolean(serviceTitles[entry.data.lang]?.[entry.data.slug]);
|
||||
const route = entry.data.lang === 'en' ? `/${entry.data.slug}` : `/${entry.data.lang}/${entry.data.slug}`;
|
||||
const isTour = entry.data.lang === 'en' && entry.data.slug === 'tour';
|
||||
const heroImage = pageHeroImages[entry.data.slug];
|
||||
if (entry.data.slug === 'team' && entry.data.lang === 'en' && !entry.data.team) {
|
||||
throw new Error('The English Team page requires structured team frontmatter.');
|
||||
}
|
||||
---
|
||||
<BaseLayout title={entry.data.title} description={entry.data.description} image={entry.data.featuredImage || heroImage} lang={entry.data.lang}>
|
||||
{entry.data.slug === 'contact' && <Fragment slot="head"><link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" /></Fragment>}
|
||||
{(entry.data.slug === 'contact' || isTour) && <Fragment slot="head"><link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" /></Fragment>}
|
||||
<PageHero title={entry.data.displayH1 ?? bannerTitle} subtitle={entry.data.slug === 'faqs' ? 'FAQs' : undefined} image={heroImage} constrain />
|
||||
{entry.data.slug === 'team' && entry.data.lang === 'en'
|
||||
? <TeamPage content={entry.data.team!} />
|
||||
@@ -82,6 +84,7 @@ if (entry.data.slug === 'team' && entry.data.lang === 'en' && !entry.data.team)
|
||||
: entry.data.slug === 'contact'
|
||||
? <ContactPage title={bannerTitle} lang={entry.data.lang}><slot /></ContactPage>
|
||||
: <article class:list={['prose', 'source-page', 'container', { 'service-page': isService }]}><slot /></article>}
|
||||
{isTour && <TourMap />}
|
||||
{isService && (entry.data.lang === 'en' || entry.data.lang === 'es') && <ServiceInquiryDrawer service={entry.data.slug} lang={entry.data.lang} route={route} />}
|
||||
{showForm && <FormShell lang={entry.data.lang} route={route} title={bannerTitle} logicalForm={entry.data.slug === 'referrals' ? 'referral' : 'service'} showBackground={entry.data.slug === 'client-consultation'} />}
|
||||
</BaseLayout>
|
||||
Reference in new issue
Block a user