Skip to content

Commit 2700faf

Browse files
committed
feat(home): fix learn-more grid, link About to flexion.us, remove /about/
Three review fixes rolled into one: - The Learn more grid defined itself as a `container-type: inline-size` container, so the nested `@container (min-width: 48rem)` column rule could never match against its own container. Swap to a media query at 48rem so the two teasers lay out horizontally on desktop. - The "Learn about Flexion" teaser now links to https://flexion.us/ instead of the local /about/ page. - Remove the /about/ page entirely: delete content/about.md and src/pages/about.tsx, drop the route from allRoutes, drop About from header and footer nav, and update smoke, a11y, home, and routes tests to match.
1 parent 3a0bb15 commit 2700faf

13 files changed

Lines changed: 9 additions & 42 deletions

File tree

content/about.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/views/home.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Purpose
44

5-
First impression for every visitor. Introduces Flexion Labs with a hero, showcases the three Flexion Solutions offerings as featured labs, and hands visitors off to the commitment and about pages.
5+
First impression for every visitor. Introduces Flexion Labs with a hero, showcases the three Flexion Solutions offerings as featured labs, and hands visitors off to the commitment page and to flexion.us.
66

77
## Inputs
88

@@ -14,7 +14,7 @@ First impression for every visitor. Introduces Flexion Labs with a hero, showcas
1414

1515
- **When the page loads, then** the hero renders the `title` as `<h1>`, the `subtitle` as a tagline paragraph, and the rendered `intro` HTML as the intro block.
1616
- **When there are featured labs, then** one `LabCard` is rendered per lab in `order` ascending.
17-
- **When the page loads, then** a "Learn more" section renders two teasers linking to `/commitment/` and `/about/` respectively.
17+
- **When the page loads, then** a "Learn more" section renders two side-by-side teasers — one linking to `/commitment/`, one linking to `https://flexion.us/`. The grid collapses to a single column below 48rem.
1818
- **The stats strip is not rendered.** The catalog directory is disabled in this pass.
1919

2020
## Fallbacks

src/build/entry.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { WorkIndex } from '../pages/work/index'
1111
import { WorkDetail } from '../pages/work/detail'
1212
import { Health } from '../pages/work/health'
1313
import { Commitment } from '../pages/commitment'
14-
import { About } from '../pages/about'
1514
import { DesignSystem } from '../pages/design-system'
1615
import { SHOW_PER_REPO_FAILURES } from '../catalog/repo-checks'
1716

@@ -41,7 +40,6 @@ export async function buildSite(options: BuildOptions): Promise<void> {
4140
const commitmentBody = await loadContentBody(
4241
join(rootDir, 'content', 'commitment.md'),
4342
)
44-
const aboutBody = await loadContentBody(join(rootDir, 'content', 'about.md'))
4543

4644
const routes = allRoutes(catalog)
4745

@@ -52,7 +50,6 @@ export async function buildSite(options: BuildOptions): Promise<void> {
5250
hero,
5351
featured,
5452
commitmentBody,
55-
aboutBody,
5653
config,
5754
now,
5855
)
@@ -87,7 +84,6 @@ async function render(
8784
hero: Awaited<ReturnType<typeof loadHero>>,
8885
featured: Awaited<ReturnType<typeof loadFeatured>>,
8986
commitmentBody: string,
90-
aboutBody: string,
9187
config: { basePath: string; buildTime: string },
9288
now: Date,
9389
): Promise<string> {
@@ -107,8 +103,6 @@ async function render(
107103
)
108104
case 'commitment':
109105
return renderToHtml(<Commitment body={commitmentBody} config={config} />)
110-
case 'about':
111-
return renderToHtml(<About body={aboutBody} config={config} />)
112106
case 'design-system':
113107
return renderToHtml(<DesignSystem config={config} />)
114108
case 'work-detail': {

src/build/routes.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Catalog } from '../catalog/types'
22

33
export type Route = {
44
path: string // always starts with "/" and ends with "/"
5-
view: 'home' | 'work-index' | 'work-detail' | 'health' | 'commitment' | 'about' | 'design-system'
5+
view: 'home' | 'work-index' | 'work-detail' | 'health' | 'commitment' | 'design-system'
66
slug?: string
77
}
88

@@ -16,7 +16,6 @@ export function allRoutes(catalog: Catalog): Route[] {
1616
// { path: '/work/', view: 'work-index' },
1717
// { path: '/work/health/', view: 'health' },
1818
{ path: '/commitment/', view: 'commitment' },
19-
{ path: '/about/', view: 'about' },
2019
{ path: '/design-system/', view: 'design-system' },
2120
]
2221
// for (const entry of catalog) {

src/design/components/footer/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export function Footer({ config }: { config: SiteConfig }) {
88
<ul>
99
<li><a href={url('/', config.basePath)}>Home</a></li>
1010
<li><a href={url('/commitment/', config.basePath)}>Commitment</a></li>
11-
<li><a href={url('/about/', config.basePath)}>About</a></li>
1211
<li><a href={url('/design-system/', config.basePath)}>Design system</a></li>
1312
</ul>
1413
</nav>

src/design/components/header/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ export function Header({ config }: { config: SiteConfig }) {
3434
<li>
3535
<a href={url('/commitment/', config.basePath)}>Commitment</a>
3636
</li>
37-
<li>
38-
<a href={url('/about/', config.basePath)}>About</a>
39-
</li>
4037
<li>
4138
<Link href="https://github.com/flexion" external>
4239
GitHub

src/design/layout.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
.home-learn-more__grid {
9090
display: grid;
9191
gap: var(--space-5);
92-
container-type: inline-size;
9392
margin-block-start: var(--space-4);
9493
}
9594
.home-learn-more__item {
@@ -102,14 +101,16 @@
102101
font-size: var(--step-1);
103102
margin-block-end: var(--space-2);
104103
}
104+
@media (min-width: 48rem) {
105+
.home-learn-more__grid { grid-template-columns: repeat(2, 1fr); }
106+
}
105107
.work-index__featured-grid {
106108
display: grid;
107109
gap: var(--space-5);
108110
container-type: inline-size;
109111
}
110112
@container (min-width: 48rem) {
111113
.work-index__featured-grid { grid-template-columns: repeat(2, 1fr); }
112-
.home-learn-more__grid { grid-template-columns: repeat(2, 1fr); }
113114
}
114115
@container (min-width: 72rem) {
115116
.work-index__list { grid-template-columns: repeat(3, 1fr); }

src/pages/about.tsx

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/pages/home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function Home({
6161
<h3>About Flexion</h3>
6262
<p>{hero.learnMore.about}</p>
6363
<p>
64-
<a href={url('/about/', config.basePath)}>Learn about Flexion &rarr;</a>
64+
<a href="https://flexion.us/" rel="noopener external">Learn about Flexion &rarr;</a>
6565
</p>
6666
</article>
6767
</div>

tests/a11y/pages.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const DIST = join(process.cwd(), 'dist')
88
const pages = [
99
'index.html',
1010
'commitment/index.html',
11-
'about/index.html',
1211
'design-system/index.html',
1312
]
1413

0 commit comments

Comments
 (0)