feat: compose the portfolio journey layer

This commit is contained in:
2026-09-02 16:21:13 +03:00
parent 7e48aad6a8
commit 8c17af22a0
26 changed files with 962 additions and 368 deletions

View File

@@ -213,10 +213,19 @@ const assertSemanticHtml = (html, inputs, contract) => {
}
for (const section of sections) {
const label = inputs.content.navigation.find((item) => item.id === section.id)?.label;
if (section.id === 'start') {
const heroHeadings = [...section.querySelectorAll(':scope h1')]
.filter((node) => isVisibleSemanticNode(node, appRoot));
if (heroHeadings.length !== 1 || heroHeadings[0].id !== 'start-heading' ||
heroHeadings[0].textContent !== inputs.content.identity.name) {
throw new Error('Missing visible hero heading: start');
}
continue;
}
const headings = [...section.querySelectorAll(':scope > h2')]
.filter((node) => isVisibleSemanticNode(node, appRoot));
if (label === undefined || headings.length !== 1 || headings[0].id !== `${section.id}-heading` ||
headings[0].textContent !== label.toUpperCase()) {
headings[0].textContent !== label) {
throw new Error(`Missing visible section heading: ${section.id}`);
}
}
@@ -235,7 +244,7 @@ const assertSemanticHtml = (html, inputs, contract) => {
}
const mailLinks = [...appRoot.querySelectorAll(`a[href="mailto:${inputs.content.contact.email}"]`)]
.filter((node) => isVisibleSemanticNode(node, appRoot));
if (mailLinks.length !== 1 || mailLinks[0].textContent !== inputs.content.contact.email) {
if (mailLinks.length !== 1 || mailLinks[0].textContent !== 'Start a conversation') {
throw new Error('Missing visible semantic mailto contact link.');
}