Skip to content

Commit

Permalink
SOEOPSFY24-351 | update timeline top banner
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahongsf committed Nov 22, 2024
1 parent 45234b5 commit 2e24212
Show file tree
Hide file tree
Showing 17 changed files with 56 additions and 25 deletions.
21 changes: 18 additions & 3 deletions app/timeline/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
import { Container } from "@/components/Container";
import { Masthead } from "@/components/Masthead";
import { PageTitle } from "@/components/PageTitle";
import TimelineOverview from "@/components/Timeline/TimelineOverview";
import { Heading, Text } from "@/components/Typography";
import { loadTimelineData } from "@/utilities/loadTimelineData";

const TimelinePage = async () => {
const timelineData = await loadTimelineData();
return (
<div>
<Masthead isLight />
<PageTitle heading="100 years of" bigText="Impact" />
<Masthead isLight isOverlap={false} bgColor="fog-light" />
<Container as="section" bgColor="fog-light" width="site" py={8}>
<Heading leading="tight" size={6} className="flex flex-col">
<span className="underline underline-offset-[14px] decoration-4">
100 years
</span>
<span>of impact</span>
</Heading>
<Text className="max-w-800">
In the ten decades since its founding, the School of Engineering has
produced fundamental work in science and transformational
breakthroughs that have changed lives and shaped human society.
Experience the impact we’ve made through time in each of the events
you can interact with here.
</Text>
</Container>
<TimelineOverview timelineData={timelineData} />
</div>
);
Expand Down
8 changes: 8 additions & 0 deletions components/Masthead/Masthead.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,11 @@ export const flexbox = "gap-x-12 sm:gap-x-20 md:gap-x-30";
// We use the group-has- TW selector to make the Giving link white when the main nav is open
export const cta =
'relative z-[300] group-has-[nav[data-headlessui-state="open"]]:text-white group-has-[nav[data-headlessui-state="open"]]:decoration-white';

export const bgColors = {
black: "bg-black text-white",
white: "bg-white text-black",
"fog-light": "bg-fog-light text-black",
};

export type BgColorType = keyof typeof bgColors | "";
12 changes: 10 additions & 2 deletions components/Masthead/Masthead.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
import { HTMLAttributes } from "react";
import { cnb } from "cnbuilder";
import { FlexBox } from "@/components/FlexBox";
// import { LogoLockup } from "@/components/Logo/LogoLockup";
import { Skiplink } from "@/components/SkipLink";
import * as styles from "./Masthead.styles";
import { EngLogoLockup } from "../Logo/EngLogoLockup";

type MastheadProps = HTMLAttributes<HTMLDivElement> & {
isLight?: boolean;
isOverlap?: boolean;
bgColor?: styles.BgColorType;
mainNav?: React.ReactNode;
};

export const Masthead = ({
isLight,
isOverlap = true,
bgColor,
mainNav,
className,
...props
}: MastheadProps) => (
<header className={cnb(styles.root(isOverlap), className)} {...props}>
<header
className={cnb(
styles.bgColors[bgColor || "white"],
styles.root(isOverlap),
className,
)}
{...props}
>
<Skiplink />
<FlexBox
justifyContent="between"
Expand Down
2 changes: 1 addition & 1 deletion out/404.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

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/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.

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

Large diffs are not rendered by default.

0 comments on commit 2e24212

Please sign in to comment.