Skip to content

Commit e723b84

Browse files
committed
[TOOL-3166] Update portal theming to match dashboard
1 parent eded4ff commit e723b84

File tree

83 files changed

+589
-582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+589
-582
lines changed

apps/portal/src/app/Header.tsx

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,21 @@ import {
99
DropdownMenuTrigger,
1010
} from "@/components/ui/dropdown-menu";
1111
import clsx from "clsx";
12-
import { ChevronDownIcon, Menu } from "lucide-react";
12+
import { ChevronDownIcon, Menu, TableOfContentsIcon } from "lucide-react";
1313
import Image from "next/image";
1414
import Link from "next/link";
1515
import { usePathname } from "next/navigation";
1616
import { useState } from "react";
1717
import { GithubIcon } from "../components/Document/GithubButtonLink";
1818
import { CustomAccordion } from "../components/others/CustomAccordion";
1919
import { ThemeSwitcher } from "../components/others/theme/ThemeSwitcher";
20+
import {
21+
DotNetIcon,
22+
ReactIcon,
23+
TypeScriptIcon,
24+
UnityIcon,
25+
UnrealEngineIcon,
26+
} from "../icons";
2027
import { ThirdwebIcon } from "../icons/thirdweb";
2128

2229
const links = [
@@ -65,42 +72,45 @@ const toolLinks = [
6572
},
6673
];
6774

