Skip to content

Commit ab0b1ab

Browse files
committed
Add the view all buttons
1 parent d6993ee commit ab0b1ab

9 files changed

Lines changed: 108 additions & 16 deletions

File tree

apps/web/public/locales/en/common.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3382,7 +3382,8 @@
33823382
},
33833383
"events": {
33843384
"title": "Meet Solana IRL. <light>Build connections.</light>",
3385-
"subtitle": ""
3385+
"subtitle": "",
3386+
"cta": "View all"
33863387
},
33873388
"performance": {
33883389
"title": "The fastest growing & <light>leading financial platform</light>",
@@ -3435,7 +3436,8 @@
34353436
"name": "Pump Science",
34363437
"stat": "$1.5B",
34373438
"statLabel": "Trading volume"
3438-
}
3439+
},
3440+
"cta": "View all"
34393441
},
34403442
"news": {
34413443
"title": "Keep up with <light>the latest on Solana</light>",
@@ -3478,7 +3480,9 @@
34783480
]
34793481
},
34803482
"whats-up": {
3481-
"title": "What’s happening <light>right now</light>"
3483+
"title": "What’s happening <light>right now</light>",
3484+
"cta": "View all"
3485+
34823486
}
34833487
},
34843488
"terminal": {

apps/web/src/app/components/ui/button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ const buttonVariants = cva(
2424
"hover:bg-zinc-100 hover:text-zinc-900 dark:hover:bg-zinc-800 dark:hover:text-zinc-50",
2525
link: "text-zinc-900 underline-offset-4 hover:underline dark:text-zinc-50",
2626
"secondary-outline":
27-
"border-[1px] border-nd-border-prominent bg-transparent hover:bg-nd-border-prominent dark:border-zinc-800 dark:bg-zinc-950 dark:hover:bg-zinc-800 dark:hover:text-zinc-50",
27+
"border-[1px] border-nd-border-prominent not-hover:bg-transparent hover:bg-nd-border-prominent",
2828
},
2929
size: {
3030
default: "h-10 px-twd-4 py-twd-2",
3131
sm: "h-9 px-twd-3",
32-
lg: "h-11 px-twd-8",
32+
lg: "h-11 px-twd-6",
3333
icon: "h-10 w-10",
3434
},
3535
},

apps/web/src/component-library/card-cariusel-section.tsx

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useRef } from "react";
33
import { cn } from "@/app/components/utils";
44
import { Container } from "./container";
55
import { useMediaQuery } from "@/hooks/useMediaQuery";
6+
import { Button } from "@/app/components/ui/button";
67

