Marketing round: pilot banner + price feedback, simpler lead forms, journey page, trimmed home
- pricing: pilot-stage banner (pilot_label/pilot_text) on home + founders; price-range checklist on the founders page — selections fire consent-gated Umami events (price-range-*) via the new data-umami-event listener and ride the Zoho payload as price_range - forms: Zoho needs only name + email — founders form drops first/last split, stage, sector, country, heard; hubs form drops country/programme select (country deduced downstream from locale, which already rides the payload) - journey: moved to its own /journey/ page (six phases), nav entry added - home: reduced to hero + pilot banner + two audience cards linking to the value-proposition pages; verbose blocks rewritten - nav bug fix: the nav was built from the CURRENT page's alternates, so every page rendered a one-entry nav; now built from all pages of the locale - CMS: config.yml + custom preview gain the pilot banner, price checklist and card-link fields
This commit is contained in:
1 parent
e21ee4b24e
commit
f1d30ef1b6
8 files changed
+287
-127
No files matched your search
+110
-22
@@ -30,15 +30,19 @@ const localePrefix = (code) => (code === DEFAULT_LOCALE ? "" : `/${code}`);
|
||||
const pageUrl = (code, id) => `${baseUrl}${localePrefix(code)}${id === "" ? "/" : `/${id}/`}`;
|
||||
|
||||
// hreflang alternates: only the locales that actually carry this page.
|
||||
const alternates = Object.keys(pageModules)
|
||||
.map((file) => {
|
||||
const m = file.match(/\.\.\/pages\/(?:([^/]+)\/)?([^/]+)\.md$/);
|
||||
if (!m) return null;
|
||||
const [, code, name] = m;
|
||||
const id = name === "index" ? "" : name;
|
||||
return { code: code ?? DEFAULT_LOCALE, id };
|
||||
})
|
||||
.filter((v) => v && v.id === pageId && (localeByCode(v.code) || v.code === DEFAULT_LOCALE));
|
||||
// localePages: every page that exists in the nav's scope — parsed once,
|
||||
// shared by the language switcher (same page, all locales) and the nav
|
||||
// (all pages, this locale).
|
||||
const parsePages = () =>
|
||||
Object.keys(pageModules)
|
||||
.map((file) => {
|
||||
const m = file.match(/\.\.\/pages\/(?:([^/]+)\/)?([^/]+)\.md$/);
|
||||
if (!m) return null;
|
||||
const [, code, name] = m;
|
||||
return { code: code ?? DEFAULT_LOCALE, id: name === "index" ? "" : name };
|
||||
})
|
||||
.filter((v) => v && (localeByCode(v.code) || v.code === DEFAULT_LOCALE));
|
||||
const alternates = parsePages().filter((v) => v.id === pageId);
|
||||
|
||||
const canonical = `${baseUrl}${Astro.url.pathname}`;
|
||||
const fm = Astro.props.frontmatter ?? {};
|
||||
@@ -46,14 +50,15 @@ const description = fm.description ?? strings.footer_tagline;
|
||||
const ogImage = fm.og_image; // optional; pages may override
|
||||
|
||||
// nav: this locale's pages only, ordered by the fixed page order.
|
||||
const order = ["", "for-founders", "for-innovation-hubs", "privacy", "cookies"];
|
||||
const navEntries = alternates
|
||||
.filter((a) => order.includes(a.id))
|
||||
const order = ["", "journey", "for-founders", "for-innovation-hubs", "privacy", "cookies"];
|
||||
const navEntries = parsePages()
|
||||
.filter((a) => a.code === locale && order.includes(a.id))
|
||||
.map((a) => ({
|
||||
id: a.id,
|
||||
href: `${localePrefix(locale)}${a.id === "" ? "/" : `/${a.id}/`}`,
|
||||
label:
|
||||
a.id === "" ? strings.nav_home
|
||||
: a.id === "journey" ? strings.nav_journey
|
||||
: a.id === "for-founders" ? strings.nav_for_founders
|
||||
: a.id === "for-innovation-hubs" ? strings.nav_for_innovation_hubs
|
||||
: a.id === "privacy" ? strings.nav_privacy
|
||||
@@ -61,6 +66,7 @@ const navEntries = alternates
|
||||
}))
|
||||
.sort((a, b) => order.indexOf(a.id) - order.indexOf(b.id));
|
||||
|
||||
const isAudiencePage = pageId === "for-founders" || pageId === "for-innovation-hubs";
|
||||
const jsonLd =
|
||||
pageId === ""
|
||||
? {
|
||||
@@ -70,7 +76,8 @@ const jsonLd =
|
||||
url: baseUrl,
|
||||
description,
|
||||
}
|
||||
: {
|
||||
: isAudiencePage
|
||||
? {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Service",
|
||||
serviceType: pageId === "for-founders" ? "Startup validation guidance" : "Innovation hub programmes",
|
||||
@@ -78,9 +85,16 @@ const jsonLd =
|
||||
areaServed: "EU",
|
||||
url: canonical,
|
||||
description,
|
||||
}
|
||||
: {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebPage",
|
||||
name: fm.title,
|
||||
url: canonical,
|
||||
description,
|
||||
};
|
||||
|
||||
const hasForm = pageId === "for-founders" || pageId === "for-innovation-hubs";
|
||||
const hasForm = isAudiencePage;
|
||||
---
|
||||
<!doctype html>
|
||||
<html lang={locale} dir={dir}>
|
||||
@@ -210,15 +224,53 @@ const hasForm = pageId === "for-founders" || pageId === "for-innovation-hubs";
|
||||
)
|
||||
}
|
||||
|
||||
{
|
||||
fm.pilot_text && (
|
||||
<aside class="pilot-banner">
|
||||
{fm.pilot_label && <strong class="pilot-label">{fm.pilot_label}</strong>}
|
||||
<p>{fm.pilot_text}</p>
|
||||
</aside>
|
||||
)
|
||||
}
|
||||
|
||||
{
|
||||
Array.isArray(fm.value_props) && fm.value_props.length > 0 && (
|
||||
<section class="cards" aria-label={fm.value_props_title}>
|
||||
{fm.value_props.map((v) => (
|
||||
<article class="card">
|
||||
<h2>{v.heading}</h2>
|
||||
<p>{v.text}</p>
|
||||
</article>
|
||||
))}
|
||||
<section class="cards-section">
|
||||
{fm.value_props_title && <h2>{fm.value_props_title}</h2>}
|
||||
<div class="cards">
|
||||
{fm.value_props.map((v) => (
|
||||
<article class="card">
|
||||
<h3>{v.heading}</h3>
|
||||
<p>{v.text}</p>
|
||||
{v.link && (
|
||||
<a class="card-link" href={`${localePrefix(locale)}${v.link}`}>{v.link_label ?? strings.card_link_default}</a>
|
||||
)}
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
{
|
||||
Array.isArray(fm.price_ranges) && fm.price_ranges.length > 0 && (
|
||||
<section class="pricing">
|
||||
<h2>{fm.price_title}</h2>
|
||||
{fm.price_note && <p class="pricing-note">{fm.price_note}</p>}
|
||||
<div class="cards price-list">
|
||||
{fm.price_ranges.map((r) => (
|
||||
<label class="card cap" data-umami-event={`price-range-${r.key}`}>
|
||||
<input
|
||||
type="checkbox"
|
||||
data-price={r.key}
|
||||
data-price-label={r.label}
|
||||
/>
|
||||
<span class="cap-body">
|
||||
<strong>{r.label}</strong>
|
||||
</span>
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -284,6 +336,22 @@ const hasForm = pageId === "for-founders" || pageId === "for-innovation-hubs";
|
||||
<p>{strings.footer_hosting_note}</p>
|
||||
</footer>
|
||||
|
||||
<script is:inline>
|
||||
(() => {
|
||||
// Checklist interactions feed self-hosted analytics: any element
|
||||
// carrying data-umami-event reports on change, with its checked
|
||||
// state. window.umami exists only for consented visitors — the
|
||||
// analytics script is injected by the consent gate in <head>.
|
||||
document.addEventListener("change", (event) => {
|
||||
const el = event.target && event.target.closest ? event.target.closest("[data-umami-event]") : null;
|
||||
if (!el) return;
|
||||
try {
|
||||
window.umami && window.umami.track(el.dataset.umamiEvent, { selected: !!el.checked });
|
||||
} catch {}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
<div id="cookie-consent" role="region" aria-label={strings.cookie_notice}>
|
||||
<p>{strings.cookie_notice}</p>
|
||||
<button data-answer="yes">{strings.cookie_accept}</button>
|
||||
@@ -394,6 +462,7 @@ const hasForm = pageId === "for-founders" || pageId === "for-innovation-hubs";
|
||||
}
|
||||
|
||||
.cards { margin-top: 2rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
|
||||
.cards-section > h2 { margin-top: 2.5rem; }
|
||||
.card {
|
||||
background: #fff;
|
||||
border: 1px solid var(--line);
|
||||
@@ -403,8 +472,27 @@ const hasForm = pageId === "for-founders" || pageId === "for-innovation-hubs";
|
||||
}
|
||||
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
|
||||
.card h2, .card h3 { margin: 0 0 0.5rem; }
|
||||
.card-link {
|
||||
display: inline-block;
|
||||
margin-top: 0.7rem;
|
||||
font-size: 0.92rem;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
}
|
||||
.card-link:hover { text-decoration: underline; }
|
||||
|
||||
.cap-list { grid-template-columns: 1fr; gap: 0.6rem; }
|
||||
.pilot-banner {
|
||||
margin: 1.6rem 0 0;
|
||||
padding: 0.9rem 1.2rem;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
border-radius: 0.55rem;
|
||||
}
|
||||
.pilot-banner p { margin: 0.2rem 0 0; font-size: 0.95rem; }
|
||||
.pilot-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; }
|
||||
.pricing-note { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }
|
||||
|
||||
.cap-list, .price-list { grid-template-columns: 1fr; gap: 0.6rem; }
|
||||
.card.cap {
|
||||
display: flex;
|
||||
gap: 0.8rem;
|
||||
|
||||
Reference in new issue
Block a user