Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update resources dropdown

Tim Wilsonfe307c9c9cf6
diff --git a/packages/ui/src/content.ts b/packages/ui/src/content.ts
index a30dcb07f6..711d91e3a1 100644
--- a/packages/ui/src/content.ts
+++ b/packages/ui/src/content.ts
@@ -1,12 +1,11 @@
import {
- Blog,
- Book2,
- BulletList,
+ Book2Fill,
+ BulletListFill,
ChartLine,
Code,
+ FeatherFill,
Go,
- Headset,
- HexadecagonStar,
+ HeadsetFill,
Hyperlink,
OfficeBuilding,
Paintbrush,
@@ -138,29 +137,28 @@ export const SDKS = [
export const RESOURCES = [
{
- icon: Blog,
+ icon: FeatherFill,
title: "Blog",
+ description: "Insights and stories",
href: "/blog",
},
{
- icon: BulletList,
- title: "Changelog",
- href: "/changelog",
- },
- {
- icon: Book2,
+ icon: Book2Fill,
title: "Docs",
+ description: "Platform documentation",
href: "/docs",
},
{
- icon: Headset,
- title: "Help Center",
- href: "/help",
+ icon: BulletListFill,
+ title: "Changelog",
+ description: "Releases and updates",
+ href: "/changelog",
},
{
- icon: HexadecagonStar,
- title: "Brand",
- href: "/brand",
+ icon: HeadsetFill,
+ title: "Help Center",
+ description: "Answers to your questions",
+ href: "/help",
},
];
diff --git a/packages/ui/src/icons/nucleo/book2-fill.tsx b/packages/ui/src/icons/nucleo/book2-fill.tsx
new file mode 100644
index 0000000000..430b4312b3
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/book2-fill.tsx
@@ -0,0 +1,20 @@
+import { SVGProps } from "react";
+
+export function Book2Fill(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ height="18"
+ width="18"
+ viewBox="0 0 18 18"
+ xmlns="http://www.w3.org/2000/svg"
+ {...props}
+ >
+ <g fill="currentColor">
+ <path
+ d="M15.923,13.069c.006-.013,.015-.023,.02-.036,.034-.083,.049-.169,.052-.258,0-.009,.005-.016,.005-.025V1.75c0-.414-.336-.75-.75-.75H4.75c-1.517,0-2.75,1.233-2.75,2.75V14.5c0,1.378,1.121,2.5,2.5,2.5H15.25c.286,0,.547-.163,.673-.419s.096-.562-.079-.789c-.522-.679-.434-2.013,.004-2.589,.032-.042,.053-.088,.075-.135ZM8.75,4.5h3.5c.414,0,.75,.336,.75,.75s-.336,.75-.75,.75h-3.5c-.414,0-.75-.336-.75-.75s.336-.75,.75-.75Zm0,3h3.5c.414,0,.75,.336,.75,.75s-.336,.75-.75,.75h-3.5c-.414,0-.75-.336-.75-.75s.336-.75,.75-.75ZM3.5,3.75c0-.689,.561-1.25,1.25-1.25h.25V12h-.5c-.356,0-.693,.077-1,.212V3.75ZM14.092,15.5H4.5c-.552,0-1-.449-1-1s.448-1,1-1H14.105c-.155,.629-.174,1.339-.014,2Z"
+ fill="currentColor"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/nucleo/bullet-list-fill.tsx b/packages/ui/src/icons/nucleo/bullet-list-fill.tsx
new file mode 100644
index 0000000000..4b0e3b51ca
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/bullet-list-fill.tsx
@@ -0,0 +1,34 @@
+import { SVGProps } from "react";
+
+export function BulletListFill(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ height="18"
+ width="18"
+ viewBox="0 0 18 18"
+ xmlns="http://www.w3.org/2000/svg"
+ {...props}
+ >
+ <g fill="currentColor">
+ <path
+ d="M15.75,10.5h-7.5c-.414,0-.75,.336-.75,.75s.336,.75,.75,.75h7.5c.414,0,.75-.336,.75-.75s-.336-.75-.75-.75Z"
+ fill="currentColor"
+ />
+ <path
+ d="M15.75,14h-7.5c-.414,0-.75,.336-.75,.75s.336,.75,.75,.75h7.5c.414,0,.75-.336,.75-.75s-.336-.75-.75-.75Z"
+ fill="currentColor"
+ />
+ <path
+ d="M15.75,3.5h-7.5c-.414,0-.75,.336-.75,.75s.336,.75,.75,.75h7.5c.414,0,.75-.336,.75-.75s-.336-.75-.75-.75Z"
+ fill="currentColor"
+ />
+ <path
+ d="M15.75,7h-7.5c-.414,0-.75,.336-.75,.75s.336,.75,.75,.75h7.5c.414,0,.75-.336,.75-.75s-.336-.75-.75-.75Z"
+ fill="currentColor"
+ />
+ <circle cx="3.75" cy="4.25" fill="currentColor" r="2.25" />
+ <circle cx="3.75" cy="11.25" fill="currentColor" r="2.25" />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/nucleo/feather-fill.tsx b/packages/ui/src/icons/nucleo/feather-fill.tsx
new file mode 100644
index 0000000000..06fb855bf6
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/feather-fill.tsx
@@ -0,0 +1,20 @@
+import { SVGProps } from "react";
+
+export function FeatherFill(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ height="18"
+ width="18"
+ viewBox="0 0 18 18"
+ xmlns="http://www.w3.org/2000/svg"
+ {...props}
+ >
+ <g fill="currentColor">
+ <path
+ d="M12.259,10.858c-.36,0-.755-.023-1.192-.069-.412-.043-.71-.413-.667-.825,.043-.412,.409-.711,.825-.667,1.405,.149,2.158,.017,2.695-.311,.502-.418,.899-.998,1.116-1.831,.139-.612,.228-1.204,.313-1.776,.135-.901,.262-1.751,.551-2.256,.139-.242,.132-.542-.019-.777-.15-.235-.417-.373-.697-.343C3.521,3.023,2.019,15.044,2.005,15.165c-.047,.411,.248,.782,.659,.83,.029,.003,.058,.005,.087,.005,.375,0,.7-.282,.744-.664,.017-.143,.174-1.323,.711-2.88,.81,.363,1.612,.523,1.659,.531,.854,.156,1.643,.234,2.367,.234,1.507,0,2.73-.338,3.65-1.01,.506-.37,.898-.847,1.198-1.406-.254,.031-.522,.052-.822,.052Z"
+ fill="currentColor"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/nucleo/headset-fill.tsx b/packages/ui/src/icons/nucleo/headset-fill.tsx
new file mode 100644
index 0000000000..9c8bb6e99f
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/headset-fill.tsx
@@ -0,0 +1,24 @@
+import { SVGProps } from "react";
+
+export function HeadsetFill(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ height="18"
+ width="18"
+ viewBox="0 0 18 18"
+ xmlns="http://www.w3.org/2000/svg"
+ {...props}
+ >
+ <g fill="currentColor">
+ <path
+ d="M10.709,17h-1.959c-.414,0-.75-.336-.75-.75s.336-.75,.75-.75h1.959c.586,0,1.087-.399,1.219-.971l.343-1.451c.095-.403,.498-.65,.902-.558,.402,.095,.652,.5,.557,.902l-.342,1.447c-.287,1.253-1.39,2.131-2.679,2.131Z"
+ fill="currentColor"
+ />
+ <path
+ d="M14.137,14h-1.137c-.227,0-.441-.103-.584-.279-.143-.176-.197-.408-.149-.629l1.084-5c.104-.422,.149-.762,.149-1.091,0-2.481-2.019-4.5-4.5-4.5s-4.5,2.019-4.5,4.5c0,.329,.046,.669,.145,1.071l1.089,5.02c.048,.222-.007,.453-.149,.629-.143,.177-.357,.279-.584,.279h-1.137c-1.285,0-2.416-.912-2.688-2.167l-.335-1.545c-.265-1.224,.332-2.473,1.449-3.037l.712-.359c.059-3.258,2.727-5.891,5.999-5.891s5.94,2.633,5.999,5.891l.712,.359c1.117,.564,1.714,1.813,1.449,3.037l-.335,1.545c-.272,1.256-1.403,2.167-2.688,2.167Z"
+ fill="currentColor"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/nucleo/index.ts b/packages/ui/src/icons/nucleo/index.ts
index 5898dc1c83..1765abea98 100644
--- a/packages/ui/src/icons/nucleo/index.ts
+++ b/packages/ui/src/icons/nucleo/index.ts
@@ -11,9 +11,11 @@ export * from "./blog";
export * from "./bolt";
export * from "./bolt-fill";
export * from "./book2";
+export * from "./book2-fill";
export * from "./books2";
export * from "./box-archive";
export * from "./bullet-list";
+export * from "./bullet-list-fill";
export * from "./calendar-days";
export * from "./calendar6";
export * from "./cards";
@@ -57,6 +59,7 @@ export * from "./earth-position";
export * from "./envelope-arrow-right";
export * from "./eye";
export * from "./eye-slash";
+export * from "./feather-fill";
export * from "./file-zip2";
export * from "./filter-bars";
export * from "./filter2";
@@ -79,6 +82,7 @@ export * from "./grid";
export * from "./grid-layout-rows";
export * from "./grid-plus";
export * from "./headset";
+export * from "./headset-fill";
export * from "./hexadecagon-star";
export * from "./hyperlink";
export * from "./icosahedron";
diff --git a/packages/ui/src/nav/content/product-content.tsx b/packages/ui/src/nav/content/product-content.tsx
index 6f4af2d76c..671763ed22 100644
--- a/packages/ui/src/nav/content/product-content.tsx
+++ b/packages/ui/src/nav/content/product-content.tsx
@@ -4,7 +4,11 @@ import { COMPARE_PAGES, CUSTOMER_STORIES } from "../../content";
import { CubeSettingsFill, Toggle2Fill } from "../../icons";
import { AnalyticsGraphic } from "./graphics/analytics-graphic";
import { LinksGraphic } from "./graphics/links-graphic";
-import { ContentLinkCard, contentHeadingClassName } from "./shared";
+import {
+ ContentLinkCard,
+ LargeLinkCard,
+ contentHeadingClassName,
+} from "./shared";
const largeLinks = [
{
@@ -58,24 +62,14 @@ export function ProductContent({ domain }: { domain: string }) {
</div>
</Link>
<div className="grid grow grid-rows-2 gap-4">
- {largeLinks.map(({ title, description, icon: Icon, href }) => (
- <Link
+ {largeLinks.map(({ title, description, icon, href }) => (
+ <LargeLinkCard
key={title}
+ title={title}
+ description={description}
+ icon={icon}
href={createHref(href, domain)}
- className="group relative flex flex-col rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20"
- >
- <div className="flex items-center justify-between p-5">
- <div>
- <span className="text-sm font-medium text-neutral-900 dark:text-white">
- {title}
- </span>
- <p className="mt-1 text-sm text-neutral-500 dark:text-white/60">
- {description}
- </p>
- </div>
- <Icon className="size-6 text-neutral-700 dark:text-neutral-200" />
- </div>
- </Link>
+ />
))}
</div>
</div>
diff --git a/packages/ui/src/nav/content/resources-content.tsx b/packages/ui/src/nav/content/resources-content.tsx
index 5de63e9178..bda2eef8ac 100644
--- a/packages/ui/src/nav/content/resources-content.tsx
+++ b/packages/ui/src/nav/content/resources-content.tsx
@@ -1,58 +1,89 @@
import { cn, createHref } from "@dub/utils";
+import Link from "next/link";
import { RESOURCES, SDKS } from "../../content";
-import { ContentLinkCard, contentHeadingClassName } from "./shared";
+import { Grid } from "../../grid";
+import { HexadecagonStar } from "../../icons";
+import {
+ ContentLinkCard,
+ LargeLinkCard,
+ contentHeadingClassName,
+} from "./shared";
export function ResourcesContent({ domain }: { domain: string }) {
return (
- <div className="grid w-[28rem] grid-cols-2">
- <div className="border-l border-gray-200 p-5 dark:border-white/20">
- <p className={cn(contentHeadingClassName, "mb-2")}>SDKs</p>
- <div className="-mx-2 flex flex-col gap-0.5">
- {SDKS.map(({ icon: Icon, iconClassName, title, href }) => (
- <ContentLinkCard
- key={href}
- href={createHref(href, domain, {
- utm_source: "Custom Domain",
- utm_medium: "Navbar",
- utm_campaign: domain,
- utm_content: title,
- })}
- icon={
- <Icon
- className={cn(
- "h-5 w-5 shrink-0 text-gray-600 transition-colors dark:text-white/60",
- iconClassName,
- )}
- />
- }
+ <div className="grid w-[584px] grid-cols-2 gap-4 p-5">
+ <div>
+ <div className="flex flex-col gap-4">
+ {RESOURCES.map(({ icon, title, description, href }) => (
+ <LargeLinkCard
+ key={title}
title={title}
- showArrow
+ description={description}
+ icon={icon}
+ href={createHref(href, domain)}
/>
))}
</div>
</div>
- <div className="border-l border-gray-200 p-5 dark:border-white/20">
- <p className={cn(contentHeadingClassName, "mb-2")}>Content</p>
- <div className="-mx-2 flex flex-col gap-0.5">
- {RESOURCES.map(({ icon: Icon, title, href }) => (
- <ContentLinkCard
- href={createHref(href, domain, {
- utm_source: "Custom Domain",
- utm_medium: "Navbar",
- utm_campaign: domain,
- utm_content: title,
- })}
- icon={
- <Icon
- className={cn(
- "h-5 w-5 shrink-0 text-gray-600 dark:text-white/60",
- )}
- />
- }
- title={title}
- showArrow
+ <div className="flex flex-col gap-4">
+ <div>
+ <p className={cn(contentHeadingClassName, "my-2")}>SDKs</p>
+ <div className="flex flex-col gap-0.5">
+ {SDKS.map(({ icon: Icon, iconClassName, title, href }) => (
+ <ContentLinkCard
+ key={href}
+ href={createHref(href, domain, {
+ utm_source: "Custom Domain",
+ utm_medium: "Navbar",
+ utm_campaign: domain,
+ utm_content: title,
+ })}
+ icon={
+ <div className="shrink-0 rounded-[10px] border border-gray-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10">
+ <Icon
+ className={cn(
+ "size-5 text-gray-600 transition-colors dark:text-white/60",
+ iconClassName,
+ )}
+ />
+ </div>
+ }
+ title={title}
+ showArrow
+ />
+ ))}
+ </div>
+ </div>
+ <div className="flex grow flex-col justify-end">
+ <Link
+ href={createHref("/brand", domain)}
+ className="group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20"
+ >
+ <Grid
+ cellSize={20}
+ patternOffset={[0, -5]}
+ className="text-neutral-600 [mask-image:radial-gradient(75%_50%_at_50%_0,black,transparent)]"
/>
- ))}
+ <div className="pointer-events-none absolute -inset-[50%] opacity-30 blur-[20px] transition-opacity duration-300 group-hover:opacity-40 dark:group-hover:opacity-35">
+ <div
+ className={cn(
+ "absolute inset-[16%] rounded-xl",
+ "bg-[radial-gradient(20%_80%_at_50%_100%,#fd3a4e,transparent),radial-gradient(30%_80%_at_40%_50%,#855afc,transparent),radial-gradient(30%_80%_at_60%_50%,#72fe7d,transparent),radial-gradient(30%_100%_at_50%_50%,#e4c795,transparent)]",
+ )}
+ />
+ </div>
+ <div className="relative flex items-center justify-between px-5 py-4">
+ <div>
+ <span className="text-sm font-medium leading-none text-white">
+ Dub Brand
+ </span>
+ <p className="mt-1 text-sm text-white/70">
+ Logos, wordmark, etc.
+ </p>
+ </div>
+ <HexadecagonStar className="size-6 text-white" />
+ </div>
+ </Link>
</div>
</div>
</div>
diff --git a/packages/ui/src/nav/content/shared.tsx b/packages/ui/src/nav/content/shared.tsx
index 3e2c8a520d..e9350fa018 100644
--- a/packages/ui/src/nav/content/shared.tsx
+++ b/packages/ui/src/nav/content/shared.tsx
@@ -1,7 +1,7 @@
import { cn } from "@dub/utils";
import Link from "next/link";
import { ComponentProps, ReactNode, SVGProps } from "react";
-import { ExpandingArrow } from "../../icons";
+import { ExpandingArrow, Icon } from "../../icons";
export const contentHeadingClassName =
"text-xs uppercase text-neutral-400 dark:text-white/60";
@@ -82,3 +82,33 @@ export function ToolLinkCard({
</Link>
);
}
+
+export function LargeLinkCard({
+ icon: Icon,
+ title,
+ description,
+ ...rest
+}: {
+ icon: Icon;
+ title: string;
+ description?: string;
+} & ComponentProps<typeof Link>) {
+ return (
+ <Link
+ {...rest}
+ className="group relative flex flex-col rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20"
+ >
+ <div className="flex items-center justify-between px-5 py-4">
+ <div>
+ <span className="text-sm font-medium leading-none text-neutral-900 dark:text-white">
+ {title}
+ </span>
+ <p className="mt-1 text-sm text-neutral-500 dark:text-white/60">
+ {description}
+ </p>
+ </div>
+ <Icon className="size-6 text-neutral-700 dark:text-neutral-200" />
+ </div>
+ </Link>
+ );
+}
diff --git a/packages/ui/src/nav/nav.tsx b/packages/ui/src/nav/nav.tsx
index 1b38277c7b..10c71d9949 100644
--- a/packages/ui/src/nav/nav.tsx
+++ b/packages/ui/src/nav/nav.tsx
@@ -108,17 +108,19 @@ export function Nav({
/>
<MaxWidthWrapper className={cn("relative", maxWidthWrapperClassName)}>
<div className="flex h-14 items-center justify-between">
- <Link
- className="grow basis-0"
- href={createHref("/home", domain, {
- utm_source: "Custom Domain",
- utm_medium: "Navbar",
- utm_campaign: domain,
- utm_content: "Logo",
- })}
- >
- <NavWordmark />
- </Link>
+ <div className="grow basis-0">
+ <Link
+ className="block w-fit py-2 pr-2"
+ href={createHref("/home", domain, {
+ utm_source: "Custom Domain",
+ utm_medium: "Navbar",
+ utm_campaign: domain,
+ utm_content: "Logo",
+ })}
+ >
+ <NavWordmark />
+ </Link>
+ </div>
<NavigationMenuPrimitive.Root
delayDuration={0}
className="relative hidden lg:block"