Skip to content

Commit

Permalink
add stories
Browse files Browse the repository at this point in the history
  • Loading branch information
brendan-defi committed Feb 11, 2025
1 parent e463f96 commit 09fd67a
Show file tree
Hide file tree
Showing 8 changed files with 161 additions and 17 deletions.
21 changes: 4 additions & 17 deletions apps/web/app/(base-org)/developers/stories/page.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
import AnalyticsProvider from 'apps/web/contexts/Analytics';
import Container from 'apps/web/src/components/base-org/Container';
import Title from 'apps/web/src/components/base-org/typography/Title';
import { TitleLevel } from 'apps/web/src/components/base-org/typography/Title/types';
import baseGlobe from 'apps/web/app/(base-org)/developers/stories/assets/base_globe.webp';
import Image, { StaticImageData } from 'next/image';
import { Hero } from 'apps/web/src/components/Developers/Stories/Hero';
import { StoryCards } from 'apps/web/src/components/Developers/Stories/StoryCards';

export default function Stories() {
return (
<AnalyticsProvider context="stories">
<Container className="!px-[1.5rem] lg:!px-[2rem]">
<main className="mb-32 flex min-h-screen w-full flex-col items-center bg-black pt-20">
<div className="relative w-full">
<Image
src={baseGlobe as StaticImageData}
alt="Base Globe"
className="absolute right-[-110px] top-0"
/>
<div className="mt-32 flex w-full flex-col items-start justify-center">
<Title level={TitleLevel.Display3}>Builder Stories</Title>
<Title level={TitleLevel.Title3} className="max-w-[575px] text-gray-50">
Inspirational stories of builders and the new internet they're building on Base.
</Title>
</div>
</div>
<Hero />
<StoryCards />
</main>
</Container>
</AnalyticsProvider>
Expand Down
22 changes: 22 additions & 0 deletions apps/web/src/components/Developers/Stories/Hero/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Title from 'apps/web/src/components/base-org/typography/Title';
import { TitleLevel } from 'apps/web/src/components/base-org/typography/Title/types';
import baseGlobe from 'apps/web/app/(base-org)/developers/stories/assets/base_globe.webp';
import Image, { StaticImageData } from 'next/image';

export function Hero() {
return (
<div className="relative w-full">
<Image
src={baseGlobe as StaticImageData}
alt="Base Globe"
className="absolute right-[-110px] top-0 hidden md:block"
/>
<div className="my-32 flex w-full flex-col items-start justify-center">
<Title level={TitleLevel.Display3}>Builder Stories</Title>
<Title level={TitleLevel.Title3} className="max-w-[575px] text-gray-50">
Inspirational stories of builders and the new internet they're building on Base.
</Title>
</div>
</div>
);
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
119 changes: 119 additions & 0 deletions apps/web/src/components/Developers/Stories/StoryCards/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
import Image, { StaticImageData } from 'next/image';
import mtsumi from 'apps/web/src/components/Developers/Stories/StoryCards/assets/mtsumi.webp';
import nguyen from 'apps/web/src/components/Developers/Stories/StoryCards/assets/nguyen.webp';
import kinya from 'apps/web/src/components/Developers/Stories/StoryCards/assets/kinya.webp';
import ivog from 'apps/web/src/components/Developers/Stories/StoryCards/assets/ivog.webp';
import Title from 'apps/web/src/components/base-org/typography/Title';
import { TitleLevel } from 'apps/web/src/components/base-org/typography/Title/types';
import { Icon } from 'apps/web/src/components/Icon/Icon';
import { ButtonWithLinkAndEventLogging } from 'apps/web/src/components/Button/ButtonWithLinkAndEventLogging';
import { ButtonVariants } from 'apps/web/src/components/base-org/Button/types';
import classNames from 'classnames';

export function StoryCards() {
return (
<div className="z-1 flex flex-col gap-9 md:gap-[72px]">
<StoryCard
title="Aly Mtsumi of Element Pay"
description="Enabling users to buy stablecoins through m-pesa and spend them."
location="Nairobi, Kenya"
date="January 11, 2025"
href=""
color="text-dark-green-60"
image={mtsumi}
/>
<StoryCard
title="Ngan Nguyen of Onchain Buster"
description="A persona builder that analyzes user preferences from their past onchain activities."
location="Ho Chi Minh City, Vietnam"
date="January 11, 2025"
href=""
color="text-dark-pink-60"
image={nguyen}
/>
<StoryCard
title="Christine Kinya of PayFlip"
description="Unlocking new markets for merchants in Kenya with stablecoin payments."
location="Nairobi, Kenya"
date="January 11, 2025"
href=""
color="text-dark-orange-70"
image={kinya}
/>
<StoryCard
title="Ivo G of Allora Finance"
description="Something about Allora Finance"
location="Lier, Norway"
date="January 11, 2025"
href=""
color="text-dark-yellow-80"
image={ivog}
/>
</div>
);
}

function StoryCard({
title,
description,
location,
date,
href,
color,
image,
}: {
title: string;
description: string;
location: string;
date: string;
href: string;
color: string;
image: StaticImageData;
}) {
return (
<div className="z-1 flex w-full flex-col gap-6">
<Image src={image} alt={title} />
<div className="flex flex-col gap-4">
<div className="hidden flex-col gap-2 md:flex">
<Title level={TitleLevel.Title1}>{title}</Title>
<Title level={TitleLevel.Title2} className="text-dark-palette-foregroundMuted">
{description}
</Title>
</div>
<div className="flex flex-col gap-2 md:hidden">
<Title level={TitleLevel.Title3}>{title}</Title>
<Title level={TitleLevel.Title4} className="text-dark-palette-foregroundMuted">
{description}
</Title>
</div>
<div className="flex flex-row gap-2">
<div className={classNames(color, 'hidden md:block')}>
<Icon name="locationPin" color="currentColor" />
</div>
<div className={classNames(color, 'md:hidden')}>
<Icon name="locationPin" color="currentColor" width={20} height={20} />
</div>
<Title level={TitleLevel.Headline} className={color}>
{location}
</Title>
<Title level={TitleLevel.Headline} className="text-dark-palette-foregroundMuted">
{date}
</Title>
</div>
<ButtonWithLinkAndEventLogging
variant={ButtonVariants.SecondaryOutline}
buttonClassNames="flex items-center justify-between px-4 py-3 group"
href={href}
eventName={`developers_stories_${title.replace(/\s+/g, '-').toLowerCase()}`}
>
<div className="flex items-center gap-4">
<span>Read</span>
<div className="transition-transform duration-200 group-hover:translate-x-1">
<Icon name="arrowRight" width={20} height={20} color="white" />
</div>
</div>
</ButtonWithLinkAndEventLogging>
</div>
</div>
);
}
16 changes: 16 additions & 0 deletions apps/web/src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,22 @@ const ICONS: Record<string, (props: SvgProps) => JSX.Element> = {
<path d="M0.988292 12.9951H14.9883V11.3951H0.988292V12.9951Z" fill={color} />
</svg>
),
locationPin: ({ color, width, height }: SvgProps) => (
<svg
width={width}
height={height}
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M11.54 22.351L11.61 22.391L11.638 22.407C11.749 22.467 11.8733 22.4985 11.9995 22.4985C12.1257 22.4985 12.25 22.467 12.361 22.407L12.389 22.392L12.46 22.351C12.8511 22.1191 13.2328 21.8716 13.604 21.609C14.5651 20.9305 15.463 20.1667 16.287 19.327C18.231 17.337 20.25 14.347 20.25 10.5C20.25 8.31196 19.3808 6.21354 17.8336 4.66637C16.2865 3.11919 14.188 2.25 12 2.25C9.81196 2.25 7.71354 3.11919 6.16637 4.66637C4.61919 6.21354 3.75 8.31196 3.75 10.5C3.75 14.346 5.77 17.337 7.713 19.327C8.53664 20.1667 9.43427 20.9304 10.395 21.609C10.7666 21.8716 11.1485 22.1191 11.54 22.351ZM12 13.5C12.7956 13.5 13.5587 13.1839 14.1213 12.6213C14.6839 12.0587 15 11.2956 15 10.5C15 9.70435 14.6839 8.94129 14.1213 8.37868C13.5587 7.81607 12.7956 7.5 12 7.5C11.2044 7.5 10.4413 7.81607 9.87868 8.37868C9.31607 8.94129 9 9.70435 9 10.5C9 11.2956 9.31607 12.0587 9.87868 12.6213C10.4413 13.1839 11.2044 13.5 12 13.5Z"
fill={color}
/>
</svg>
),
};

export function Icon({ name, color = 'white', width = '24', height = '24' }: IconProps) {
Expand Down

0 comments on commit 09fd67a

Please sign in to comment.