-
Notifications
You must be signed in to change notification settings - Fork 0
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
123 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Post } from "lib/types"; | ||
import styles from "styles/components/blog/Post.module.scss"; | ||
|
||
export const PostImage: React.FC<{ post: Post }> = ({ post }) => { | ||
return ( | ||
<div className={styles["post__image-wrapper"]}> | ||
<img | ||
src={post.image} | ||
alt={post.title} | ||
className={styles["post__image"]} | ||
data-action="zoom" | ||
/> | ||
|
||
{post.credit && ( | ||
<small className={styles["post__photo-credit"]}> | ||
Image by {post.credit} | ||
</small> | ||
)} | ||
</div> | ||
); | ||
}; |
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,82 @@ | ||
import { PostImage } from "components/blog/PostImage"; | ||
import { CtaProps } from "components/Cta"; | ||
import { MarkdownContent } from "components/MarkdownContent"; | ||
import { PageHeader } from "components/PageHeader"; | ||
import { PageMeta } from "components/PageMeta"; | ||
import { SiteLayout } from "components/SiteLayout"; | ||
import { formattedTitle } from "lib/metadata"; | ||
import { getPostData, getRandomCta } from "lib/posts"; | ||
import { Post } from "lib/types"; | ||
import { NextPage } from "next"; | ||
import Head from "next/head"; | ||
|
||
const Disclaimer = () => ( | ||
<MarkdownContent | ||
content={`>[!NOTE]\n>This content originally appeared as a [blog post](/blog/2015/04/23/work-sustainably/). We've migrated the content here to make it easier to find, and reaffirm our commitment to this mission even a decade on.`} | ||
/> | ||
); | ||
|
||
export async function getStaticProps() { | ||
const content = await getPostData({ | ||
year: "2015", | ||
month: "04", | ||
day: "23", | ||
slug: "work-sustainably", | ||
}); | ||
|
||
return { | ||
props: { | ||
content, | ||
cta: await getRandomCta(), | ||
}, | ||
}; | ||
} | ||
|
||
const MissionPage: NextPage<{ cta: CtaProps; content: Post }> = ({ | ||
cta, | ||
content, | ||
}) => { | ||
const title = formattedTitle("Our Mission"); | ||
|
||
return ( | ||
<> | ||
<Head> | ||
<title>{title}</title> | ||
<PageMeta | ||
title={title} | ||
description="Our mission: work sustainably. Build cool things with interesting people, but always, always, find time to live life." | ||
/> | ||
</Head> | ||
|
||
<SiteLayout contained cta={cta}> | ||
<div className="stack gap-lg"> | ||
<article> | ||
<PageHeader | ||
title="Our Mission" | ||
subtitle={ | ||
<> | ||
Work <s>hard</s>{" "} | ||
<span className="text-primary">sustainably</span>. | ||
</> | ||
} | ||
/> | ||
|
||
<div className="stack gap-lg"> | ||
<PostImage post={content} /> | ||
|
||
<section className="typography"> | ||
<MarkdownContent content={content.contentHtml} /> | ||
</section> | ||
</div> | ||
</article> | ||
|
||
<hr className="divider" /> | ||
|
||
<Disclaimer /> | ||
</div> | ||
</SiteLayout> | ||
</> | ||
); | ||
}; | ||
|
||
export default MissionPage; |
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 |
---|---|---|
|
@@ -237,4 +237,8 @@ | |
max-width: 80%; | ||
margin: 0 auto; | ||
} | ||
|
||
#footnote-label { | ||
font-size: var(--font_size_lg); | ||
} | ||
} |
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