Skip to content

Commit

Permalink
SOEOPSFY24-337 | refine feature timeline teaser card
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahongsf committed Nov 22, 2024
1 parent 54862bd commit 429ad64
Show file tree
Hide file tree
Showing 37 changed files with 85 additions and 183 deletions.
6 changes: 6 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@
.timeline-detail {
grid-area: 'detail';
}

.font-inherit {
font: inherit;
font-size: inherit;
line-height: inherit;
}
}
8 changes: 4 additions & 4 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import { Masthead } from "@/components/Masthead";
import { TimelineBanner } from "@/components/TimelineBanner";
import { TimelineCard } from "@/components/Timeline";
import { PageTitle } from "@/components/PageTitle";

export default function Home() {
return (
<div>
<Masthead isLight />
<PageTitle heading="100 years of" bigText="Impact" />
<TimelineBanner
<TimelineCard
heading="The first African-American woman in space"
year="1983"
body="Cras felis tortor, bibendum quis porttitor at, ullamcorper eu diam. Aenean iaculis efficitur quam, quis dignissim lacus. Cras nec dui id mi blandit lobortis eget in enim."
image="https://airandspace.si.edu/sites/default/files/styles/slideshow_basic/public/images/NASA%20166851h.jpg?itok=yL6MTpUr"
width="narrow"
/>
<TimelineBanner
<TimelineCard
heading="First remote classs from the Stanford Instructional Television Network"
year="1969"
body="Cras felis tortor, bibendum quis porttitor at, ullamcorper eu diam. Aenean iaculis efficitur quam, quis dignissim lacus. Cras nec dui id mi blandit lobortis eget in enim."
image="https://images.unsplash.com/photo-1491770042090-0810a7e20f46?q=80&w=1935&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
align="right"
width="narrow"
/>
<TimelineBanner
<TimelineCard
heading="The Stanford Dish Radiotelescope completed in 1962"
year="1983"
body="Enabling vastly expanded studies of scattering effects in the earth’s ionosphere and was used to detect Soviet radar and still used today for satellite calibrations, spacecraft command and telemetry, and radio astronomy measurements."
Expand Down
4 changes: 2 additions & 2 deletions components/Timeline/TimelineImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export const TimelineImage = ({
const trapezoidType = styles.trapezoid[trapezoidAngle];

return (
<div className={cnb("group relative", trapezoidType)}>
<div className={cnb("group relative flex justify-center", trapezoidType)}>
<div
className={cnb(
"aspect-[1/1] relative perspective-600 group-hocus:scale-105 transform ease-in-out duration-1000",
"aspect-[1/1] relative perspective-1000 transform ease-in-out duration-1000",
imageSize,
className,
)}
Expand Down
4 changes: 2 additions & 2 deletions components/Timeline/TimelineItem.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export const size = {
};

export const trapezoid = {
left: "rotate-y-[20deg] hocus:rotate-y-[-20deg]",
right: "rotate-y-[-20deg] hocus:rotate-y-[20deg]",
left: "rotate-y-[15deg] hocus:rotate-y-[-15deg]",
right: "rotate-y-[-15deg] hocus:rotate-y-[15deg]",
};
1 change: 1 addition & 0 deletions components/Timeline/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export * from "./TimelineItem.types";
export * from "./TimelineDetails";
export * from "./TimelineDetails.styles";
export * from "./TimelineSidebar";
export * from "./TimelineCard";
11 changes: 0 additions & 11 deletions components/TimelineBanner/TimelineBanner.styles.ts

This file was deleted.

105 changes: 0 additions & 105 deletions components/TimelineBanner/TimelineBanner.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions components/TimelineBanner/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion components/TimelineSidebar/index.ts

This file was deleted.

16 changes: 15 additions & 1 deletion components/Typography/Heading.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
import { cnb } from "cnbuilder";
import { Text, type TypographyProps } from "./Text";
import * as types from "./typography.types";

type HeadingProps = Omit<TypographyProps, "as"> &
React.HTMLAttributes<HTMLHeadingElement> & {
as?: types.HeadingType;
className?: string;
};

// Convenience component for paragraphs
export const Heading = ({
as = "h2",
weight = "bold",
className,
...rest
}: HeadingProps) => <Text {...rest} weight={weight} as={as} />;
}: HeadingProps) => {
const headingLinkClasses =
"[&_a]:text-stone-dark [&_a]:underline [&_a]:underline-offset-[5px] [&_a]:decoration-digital-red-light [&_a]:cursor-pointer [&_a]:decoration-4";
return (
<Text
{...rest}
weight={weight}
as={as}
className={cnb(headingLinkClasses, className)}
/>
);
};
3 changes: 1 addition & 2 deletions components/Typography/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const Text = ({
<AsComponent
{...rest}
className={cnb(
"rs-mb-2",
font ? styles.fontFamilies[font] : "",
size ? styles.fontSizes[size] : "",
weight ? styles.fontWeights[weight] : "",
Expand All @@ -72,7 +71,7 @@ export const Text = ({
srOnly ? "sr-only" : "",
uppercase ? "uppercase" : "",
useDefaultTracking ? "tracking-normal" : "",
font === "dm-sans" ? "tracking-normal sm:tracking-wide" : "",
font === "serif" ? "tracking-normal sm:tracking-wide" : "",
className,
)}
>
Expand Down
2 changes: 1 addition & 1 deletion out/404.html

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion out/_next/static/chunks/143-d5e7c922eea4f50f.js

This file was deleted.

1 change: 1 addition & 0 deletions out/_next/static/chunks/595-c960df0f7bf72802.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions out/_next/static/chunks/654-b4f59b7c19cd3abc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 429ad64

Please sign in to comment.