feat(landing): integrate campaign and early intervention pages
This commit is contained in:
63 files changed
+4230
-50
No files matched your search
@@ -2,7 +2,7 @@
|
||||
import Header from '../components/Header.astro';
|
||||
import Footer from '../components/Footer.astro';
|
||||
import Seo from '../components/Seo.astro';
|
||||
import site from '../data/site.json';
|
||||
import OrganizationSchema from '../components/OrganizationSchema.astro';
|
||||
import { getPublication, getRoutePublicationManifest } from '../utils/publication';
|
||||
import type { VisitorLocale, VisitorPublication } from '../utils/visitor-navigation';
|
||||
import '../styles/global.css';
|
||||
@@ -16,22 +16,7 @@ const imageAlt = image && image === publication.entry.data.featuredImage
|
||||
: undefined;
|
||||
const dir = lang === 'ar' ? 'rtl' : 'ltr';
|
||||
const skipLink = { en: 'Skip to content', es: 'Saltar al contenido', ar: 'انتقل إلى المحتوى' }[lang as VisitorLocale] ?? 'Skip to content';
|
||||
const organizationSchema = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'MedicalOrganization',
|
||||
name: site.name,
|
||||
url: site.url,
|
||||
// Contact details are rendered through ContactObfuscation to avoid plain text in HTML.
|
||||
address: {
|
||||
'@type': 'PostalAddress',
|
||||
streetAddress: '8901 E Raintree Dr Ste 160',
|
||||
addressLocality: 'Scottsdale',
|
||||
addressRegion: 'AZ',
|
||||
postalCode: '85260',
|
||||
addressCountry: 'US'
|
||||
},
|
||||
sameAs: Object.values(site.social)
|
||||
};
|
||||
|
||||
---
|
||||
<!doctype html>
|
||||
<html lang={lang} dir={dir}>
|
||||
@@ -41,7 +26,7 @@ const organizationSchema = {
|
||||
<link rel="icon" href="/assets/images/favicon.svg" />
|
||||
<Seo title={title} description={description} publication={publication} image={image} imageAlt={imageAlt} type={type} />
|
||||
<slot name="head" />
|
||||
<script type="application/ld+json" is:inline set:html={JSON.stringify(organizationSchema)} />
|
||||
<OrganizationSchema />
|
||||
</head>
|
||||
<body>
|
||||
<a class="skip-link" href="#main">{skipLink}</a>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
import '../styles/campaign.css';
|
||||
import Header from '../components/campaign/Header.astro';
|
||||
import Footer from '../components/campaign/Footer.astro';
|
||||
import Seo from '../components/Seo.astro';
|
||||
import OrganizationSchema from '../components/OrganizationSchema.astro';
|
||||
import { getPublication } from '../utils/publication';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
description: string;
|
||||
canonicalPath: string;
|
||||
primaryCta?: string;
|
||||
}
|
||||
const { title, description, canonicalPath, primaryCta } = Astro.props;
|
||||
const publication = await getPublication(canonicalPath);
|
||||
---
|
||||
<!doctype html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<Seo title={title} description={description} publication={publication} />
|
||||
<OrganizationSchema />
|
||||
<link rel="preload" href="/assets/campaign/fonts/playfair-display-700.woff2" as="font" type="font/woff2" crossorigin />
|
||||
<link rel="preload" href="/assets/campaign/fonts/rubik-400.woff2" as="font" type="font/woff2" crossorigin />
|
||||
</head>
|
||||
<body>
|
||||
<a class="skip-link" href="#main-content">Skip to content</a>
|
||||
<Header primaryCta={primaryCta} />
|
||||
<main id="main-content" tabindex="-1"><slot /></main>
|
||||
<Footer />
|
||||
{primaryCta && <div class="mobile-cta"><a class="button" href="#consultation">{primaryCta}</a></div>}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
import '../styles/early-intervention.css';
|
||||
import { getEntry } from 'astro:content';
|
||||
import Seo from '../components/Seo.astro';
|
||||
import OrganizationSchema from '../components/OrganizationSchema.astro';
|
||||
import { getPublication } from '../utils/publication';
|
||||
const publication = await getPublication('/lp/early-intervention');
|
||||
const entry = await getEntry('pages', 'en/lp/early-intervention');
|
||||
if (!entry || !publication.eligible) throw new Error('Early-intervention publication unavailable');
|
||||
const { title, description } = entry.data;
|
||||
---
|
||||
<!doctype html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<Seo title={title} description={description} publication={publication} />
|
||||
<OrganizationSchema />
|
||||
</head>
|
||||
<body>
|
||||
<a class="skip-link" href="#main-content">Skip to content</a>
|
||||
<header class="early-header"><a href="/" aria-label="Arizona Institute for Autism home"><img src="/assets/images/aia-logo.svg" width="300" height="140" alt="Arizona Institute for Autism" /></a></header>
|
||||
<main id="main-content" tabindex="-1"><slot /></main>
|
||||
<footer class="early-footer"><span>© 2018–2026 Arizona Institute for Autism ♥ All Rights Reserved</span><div><a href="/privacy-policy">Privacy Policy</a> | <a href="/faqs">FAQ</a></div></footer>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user