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 nav and footer

Steven Tey036787e11f6b
diff --git a/packages/ui/package.json b/packages/ui/package.json
index f37ed05d62..d471670f3b 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -1,7 +1,7 @@
{
"name": "@dub/ui",
"description": "UI components for Dub",
- "version": "0.2.49",
+ "version": "0.2.51",
"sideEffects": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
diff --git a/packages/ui/src/content.ts b/packages/ui/src/content.ts
index cd2333c432..1ec88695ab 100644
--- a/packages/ui/src/content.ts
+++ b/packages/ui/src/content.ts
@@ -1,17 +1,17 @@
import { ElementType } from "react";
import {
Book2Fill,
+ BriefcaseFill,
BulletListFill,
DiamondTurnRightFill,
DubAnalyticsIcon,
DubLinksIcon,
DubPartnersIcon,
+ EnvelopeFill,
FeatherFill,
Github,
Go,
- HeadsetFill,
- HeartFill,
- HexadecagonStar,
+ LifeRing,
LinkedIn,
MicrophoneFill,
Php,
@@ -27,6 +27,7 @@ import {
} from "./icons";
import { DubApiIcon } from "./icons/dub-api";
import { Elxo } from "./icons/elxo";
+import { Logo } from "./logo";
export type NavItemChild = {
title: string;
@@ -160,6 +161,12 @@ export const SOLUTIONS: NavItemChildren = [
];
export const RESOURCES = [
+ {
+ icon: LifeRing,
+ title: "Help Center",
+ description: "Answers to your questions",
+ href: "/help",
+ },
{
icon: Book2Fill,
title: "Docs",
@@ -167,17 +174,17 @@ export const RESOURCES = [
href: "/docs/introduction",
},
{
- icon: HeadsetFill,
- title: "Help Center",
- description: "Answers to your questions",
- href: "/help",
- },
- {
- icon: HeartFill,
+ icon: UsersFill,
title: "About",
description: "Company, values, and team",
href: "/about",
},
+ {
+ icon: BriefcaseFill,
+ title: "Careers",
+ description: "Join our global, remote team",
+ href: "/careers",
+ },
{
icon: FeatherFill,
title: "Blog",
@@ -191,11 +198,17 @@ export const RESOURCES = [
href: "/changelog",
},
{
- icon: HexadecagonStar,
- title: "Dub Brand",
+ icon: Logo,
+ title: "Brand Guidelines",
description: "Logos, wordmark, etc.",
href: "/brand",
},
+ {
+ icon: EnvelopeFill,
+ title: "Contact",
+ description: "Reach out to support or sales",
+ href: "/contact",
+ },
];
export const COMPARE_PAGES = [
diff --git a/packages/ui/src/icons/nucleo/briefcase-fill.tsx b/packages/ui/src/icons/nucleo/briefcase-fill.tsx
new file mode 100644
index 0000000000..33c5e9ac2d
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/briefcase-fill.tsx
@@ -0,0 +1,29 @@
+import { SVGProps } from "react";
+
+export function BriefcaseFill(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="M11.75,5.5c-.414,0-.75-.336-.75-.75V2.25c0-.138-.112-.25-.25-.25h-3.5c-.138,0-.25,.112-.25,.25v2.5c0,.414-.336,.75-.75,.75s-.75-.336-.75-.75V2.25c0-.965,.785-1.75,1.75-1.75h3.5c.965,0,1.75,.785,1.75,1.75v2.5c0,.414-.336,.75-.75,.75Z"
+ fill="currentColor"
+ />
+ <rect
+ height="12"
+ width="16"
+ fill="currentColor"
+ rx="2.75"
+ ry="2.75"
+ x="1"
+ y="4"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/nucleo/envelope-fill.tsx b/packages/ui/src/icons/nucleo/envelope-fill.tsx
new file mode 100644
index 0000000000..eebbdc96c7
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/envelope-fill.tsx
@@ -0,0 +1,24 @@
+import { SVGProps } from "react";
+
+export function EnvelopeFill(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="M8.88,8.827c.074,.042,.166,.042,.24,0l7.777-4.283c-.314-1.173-1.376-2.044-2.647-2.044H3.75c-1.267,0-2.326,.865-2.643,2.033l7.773,4.293Z"
+ fill="currentColor"
+ />
+ <path
+ d="M9.845,10.14c-.264,.146-.554,.219-.844,.219s-.582-.073-.846-.22L1,6.188v6.562c0,1.517,1.233,2.75,2.75,2.75H14.25c1.517,0,2.75-1.233,2.75-2.75V6.2l-7.155,3.94Z"
+ fill="currentColor"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/nucleo/headset-fill.tsx b/packages/ui/src/icons/nucleo/headset-fill.tsx
deleted file mode 100644
index 9c8bb6e99f..0000000000
--- a/packages/ui/src/icons/nucleo/headset-fill.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-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 fd9c4589bc..fd197fdc4c 100644
--- a/packages/ui/src/icons/nucleo/index.ts
+++ b/packages/ui/src/icons/nucleo/index.ts
@@ -20,6 +20,7 @@ export * from "./book2-small";
export * from "./books2";
export * from "./box-archive";
export * from "./brackets-curly";
+export * from "./briefcase-fill";
export * from "./brush";
export * from "./bullet-list";
export * from "./bullet-list-fill";
@@ -82,6 +83,7 @@ export * from "./earth-position";
export * from "./envelope";
export * from "./envelope-alert";
export * from "./envelope-arrow-right";
+export * from "./envelope-fill";
export * from "./eye";
export * from "./eye-slash";
export * from "./feather-fill";
@@ -118,7 +120,6 @@ export * from "./grid-layout-rows";
export * from "./grid-plus";
export * from "./grip-dots-vertical";
export * from "./headset";
-export * from "./headset-fill";
export * from "./heart-fill";
export * from "./hexadecagon-star";
export * from "./history";
@@ -132,6 +133,7 @@ export * from "./invoice-dollar";
export * from "./key";
export * from "./layout-sidebar";
export * from "./license";
+export * from "./life-ring";
export * from "./lines-y";
export * from "./link-broken";
export * from "./link4";
diff --git a/packages/ui/src/icons/nucleo/life-ring.tsx b/packages/ui/src/icons/nucleo/life-ring.tsx
new file mode 100644
index 0000000000..5b2e9557f6
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/life-ring.tsx
@@ -0,0 +1,64 @@
+import { SVGProps } from "react";
+
+export function LifeRing(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="M6.188,7.951l-1.404-.525c.457-1.223,1.42-2.186,2.643-2.643l.525,1.405c-.815,.305-1.458,.947-1.764,1.763Z"
+ fill="currentColor"
+ />
+ <path
+ d="M11.812,7.951c-.306-.815-.948-1.458-1.764-1.763l.525-1.405c1.223,.457,2.186,1.42,2.643,2.643l-1.404,.525Z"
+ fill="currentColor"
+ />
+ <path
+ d="M10.574,13.217l-.525-1.405c.815-.305,1.458-.947,1.764-1.763l1.404,.525c-.457,1.223-1.42,2.186-2.643,2.643Z"
+ fill="currentColor"
+ />
+ <path
+ d="M7.426,13.217c-1.223-.457-2.186-1.42-2.643-2.643l1.404-.525c.306,.815,.948,1.458,1.764,1.763l-.525,1.405Z"
+ fill="currentColor"
+ />
+ <path
+ d="M6.202,16.497c-2.174-.812-3.887-2.524-4.698-4.699l1.404-.524c.66,1.767,2.052,3.159,3.819,3.818l-.525,1.405Z"
+ fill="currentColor"
+ />
+ <path
+ d="M11.798,16.497l-.525-1.405c1.768-.66,3.159-2.051,3.819-3.818l1.404,.524c-.812,2.175-2.524,3.888-4.698,4.699Z"
+ fill="currentColor"
+ />
+ <path
+ d="M15.091,6.727c-.658-1.767-2.05-3.159-3.818-3.819l.525-1.405c2.175,.812,3.888,2.525,4.699,4.7l-1.406,.524Z"
+ fill="currentColor"
+ />
+ <path
+ d="M2.908,6.727l-1.404-.524c.812-2.175,2.524-3.888,4.698-4.699l.525,1.405c-1.768,.66-3.159,2.051-3.819,3.818Z"
+ fill="currentColor"
+ />
+ <path
+ d="M10.312,6.237c-.087,0-.176-.015-.263-.047-.675-.251-1.429-.251-2.098,0-.188,.069-.394,.062-.574-.021-.181-.083-.321-.233-.392-.42l-1.399-3.749c-.069-.186-.062-.393,.021-.574,.083-.181,.234-.322,.42-.391,1.902-.71,4.045-.71,5.947,0,.388,.145,.585,.577,.44,.965l-1.399,3.75c-.113,.302-.399,.488-.703,.488Z"
+ fill="currentColor"
+ />
+ <path
+ d="M16.263,12.46c-.087,0-.176-.015-.263-.047l-3.749-1.399c-.388-.145-.585-.577-.44-.965,.126-.336,.189-.689,.189-1.049,0-.362-.063-.714-.188-1.047-.07-.187-.062-.393,.02-.575,.083-.181,.233-.322,.42-.392l3.749-1.399c.393-.145,.82,.053,.965,.44,.355,.949,.535,1.95,.535,2.973s-.18,2.024-.535,2.973c-.112,.301-.398,.487-.702,.487Z"
+ fill="currentColor"
+ />
+ <path
+ d="M9,17.5c-1.022,0-2.022-.18-2.974-.535-.388-.145-.585-.577-.44-.965l1.399-3.75c.146-.388,.576-.585,.966-.44,.675,.251,1.429,.251,2.098,0,.187-.07,.393-.063,.574,.021,.181,.083,.321,.233,.392,.42l1.399,3.749c.069,.186,.062,.393-.021,.574-.083,.181-.234,.322-.42,.391-.951,.355-1.951,.535-2.974,.535Z"
+ fill="currentColor"
+ />
+ <path
+ d="M1.737,12.46c-.304,0-.59-.186-.702-.487-.355-.949-.535-1.95-.535-2.973s.18-2.024,.535-2.973c.145-.387,.574-.584,.965-.44l3.749,1.399c.388,.145,.585,.577,.44,.965-.126,.336-.189,.689-.189,1.049,0,.362,.063,.714,.188,1.047,.07,.187,.062,.393-.02,.575-.083,.181-.233,.322-.42,.392l-3.749,1.399c-.087,.032-.176,.047-.263,.047Z"
+ fill="currentColor"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/nav/content/resources-content.tsx b/packages/ui/src/nav/content/resources-content.tsx
index 079cc359e2..12dba34ad9 100644
--- a/packages/ui/src/nav/content/resources-content.tsx
+++ b/packages/ui/src/nav/content/resources-content.tsx
@@ -1,118 +1,132 @@
import { cn, createHref } from "@dub/utils";
import { Link as NavigationMenuLink } from "@radix-ui/react-navigation-menu";
-import Image from "next/image";
import Link from "next/link";
import { RESOURCES } from "../../content";
-import { DubWireframeGraphic } from "./graphics/dub-wireframe-graphic";
-import { LargeLinkCard, getUtmParams } from "./shared";
+import { Grid } from "../../grid";
+import { Book2Fill, LifeRing } from "../../icons";
+import {
+ ContentLinkCard,
+ contentHeadingClassName,
+ getUtmParams,
+} from "./shared";
const mainLinks = [
{
- title: "Docs",
- description: "Platform documentation",
- thumbnail: "https://assets.dub.co/misc/docs-thumbnail.jpg",
- href: "/docs/introduction",
- },
- {
+ icon: LifeRing,
title: "Help Center",
description: "Answers to your questions",
thumbnail: "https://assets.dub.co/misc/help-thumbnail.jpg", // TODO: Update
href: "/help",
},
+ {
+ icon: Book2Fill,
+ title: "Docs",
+ description: "Platform documentation",
+ thumbnail: "https://assets.dub.co/misc/docs-thumbnail.jpg",
+ href: "/docs/introduction",
+ },
];
export function ResourcesContent({ domain }: { domain: string }) {
return (
- <div className="grid w-[1020px] grid-cols-[minmax(0,1fr),0.45fr] divide-x divide-neutral-200 dark:divide-white/20">
- <div className="grid grid-cols-2 gap-4 p-4">
- {mainLinks.map(({ title, description, thumbnail, href }) => (
- <NavigationMenuLink key={title} asChild>
- <Link
- key={title}
+ <div className="grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20">
+ <div className="flex h-full flex-col p-4">
+ <p className={cn(contentHeadingClassName, "mb-4 ml-2")}>Explore</p>
+ <div className="grid grow grid-cols-2 gap-4">
+ {mainLinks.map(({ icon: Icon, title, description, href }) => (
+ <NavigationMenuLink key={title} asChild>
+ <Link
+ key={title}
+ href={createHref(
+ href,
+ domain,
+ getUtmParams({ domain, utm_content: title }),
+ )}
+ className={cn(
+ "group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75",
+ "dark:border-white/20 dark:bg-neutral-900",
+ )}
+ >
+ <div className="absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100">
+ <div className="absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]">
+ <Grid
+ cellSize={46}
+ patternOffset={[0, -14]}
+ className="translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"
+ />
+ </div>
+ <div
+ className={cn(
+ "absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150",
+ "bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]",
+ )}
+ />
+ </div>
+ <Icon className="relative size-5 text-neutral-700 dark:text-white/60" />
+ <div className="relative">
+ <span className="text-sm font-medium text-neutral-900 dark:text-white">
+ {title}
+ </span>
+ <p className="mt-2 text-xs text-neutral-500 dark:text-white/60">
+ {description}
+ </p>
+ </div>
+ </Link>
+ </NavigationMenuLink>
+ ))}
+ </div>
+ </div>
+
+ <div className="px-6 py-4">
+ <p className={cn(contentHeadingClassName, "mb-2")}>Company</p>
+ <div className="flex flex-col gap-0.5">
+ {RESOURCES.filter(({ title }) =>
+ ["About", "Careers", "Brand Guidelines", "Contact"].includes(title),
+ ).map(({ icon: Icon, title, description, href }) => (
+ <ContentLinkCard
+ key={href}
+ className="-mx-2"
href={createHref(
href,
domain,
getUtmParams({ domain, utm_content: title }),
)}
- className={cn(
- "group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-75 hover:bg-neutral-100/80",
- "dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15",
- )}
- >
- <div className="p-5 pb-0">
- <span className="text-sm font-medium text-neutral-900 dark:text-white">
- {title}
- </span>
- <p className="mt-3 max-w-56 text-sm text-neutral-500 dark:text-white/60">
- {description}
- </p>
- </div>
- <div className="relative mt-7 grow overflow-hidden pl-5 [mask-image:linear-gradient(90deg,black_50%,transparent)]">
- <div
- className={cn(
- "relative size-full overflow-hidden rounded-tl-lg border-l border-t border-black/10",
- "[mask-image:linear-gradient(black_50%,transparent)]",
- )}
- >
- <Image
- src={thumbnail}
- alt={`${title} thumbnail`}
- fill
- className="bg-white object-cover object-left-top grayscale transition-[filter] duration-75 group-hover:grayscale-0 dark:opacity-50"
- />
+ icon={
+ <div className="shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10">
+ <Icon className="size-4 text-neutral-600 transition-colors dark:text-white/60" />
</div>
- </div>
- </Link>
- </NavigationMenuLink>
- ))}
+ }
+ title={title}
+ description={description}
+ />
+ ))}
+ </div>
</div>
- <div className="flex flex-col gap-4 p-4">
- {RESOURCES.filter(
- ({ title }) => !["Docs", "Help Center", "Dub Brand"].includes(title),
- ).map(({ title, description, icon, href }) => (
- <LargeLinkCard
- key={title}
- title={title}
- description={description}
- icon={icon}
- iconClassName="size-5"
- href={createHref(
- href,
- domain,
- getUtmParams({ domain, utm_content: title }),
- )}
- />
- ))}
- <NavigationMenuLink asChild>
- <Link
- href={createHref(
- "/brand",
- domain,
- getUtmParams({ domain, utm_content: "Dub Brand" }),
- )}
- className="group relative flex flex-col overflow-hidden rounded-xl bg-black transition-colors duration-75 dark:border dark:border-white/20"
- >
- <div className="pointer-events-none absolute inset-0">
- <div className="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-0 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>
- <DubWireframeGraphic className="absolute right-0 top-1/2 h-auto w-full -translate-y-1/2 translate-x-[33%] [mask-image:linear-gradient(90deg,#000a,transparent)]" />
- </div>
- <div className="relative flex items-center justify-between px-5 py-4">
- <div>
- <span className="block text-sm font-medium text-white">
- Dub Brand
- </span>
- <p className="text-sm text-white/60">Logos, wordmark, etc.</p>
- </div>
- </div>
- </Link>
- </NavigationMenuLink>
+
+ <div className="px-6 py-4">
+ <p className={cn(contentHeadingClassName, "mb-2")}>Updates</p>
+ <div className="flex flex-col gap-0.5">
+ {RESOURCES.filter(({ title }) =>
+ ["Blog", "Changelog"].includes(title),
+ ).map(({ icon: Icon, title, description, href }) => (
+ <ContentLinkCard
+ key={href}
+ className="-mx-2"
+ href={createHref(
+ href,
+ domain,
+ getUtmParams({ domain, utm_content: title }),
+ )}
+ icon={
+ <div className="shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10">
+ <Icon className="size-4 text-neutral-600 transition-colors dark:text-white/60" />
+ </div>
+ }
+ title={title}
+ description={description}
+ />
+ ))}
+ </div>
</div>
</div>
);
diff --git a/packages/ui/src/nav/nav.tsx b/packages/ui/src/nav/nav.tsx
index 7742632061..486e9bb8f3 100644
--- a/packages/ui/src/nav/nav.tsx
+++ b/packages/ui/src/nav/nav.tsx
@@ -42,22 +42,31 @@ export const navItems = [
childItems: SOLUTIONS,
segments: ["/solutions", "/sdks"],
},
- {
- name: "Customers",
- href: "/customers",
- segments: ["/customers"],
- },
{
name: "Resources",
content: ResourcesContent,
childItems: RESOURCES,
- segments: ["/docs", "/help", "/brand", "/blog", "/changelog"],
+ segments: [
+ "/help",
+ "/docs",
+ "/about",
+ "/careers",
+ "/brand",
+ "/blog",
+ "/changelog",
+ "/contact",
+ ],
},
{
name: "Enterprise",
href: "/enterprise",
segments: ["/enterprise"],
},
+ {
+ name: "Customers",
+ href: "/customers",
+ segments: ["/customers"],
+ },
{
name: "Pricing",
href: "/pricing",