68-
export const connectLinks = [
75+
export const connectLinks: Array<{
76+
name: string;
77+
href: string;
78+
icon: React.FC<{ className?: string }>;
79+
}> = [
6980
{
7081
name: "Overview",
7182
href: "/connect",
72-
icon: "/icons/navbar/nav-icon-dashboard.svg",
83+
icon: TableOfContentsIcon,
7384
},
7485
{
7586
name: "TypeScript",
7687
href: "/typescript/v5",
77-
icon: "/icons/navbar/nav-icon-typescript.svg",
88+
icon: TypeScriptIcon,
7889
},
7990
{
8091
name: "React",
8192
href: "/react/v5",
82-
icon: "/icons/navbar/nav-icon-react.svg",
93+
icon: ReactIcon,
8394
},
8495
{
8596
name: "React Native",
8697
href: "/react-native/v5",
87-
icon: "/icons/navbar/nav-icon-react.svg",
88-
// icon: "/icons/navbar/nav-icon-react-native.svg",
98+
icon: ReactIcon,
8999
},
90100
{
91101
name: ".NET",
92102
href: "/dotnet",
93-
icon: "/icons/navbar/nav-icon-dotnet.svg",
103+
icon: DotNetIcon,
94104
},
95105
{
96106
name: "Unity",
97107
href: "/unity",
98-
icon: "/icons/navbar/nav-icon-unity.svg",
108+
icon: UnityIcon,
99109
},
100110
{
101111
name: "Unreal Engine",
102112
href: "/unreal-engine",
103-
icon: "/icons/navbar/nav-icon-unreal-engine.svg",
113+
icon: UnrealEngineIcon,
104114
},
105115
] as const;
106116

@@ -123,7 +133,7 @@ export function Header() {
123133
const [showBurgerMenu, setShowBurgerMenu] = useState(false);
124134

125135
return (
126-
<header className="flex w-full items-center border-b bg-b-900">
136+
<header className="flex w-full items-center border-b bg-background">
127137
<div className="container flex items-center justify-between gap-6 p-4 xl:justify-start">
128138
<Link
129139
className="flex items-center gap-2"
@@ -132,7 +142,7 @@ export function Header() {
132142
title="thirdweb Docs"
133143
>
134144
<ThirdwebIcon className="size-8" />
135-
<span className="font-bold text-[23px] text-f-100 leading-none tracking-tight">
145+
<span className="font-bold text-[23px] text-foreground leading-none tracking-tight">
136146
Docs
137147
</span>
138148
</Link>
@@ -145,7 +155,7 @@ export function Header() {
145155
<Link
146156
href="https://github.com/thirdweb-dev"
147157
target="_blank"
148-
className="text-f-100"
158+
className="text-foreground"
149159
>
150160
<GithubIcon className="mx-3 size-6" />
151161
</Link>
@@ -164,7 +174,7 @@ export function Header() {
164174
className={clsx(
165175
"grow gap-5",
166176
!showBurgerMenu ? "hidden xl:flex" : "flex",
167-
"fade-in-20 slide-in-from-top-3 fixed inset-0 top-sticky-top-height animate-in flex-col overflow-auto bg-b-800 p-6",
177+
"fade-in-20 slide-in-from-top-3 fixed inset-0 top-sticky-top-height animate-in flex-col overflow-auto bg-card p-6",
168178
"xl:static xl:animate-none xl:flex-row xl:justify-between xl:bg-transparent xl:p-0",
169179
)}
170180
>
@@ -227,7 +237,7 @@ export function Header() {
227237
<Link
228238
href="https://github.com/thirdweb-dev"
229239
target="_blank"
230-
className="hidden text-f-300 transition-colors hover:text-f-100 xl:block"
240+
className="hidden text-muted-foreground transition-colors hover:text-foreground xl:block"
231241
>
232242
<GithubIcon className="mx-2 size-6" />
233243
</Link>
@@ -241,7 +251,11 @@ export function Header() {
241251
function DropdownLinks(props: {
242252
onLinkClick?: () => void;
243253
category: string;
244-
links: readonly { name: string; href: string; icon?: string }[];
254+
links: readonly {
255+
name: string;
256+
href: string;
257+
icon?: React.FC<{ className?: string }>;
258+
}[];
245259
}) {
246260
return (
247261
<>
@@ -251,42 +265,40 @@ function DropdownLinks(props: {
251265
<DropdownMenuTrigger asChild>
252266
<Button
253267
variant="ghost"
254-
className="inline-flex items-center gap-1 p-0 font-medium text-f-300 text-sm hover:bg-transparent hover:text-f-100"
268+
className="inline-flex items-center gap-1 p-0 font-medium text-muted-foreground text-sm hover:bg-transparent hover:text-foreground"
255269
>
256270
{props.category}
257-
<ChevronDownIcon className="size-4 text-f-300 opacity-70" />
271+
<ChevronDownIcon className="size-4 text-muted-foreground opacity-70" />
258272
</Button>
259273
</DropdownMenuTrigger>
260274

261275
<DropdownMenuContent
262-
className="flex flex-col gap-1 bg-b-800 p-3"
276+
className="flex flex-col gap-1 bg-card p-3"
263277
style={{
264278
minWidth: "150px",
265279
}}
266280
>
267281
{props.links.map((info) => {
268282
return (
269283
<DropdownMenuItem asChild key={info.name}>
270-
<Link
271-
href={info.href}
272-
target={info.href.startsWith("http") ? "_blank" : ""}
273-
prefetch={false}
284+
<div
274285
className={clsx(
275-
"flex cursor-pointer font-medium text-f-200",
276-
"hover:bg-b-600 hover:text-f-100",
286+
"relative flex cursor-pointer gap-2 font-medium text-foreground",
287+
"hover:bg-accent",
277288
)}
278289
>
279290
{info.icon && (
280-
<Image
281-
src={info.icon}
282-
width="20"
283-
height="20"
284-
alt=""
285-
className="mr-2"
286-
/>
291+
<info.icon className="size-5 text-foreground" />
287292
)}
288-
{info.name}
289-
</Link>
293+
<Link
294+
prefetch={false}
295+
target={info.href.startsWith("http") ? "_blank" : ""}
296+
href={info.href}
297+
className="before:absolute before:inset-0"
298+
>
299+
{info.name}
300+
</Link>
301+
</div>
290302
</DropdownMenuItem>
291303
);
292304
})}
@@ -300,7 +312,7 @@ function DropdownLinks(props: {
300312
chevronPosition="right"
301313
containerClassName="border-none"
302314
trigger={props.category}
303-
triggerContainerClassName="py-0 text-base font-medium text-f-300"
315+
triggerContainerClassName="py-0 text-base font-medium text-muted-foreground"
304316
>
305317
<div className="pt-2">
306318
<div className="flex flex-col gap-4 border-l-2 pt-3 pl-4">
@@ -336,8 +348,8 @@ function NavLink(props: {
336348
onClick={props.onClick}
337349
target={props.href.startsWith("http") ? "_blank" : ""}
338350
className={clsx(
339-
"font-medium text-base transition-colors hover:text-f-100 xl:text-sm",
340-
pathname === props.href ? "text-f-100" : "text-f-300 ",
351+
"font-medium text-base transition-colors hover:text-foreground xl:text-sm",
352+
pathname === props.href ? "text-foreground" : "text-muted-foreground ",
341353
props.icon ? "flex flex-row gap-2" : "",
342354
)}
343355
>

apps/portal/src/app/changelog/[slug]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default async function Page(props: {
2828
<Button asChild>
2929
<Link
3030
href="/changelog"
31-
className="-translate-x-1/4 !p-2 !text-f-300 hover:!text-accent-500 mb-4 bg-transparent"
31+
className="-translate-x-1/4 !p-2 !text-muted-foreground hover:!text-foreground mb-4 bg-transparent"
3232
>
3333
<ArrowLeft className="size-6" />
3434
</Link>
@@ -42,7 +42,7 @@ export default async function Page(props: {
4242

4343
<h1
4444
className={cn(
45-
"mb-8 break-words font-bold text-4xl text-f-100 tracking-tight md:text-5xl",
45+
"mb-8 break-words font-bold text-4xl text-foreground tracking-tight md:text-5xl",
4646
)}
4747
>
4848
{data.title}

apps/portal/src/app/changelog/[slug]/styles.css

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,27 @@
33
}
44

55
.changelog-page a {
6-
color: var(--accent-500);
6+
text-decoration: underline;
7+
text-decoration-color: hsl(var(--muted-foreground));
8+
text-decoration-style: dotted;
9+
color: hsl(var(--foreground));
10+
text-underline-offset: 5px;
11+
transition: color 200ms ease;
12+
}
13+
14+
.changelog-page h2 a {
15+
text-decoration: none;
716
}
817

918
.changelog-page a:hover {
10-
color: var(--f-100);
19+
color: hsl(var(--foreground));
20+
text-decoration-color: hsl(var(--foreground));
21+
text-decoration-style: solid;
1122
}
1223

1324
.changelog-page figcaption {
1425
text-align: center;
15-
color: var(--f-300);
26+
color: hsl(var(--muted-foreground));
1627
}
1728

1829
.changelog-page iframe {
@@ -43,7 +54,7 @@
4354
display: flex;
4455
gap: 10px;
4556
margin: 20px 0;
46-
background: var(--b-800);
57+
background: hsl(var(--card));
4758
}
4859

4960
.kg-video-overlay {

apps/portal/src/app/changelog/components/Author.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export function Author(props: { name: string; profileImage?: string | null }) {
1010
alt=""
1111
/>
1212
)}
13-
<span className="font-medium text-f-200 text-sm">{props.name}</span>
13+
<span className="font-medium text-muted-foreground text-sm">
14+
{props.name}
15+
</span>
1416
</div>
1517
);
1618
}

apps/portal/src/app/changelog/components/RenderData.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ export function RenderDate(props: { iso: string; className?: string }) {
55
return (
66
<time
77
dateTime={props.iso}
8-
className={cn("font-medium text-f-300 text-sm", props.className)}
8+
className={cn(
9+
"font-medium text-muted-foreground text-sm",
10+
props.className,
11+
)}
912
>
1013
{formatDistance(new Date(props.iso), new Date())} ago
1114
</time>

apps/portal/src/app/changelog/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ async function PageContent() {
6565
</div>
6666
</div>
6767

68-
<div className="-left-12 -translate-x-1/2 absolute top-12 hidden size-7 items-center justify-center rounded-[50%] bg-f-100 md:size-10 xl:flex">
69-
<PlusIcon className="size-6 text-b-900" />
68+
<div className="-left-12 -translate-x-1/2 absolute top-12 hidden size-7 items-center justify-center rounded-[50%] bg-foreground md:size-10 xl:flex">
69+
<PlusIcon className="size-6 text-background" />
7070
</div>
7171

72-
<div className="overflow-hidden">
72+
<div>
7373
<Heading
7474
level={2}
7575
className="changelog-title"
@@ -78,7 +78,7 @@ async function PageContent() {
7878
>
7979
<Link
8080
href={`/changelog/${post.slug}`}
81-
className="!text-f-100 font-bold text-3xl tracking-tighter hover:underline md:text-4xl xl:text-5xl"
81+
className="!text-foreground font-bold text-3xl tracking-tighter hover:underline md:text-4xl xl:text-5xl"
8282
>
8383
{post.title}
8484
</Link>

apps/portal/src/app/changelog/utils/transform.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const transform: Transform = (node, index: number) => {
6060
if (!node.attribs) {
6161
node.attribs = {};
6262
}
63-
node.attribs.class = "text-center text-sm text-f-300";
63+
node.attribs.class = "text-center text-sm text-muted-foreground";
6464
return;
6565
}
6666
return <Paragraph>{getChildren()}</Paragraph>;

apps/portal/src/app/connect/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default async function Layout(props: { children: React.ReactNode }) {
99
editPageButton={true}
1010
sidebarHeader={
1111
<div className="flex-col items-center gap-1">
12-
<p className="py-5 font-semibold text-f-100 text-lg">Connect</p>
12+
<p className="py-5 font-semibold text-foreground text-lg">Connect</p>
1313
<PlatformSelector selected="Overview" />
1414
</div>
1515
}

0 commit comments

Comments
 (0)