Skip to content

Commit

Permalink
SOEOPSFY24-357 | add feature story layout
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahongsf committed Nov 27, 2024
1 parent a0b71e6 commit 6eeb118
Show file tree
Hide file tree
Showing 26 changed files with 102 additions and 38 deletions.
41 changes: 39 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import { Masthead } from "@/components/Masthead";
import { TimelineCard } from "@/components/Timeline";
import { PageTitle } from "@/components/PageTitle";
import { TimelineFeature } from "@/components/Timeline/TimelineFeature";
import { ThreeCol } from "@/components/Layout";
import { StoryCard } from "@/components/StoryCard";
import { ThreeCol, TwoCol } from "@/components/Layout";
import { StoryCard } from "@/components/Story";
import { Container } from "@/components/Container";
import { StoryFeature } from "@/components/Story/StoryFeature";
import { Heading } from "@/components/Typography";

export default function Home() {
return (
Expand Down Expand Up @@ -70,6 +72,41 @@ export default function Home() {
href="/"
/>
</ThreeCol>
<StoryFeature>
<TwoCol className="rs-mb-8 items-center">
<Heading size={5} weight="normal" className="rs-mr-8">
Fundamental work in science and transformational breakthroughs for
one hundred years.
</Heading>
<StoryCard
superhead="Impact"
heading="Lorem ipsum dolor sit amet consect hendrerit"
imageUrl="https://placecats.com/neo_banana/300/200"
href="/"
className="max-w-full"
/>
</TwoCol>
<ThreeCol>
<StoryCard
superhead="Innovation"
heading="The Foundation of a New Era in Engineering"
imageUrl="https://placecats.com/neo_banana/300/200"
href="/"
/>
<StoryCard
superhead="1975 - 1984"
heading="Computation, outer space, the nanoscale, and the fragility of planet Earth"
imageUrl="https://placecats.com/neo_banana/300/200"
href="/"
/>
<StoryCard
superhead="1985 - 1994"
heading="Mae Jemison: “We each get a chance to choose our own path”"
imageUrl="https://placecats.com/neo_banana/300/200"
href="/"
/>
</ThreeCol>
</StoryFeature>
</div>
);
}
6 changes: 5 additions & 1 deletion components/ContributeStoryBanner/ContributeStoryBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ export const ContributeStoryBanner = ({
your stories
</span>
</Heading>
<Text mb="none" className="order-first font-dm-mono mb-1 mt-50">
<Text
mb="none"
font="dm-mono"
className="order-first font-dm-mono mb-1 mt-50"
>
Get involved
</Text>
<Text mb="none">
Expand Down
2 changes: 1 addition & 1 deletion components/Layout/ThreeCol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const ThreeCol = ({ children, className, ...props }: ColProps) => {
return (
<Container
{...props}
className={cnb("grid grid-cols-1 md:grid-cols-3 gap-50", className)}
className={cnb("grid grid-cols-1 lg:grid-cols-3 gap-50", className)}
>
{children}
</Container>
Expand Down
2 changes: 1 addition & 1 deletion components/Layout/TwoCol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const TwoCol = ({
className={cnb(
"flex flex-col w-full max-w-full lg:flex-row gap-20",
{
"lg:*:max-w-1/2": !isSidebar,
"lg:*:w-1/2": !isSidebar,
"lg:first:max-w-2/3 lg:last:max-w-1/3": isSidebar,
},
className,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as styles from "@/components/Container/Container.styles";
type StoryCardProps = HTMLAttributes<HTMLDivElement> & {
heading: string;
superhead?: string;
body: string;
body?: string;
href: string;
headerTag?: "h2" | "h3";
isHeadingLarge?: boolean;
Expand Down Expand Up @@ -40,7 +40,7 @@ export const StoryCard = ({
<CardWrapper
{...props}
className={cnb(
"overflow-hidden rs-mb-5 w-full rounded-[25px] shadow-lg lg:mb-0 lg:max-w-[920px] xl:max-w-[980px] stretched-link transition duration-500 hocus:shadow-2xl",
"overflow-hidden rs-mb-5 w-full h-fit rounded-[25px] shadow-lg lg:mb-0 lg:max-w-[920px] xl:max-w-[980px] stretched-link transition duration-500 hocus:shadow-2xl",
{ "flex flex-col md:flex-row items-center": isHorizontal },
bgColor && styles.bgColors[bgColor],
className,
Expand Down Expand Up @@ -71,9 +71,11 @@ export const StoryCard = ({
{superhead}
</Text>
)}
<Text size="base" mb="none" className="rs-mt-neg1">
{body}
</Text>
{body && (
<Text size="base" mb="none" className="rs-mt-neg1">
{body}
</Text>
)}
</div>
</CardWrapper>
);
Expand Down
21 changes: 21 additions & 0 deletions components/Story/StoryFeature.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React, { HTMLAttributes } from "react";
import { Container } from "@/components/Container";

type StoryFeatureProps = HTMLAttributes<HTMLDivElement> & {
children: React.ReactNode;
};

export const StoryFeature = ({ children, ...props }: StoryFeatureProps) => {
return (
<Container {...props} width="full" className="rs-px-1" py={8} mb={9}>
<Container
width="site"
py={8}
bgColor="blue"
className="rounded-[25px] flex flex-col rs-px-9"
>
{children}
</Container>
</Container>
);
};
File renamed without changes.
2 changes: 1 addition & 1 deletion out/404.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions out/_next/static/css/95736a72d5c98f32.css

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions out/_next/static/css/ad54d1fd9c4ee078.css

This file was deleted.

2 changes: 1 addition & 1 deletion out/example.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions out/example.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion out/example/quote.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions out/example/quote.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion out/example/story.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions out/example/story.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion out/example/story/hero.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions out/example/story/hero.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion out/example/textarea.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions out/example/textarea.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion out/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions out/index.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion out/timeline.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions out/timeline.txt

Large diffs are not rendered by default.

0 comments on commit 6eeb118

Please sign in to comment.