78
export type CardCariuselSectionProps = {
89
className?: string;
@@ -17,6 +18,8 @@ export type CardCariuselSectionProps = {
1718
tabletLastPageOffset?: number;
1819
mobileLastPageOffset?: number;
1920
startIndex?: number;
21+
cta?: React.ReactNode;
22+
ctaHref?: string;
2023
};
2124

2225
export const CardCariuselSection: React.FC<CardCariuselSectionProps> = ({
@@ -32,6 +35,8 @@ export const CardCariuselSection: React.FC<CardCariuselSectionProps> = ({
3235
tabletLastPageOffset = 1,
3336
mobileLastPageOffset = 1,
3437
startIndex,
38+
cta,
39+
ctaHref,
3540
}) => {
3641
const carouselRef = useRef(null);
3742
const isTablet = useMediaQuery("(min-width: 768px)");
@@ -52,7 +57,7 @@ export const CardCariuselSection: React.FC<CardCariuselSectionProps> = ({
5257
wrapperClassName,
5358
)}
5459
>
55-
<Container className="mb-twd-8 xl:mb-twd-12 flex flex-col xl:flex-row xl:items-end xl:justify-between gap-twd-4">
60+
<Container className="mb-twd-8 xl:mb-twd-12 flex flex-col md:flex-row md:items-end md:justify-between gap-twd-4">
5661
{(title || subtitle) && (
5762
// Title and subtitle
5863
<div className="max-w-xl">
@@ -64,10 +69,34 @@ export const CardCariuselSection: React.FC<CardCariuselSectionProps> = ({
6469
)}
6570
</div>
6671
)}
67-
{totalItems > 1 ? (
68-
// Carousel controls
69-
<div className="hidden xl:inline-flex">
70-
<CarouselControls carouselRef={carouselRef} />
72+
{totalItems > 1 || cta ? (
73+
<div className="flex gap-twd-3 items-center">
74+
{/** CTA */}
75+
{cta && (
76+
<Button
77+
className="h-12 w-auto nd-body-m"
78+
asChild
79+
variant="secondary-outline"
80+
size="lg"
81+
rounded
82+
>
83+
<a
84+
className="text-inherit"
85+
href={ctaHref}
86+
target="_blank"
87+
rel="noopener noreferrer"
88+
>
89+
{cta}
90+
</a>
91+
</Button>
92+
)}
93+
94+
{/* Carousel controls */}
95+
{totalItems > 1 ? (
96+
<div className="hidden xl:inline-flex">
97+
<CarouselControls carouselRef={carouselRef} />
98+
</div>
99+
) : null}
71100
</div>
72101
) : null}
73102
</Container>

apps/web/src/component-library/carousel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ type CarouselProps = {
7272
};
7373

7474
const NAV_BUTTON_BASE_CLASS =
75-
"rounded-full w-12 h-12 p-twd-1 border-[1px] border-[rgba(240,228,255,0.20)] transition flex items-center justify-center bg-black hover:bg-black/80";
75+
"rounded-full w-12 h-12 p-twd-1 border-[1px] border-nd-border-prominent transition flex items-center justify-center not-hover:bg-black hover:bg-nd-border-prominent";
7676

7777
// Reusable CarouselNavButton component
7878
type CarouselNavButtonProps = {

apps/web/src/components/index/hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const Hero: React.FC<HeroProps> = ({
5656
<h1 className="nd-heading-2xl" id="hero-title">
5757
{title}
5858
</h1>
59-
<p className="text-nd-mid-em-text font-medium mt-twd-5 md:mt-twd-6 nd-body-xl xl:max-w-[440px]">
59+
<p className="text-nd-mid-em-text font-medium max-md:mt-twd-5 md:mt-twd-6 nd-body-xl xl:max-w-[440px]">
6060
{subtitle}
6161
</p>
6262

apps/web/src/components/index/projects.tsx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ import {
77
import { cn } from "@/app/components/utils";
88
import Image from "next/image";
99
import { Logo, Logos } from "@/component-library/logos";
10+
import { Button } from "@/app/components/ui/button";
1011

1112
export type ProjectsProps = {
1213
className?: string;
1314
title?: React.ReactNode;
1415
projects?: (CompanyStatsCardProps & { colSpan?: number })[];
1516
bgSrc?: string;
1617
logos?: Logo[];
18+
cta?: string;
19+
ctaHref?: string;
1720
};
1821

1922
export const Projects: React.FC<ProjectsProps> = ({
@@ -22,6 +25,8 @@ export const Projects: React.FC<ProjectsProps> = ({
2225
projects,
2326
bgSrc,
2427
logos,
28+
cta,
29+
ctaHref,
2530
}) => {
2631
let colCounter = 0;
2732
return (
@@ -32,10 +37,30 @@ export const Projects: React.FC<ProjectsProps> = ({
3237
)}
3338
>
3439
<Container className="py-[64px] md:py-[108px] xl:py-[160px] flex flex-col justify-between relative">
35-
<div className="flex flex-col xl:flex-row gap-[52px] justify-between items-start">
40+
<div className="flex flex-col md:flex-row md:items-end md:justify-between gap-twd-4">
3641
<div className="xl:max-w-[70%] grow-0">
3742
{title && <h2 className="nd-heading-l">{title}</h2>}
3843
</div>
44+
{cta && (
45+
<div>
46+
<Button
47+
className="h-12 w-auto nd-body-m"
48+
asChild
49+
variant="secondary-outline"
50+
size="lg"
51+
rounded
52+
>
53+
<a
54+
className="text-inherit"
55+
href={ctaHref}
56+
target="_blank"
57+
rel="noopener noreferrer"
58+
>
59+
{cta}
60+
</a>
61+
</Button>
62+
</div>
63+
)}
3964
</div>
4065
<div className="mt-twd-10 xl:mt-twd-16 rounded-2xl border-nd-border-light border-[1px] bg-nd-inverse overflow-hidden relative">
4166
<Image

apps/web/src/components/index/whats-up.tsx

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import ChevronRight from "@@/public/src/img/icons/ChevronRight.inline.svg";
1212
import SolanaMono from "@@/public/src/img/icons/SolanaMono.inline.svg";
1313
import { useTranslations } from "next-intl";
1414
import { format } from "date-fns";
15+
import { Button } from "@/app/components/ui/button";
1516

1617
export const CATEGORIES = {
1718
all: {
@@ -62,9 +63,16 @@ export type WhatsUpProps = {
6263
categoryId: string;
6364
date: string;
6465
}[];
66+
cta?: string;
67+
ctaHref?: string;
6568
};
6669

67-
export const WhatsUp: React.FC<WhatsUpProps> = ({ title, items }) => {
70+
export const WhatsUp: React.FC<WhatsUpProps> = ({
71+
title,
72+
items,
73+
cta,
74+
ctaHref,
75+
}) => {
6876
const t = useTranslations();
6977
const categories = useMemo(
7078
() =>
@@ -81,10 +89,30 @@ export const WhatsUp: React.FC<WhatsUpProps> = ({ title, items }) => {
8189
<section className="relative overflow-hidden bg-nd-inverse text-nd-high-em-text text-left m-twd-0">
8290
<div className="py-[64px] md:py-[108px] xl:py-[160px]">
8391
<Container className="flex flex-col justify-between relative">
84-
<div className="flex flex-col xl:flex-row gap-[52px] justify-between items-start">
92+
<div className="flex flex-col md:flex-row md:items-end md:justify-between gap-twd-4">
8593
<div className="xl:max-w-[70%] grow-0">
8694
{title && <h2 className="nd-heading-l">{title}</h2>}
8795
</div>
96+
{cta && (
97+
<div>
98+
<Button
99+
className="h-12 w-auto nd-body-m"
100+
asChild
101+
variant="secondary-outline"
102+
size="lg"
103+
rounded
104+
>
105+
<a
106+
className="text-inherit"
107+
href={ctaHref}
108+
target="_blank"
109+
rel="noopener noreferrer"
110+
>
111+
{cta}
112+
</a>
113+
</Button>
114+
</div>
115+
)}
88116
</div>
89117
</Container>
90118
<div className="border-t border-b border-nd-border-light mt-twd-10 xl:mt-twd-16">

apps/web/src/pages/[locale]/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ export default function Home({
113113
tabletLastPageOffset={2}
114114
cardWidthClassName="w-full md:w-[350px] xl:w-[450px]"
115115
startIndex={firstFeaturedEventIndex}
116+
cta={t("index.events.cta")}
117+
ctaHref="/events"
116118
>
117119
{events.map((event) => (
118120
<PlaceMediaCard
@@ -186,6 +188,8 @@ export default function Home({
186188
),
187189
})}
188190
items={TERMINAL_ITEMS}
191+
cta={t("index.whats-up.cta")}
192+
ctaHref="/news"
189193
/>
190194

191195
<Divider />
@@ -208,6 +212,8 @@ export default function Home({
208212
}))}
209213
bgSrc="/src/img/index/projects-bg.webp"
210214
logos={PROJECTS_LOGOS}
215+
cta={t("index.projects.cta")}
216+
ctaHref="/institutional-payments"
211217
/>
212218

213219
<Decor />

packages/ui-chrome/src/inkeep-chat-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function InkeepChatButton() {
2020
return (
2121
<>
2222
<button
23-
className="fixed bottom-8 right-8 z-10 h-[44px] px-[20px] justify-center items-center gap-[8px] rounded-full !bg-gradient-to-b from-black to-[#14001D] shadow-[0_-4px_12px_0_#361B40_inset,0_1px_0_0_#C37CE0_inset,0_-1px_0_0_#D06BF8_inset] backdrop-blur-[3px] text-white font-brand text-[14px] md:text-[16px] leading-[1.42] md:leading-[1.5] tracking-[-0.14px] md:tracking-[-0.16px] max-md:hidden flex"
23+
className="fixed bottom-8 right-8 z-10 h-[44px] px-[20px] justify-center items-center gap-[8px] rounded-full !bg-gradient-to-b from-black to-[#14001D] hover:from-black hover:to-[#2A013C] shadow-[0_-4px_12px_0_#361B40_inset,0_1px_0_0_#C37CE0_inset,0_-1px_0_0_#D06BF8_inset] hover:shadow-[0_-4px_12px_0_#482654_inset,0_1px_0_0_#E2B6F4_inset,0_-1px_0_0_#EEBAFF_inset] backdrop-blur-[3px] text-white font-brand text-[14px] md:text-[16px] leading-[1.42] md:leading-[1.5] tracking-[-0.14px] md:tracking-[-0.16px] max-md:hidden flex hover:backdrop-blur-[3px]"
2424
onClick={() => inkeepConfig.modalSettings.onOpenChange(true)}
2525
type="button"
2626
>

0 commit comments

Comments
 (0)