Read Pitch as a profile: stations and stack before the case cards.
The four public cases stay on the page; the timeline no longer follows them. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -161,6 +161,27 @@ describe('page rendering, semantics and accessibility', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('renders pitch as profile, stations, stack, then cases', async () => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
providers: [provideRouter(routes), { provide: SITE_CONTENT, useValue: SITE_CONTENT_DATA }],
|
||||||
|
});
|
||||||
|
|
||||||
|
const harness = await RouterTestingHarness.create();
|
||||||
|
|
||||||
|
for (const path of ['/pitch', '/en/pitch']) {
|
||||||
|
await harness.navigateByUrl(path);
|
||||||
|
const root = harness.routeNativeElement as HTMLElement;
|
||||||
|
const headingIds = [...root.querySelectorAll('h2')].map((heading) => heading.id);
|
||||||
|
expect(headingIds, path).toEqual([
|
||||||
|
'section-profile',
|
||||||
|
'pitch-timeline',
|
||||||
|
'pitch-stack',
|
||||||
|
'section-featured-cases',
|
||||||
|
]);
|
||||||
|
expect(root.querySelectorAll('app-case-card')).toHaveLength(CASE_STUDY_IDS.length);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
it('renders pitch in both locales with a single h1', async () => {
|
it('renders pitch in both locales with a single h1', async () => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
providers: [provideRouter(routes), { provide: SITE_CONTENT, useValue: SITE_CONTENT_DATA }],
|
providers: [provideRouter(routes), { provide: SITE_CONTENT, useValue: SITE_CONTENT_DATA }],
|
||||||
|
|||||||
@@ -2,16 +2,46 @@
|
|||||||
<div class="content-container stack page">
|
<div class="content-container stack page">
|
||||||
<app-page-hero [hero]="copy.hero" [ctas]="copy.ctas" />
|
<app-page-hero [hero]="copy.hero" [ctas]="copy.ctas" />
|
||||||
@for (section of copy.sections; track section.id) {
|
@for (section of copy.sections; track section.id) {
|
||||||
<app-content-section [section]="section" />
|
|
||||||
@if (section.id === 'profile') {
|
@if (section.id === 'profile') {
|
||||||
|
<app-content-section [section]="section" />
|
||||||
<ul class="stack">
|
<ul class="stack">
|
||||||
@for (line of copy.profile; track $index) {
|
@for (line of copy.profile; track $index) {
|
||||||
<li>{{ line }}</li>
|
<li>{{ line }}</li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
<app-metric-list [metrics]="copy.metrics" [labelledBy]="'section-profile'" />
|
<app-metric-list [metrics]="copy.metrics" [labelledBy]="'section-profile'" />
|
||||||
|
<section class="stack" [attr.aria-labelledby]="'pitch-timeline'">
|
||||||
|
<h2 id="pitch-timeline">{{ copy.timelineHeading }}</h2>
|
||||||
|
<ol class="stack">
|
||||||
|
@for (entry of copy.timeline; track entry.id) {
|
||||||
|
<li>
|
||||||
|
<p>
|
||||||
|
<strong>{{ entry.period }}</strong>
|
||||||
|
· {{ entry.role }}
|
||||||
|
</p>
|
||||||
|
<p>{{ entry.body }}</p>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
</ol>
|
||||||
|
</section>
|
||||||
|
<section class="stack" [attr.aria-labelledby]="'pitch-stack'">
|
||||||
|
<h2 id="pitch-stack">{{ copy.stackHeading }}</h2>
|
||||||
|
<ul class="stack">
|
||||||
|
@for (group of copy.coreStack; track group.id) {
|
||||||
|
<li>
|
||||||
|
<p>
|
||||||
|
<strong>{{ group.title }}</strong>
|
||||||
|
@if (group.body) {
|
||||||
|
— {{ group.body }}
|
||||||
|
}
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
}
|
}
|
||||||
@if (section.id === 'featured-cases') {
|
@if (section.id === 'featured-cases') {
|
||||||
|
<app-content-section [section]="section" />
|
||||||
<div class="stack">
|
<div class="stack">
|
||||||
@for (caseStudy of featuredCases(); track caseStudy.id) {
|
@for (caseStudy of featuredCases(); track caseStudy.id) {
|
||||||
<app-case-card [caseStudy]="caseStudy" />
|
<app-case-card [caseStudy]="caseStudy" />
|
||||||
@@ -19,35 +49,6 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<section class="stack" [attr.aria-labelledby]="'pitch-timeline'">
|
|
||||||
<h2 id="pitch-timeline">{{ copy.timelineHeading }}</h2>
|
|
||||||
<ol class="stack">
|
|
||||||
@for (entry of copy.timeline; track entry.id) {
|
|
||||||
<li>
|
|
||||||
<p>
|
|
||||||
<strong>{{ entry.period }}</strong>
|
|
||||||
· {{ entry.role }}
|
|
||||||
</p>
|
|
||||||
<p>{{ entry.body }}</p>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
</ol>
|
|
||||||
</section>
|
|
||||||
<section class="stack" [attr.aria-labelledby]="'pitch-stack'">
|
|
||||||
<h2 id="pitch-stack">{{ copy.stackHeading }}</h2>
|
|
||||||
<ul class="stack">
|
|
||||||
@for (group of copy.coreStack; track group.id) {
|
|
||||||
<li>
|
|
||||||
<p>
|
|
||||||
<strong>{{ group.title }}</strong>
|
|
||||||
@if (group.body) {
|
|
||||||
— {{ group.body }}
|
|
||||||
}
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
<app-cta-row [ctas]="copy.ctas" />
|
<app-cta-row [ctas]="copy.ctas" />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user