-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
152 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
.about-header { | ||
color: $blue-60; | ||
} | ||
|
||
.about-nav { | ||
border-bottom: 1px solid $blue-20; | ||
} | ||
|
||
.about-nav-list { | ||
display: flex; | ||
gap: 8px; | ||
list-style: none; | ||
padding: 0; | ||
|
||
h2 { | ||
margin: 0; | ||
} | ||
} | ||
|
||
.about-nav-link { | ||
@include body-2-regular; | ||
display: block; | ||
padding: 16px; | ||
color: $blue-60; | ||
text-wrap: nowrap; | ||
|
||
&--is-active { | ||
@include body-2-semibold; | ||
color: $blue-90; | ||
border-bottom: 1px solid $vermillion; | ||
} | ||
|
||
&:hover { | ||
color: $blue-90; | ||
} | ||
} | ||
|
||
.about-body { | ||
margin-bottom: 80px; | ||
|
||
h2 { | ||
@include h1-semibold; | ||
color: $blue-60; | ||
} | ||
|
||
h2:first-of-type { | ||
margin-top: 32px; | ||
} | ||
|
||
hr { | ||
margin: 40px 0; | ||
} | ||
|
||
// Remove some margins since margins don't collapse in display: grid. | ||
.article-block__side-by-side { | ||
margin: 0; | ||
} | ||
|
||
hr + .article-block__side-by-side { | ||
h2 { | ||
margin-top: 0; | ||
} | ||
|
||
*:last-child { | ||
margin-bottom: 0; | ||
} | ||
} | ||
|
||
.article-block__side-by-side:has(+ hr) { | ||
*:last-child { | ||
margin-bottom: 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import cx from "classnames" | ||
import * as React from "react" | ||
|
||
import { OwidGdocAboutInterface } from "@ourworldindata/types" | ||
import { ArticleBlocks } from "../components/ArticleBlocks.js" | ||
|
||
const NAV_LINKS = [ | ||
{ title: "About Us", href: "/about" }, | ||
{ title: "Organization", href: "/organization" }, | ||
{ title: "Funding", href: "/funding" }, | ||
{ title: "Team", href: "/team" }, | ||
{ title: "Jobs", href: "/jobs" }, | ||
{ title: "FAQs", href: "/faqs" }, | ||
] | ||
|
||
export default function AboutPage({ content, slug }: OwidGdocAboutInterface) { | ||
return ( | ||
<main className="grid grid-cols-12-full-width"> | ||
<h1 className="about-header col-start-2 col-end-limit display-2-semibold"> | ||
About | ||
</h1> | ||
<AboutNav slug={slug} /> | ||
<div className="about-body col-start-2 span-cols-12"> | ||
<ArticleBlocks blocks={content.body} /> | ||
</div> | ||
</main> | ||
) | ||
} | ||
|
||
function AboutNav({ slug }: { slug: string }) { | ||
return ( | ||
<nav className="about-nav grid grid-cols-12-full-width col-start-1 col-end-limit"> | ||
<ul className="about-nav-list col-start-2"> | ||
{NAV_LINKS.map(({ title, href }) => ( | ||
<li key={href}> | ||
<h2> | ||
<a | ||
className={cx("about-nav-link", { | ||
"about-nav-link--is-active": | ||
href === `/${slug}`, | ||
})} | ||
href={href} | ||
> | ||
{title} | ||
</a> | ||
</h2> | ||
</li> | ||
))} | ||
</ul> | ||
</nav> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters