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.

Add resources content

Tim Wilson0881896d8324
diff --git a/packages/ui/src/content.ts b/packages/ui/src/content.ts
index 60b248e9c8..300eba227d 100644
--- a/packages/ui/src/content.ts
+++ b/packages/ui/src/content.ts
@@ -1,7 +1,12 @@
import {
+ Blog,
+ Book2,
+ BulletList,
ChartLine,
Code,
Go,
+ Headset,
+ HexadecagonStar,
Hyperlink,
OfficeBuilding,
Paintbrush,
@@ -9,6 +14,7 @@ import {
Python,
QRCode,
Raycast,
+ Stars2,
Tinybird,
Typescript,
Users,
@@ -116,3 +122,36 @@ export const SDKS = [
href: "/solutions/go",
},
];
+
+export const RESOURCES = [
+ {
+ icon: Headset,
+ name: "Help Center",
+ href: "/help",
+ },
+ {
+ icon: Book2,
+ name: "Docs",
+ href: "/docs",
+ },
+ {
+ icon: Blog,
+ name: "Blog",
+ href: "/blog",
+ },
+ {
+ icon: BulletList,
+ name: "Changelog",
+ href: "/changelog",
+ },
+ {
+ icon: Stars2,
+ name: "Customers",
+ href: "/customers",
+ },
+ {
+ icon: HexadecagonStar,
+ name: "Brand",
+ href: "/brand",
+ },
+];
diff --git a/packages/ui/src/icons/nucleo/blog.tsx b/packages/ui/src/icons/nucleo/blog.tsx
new file mode 100644
index 0000000000..4b455d6a54
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/blog.tsx
@@ -0,0 +1,59 @@
+import { SVGProps } from "react";
+
+export function Blog(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" {...props}>
+ <g fill="currentColor">
+ <path
+ d="M14.25,12.25v2c0,1.105-.895,2-2,2H3.75c-1.105,0-2-.895-2-2V3.75c0-1.105,.895-2,2-2H12.25c1.105,0,2,.895,2,2v1.5"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <path
+ d="M12.375,10.625c.444-.444,2.948-2.948,4.216-4.216,.483-.483,.478-1.261-.005-1.745h0c-.483-.483-1.261-.489-1.745-.005-1.268,1.268-3.772,3.772-4.216,4.216-.625,.625-1.125,2.875-1.125,2.875,0,0,2.25-.5,2.875-1.125Z"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="4.75"
+ x2="9.25"
+ y1="5.75"
+ y2="5.75"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="4.75"
+ x2="7"
+ y1="8.75"
+ y2="8.75"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="4.75"
+ x2="6.25"
+ y1="11.75"
+ y2="11.75"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/nucleo/book2.tsx b/packages/ui/src/icons/nucleo/book2.tsx
new file mode 100644
index 0000000000..3068fb9877
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/book2.tsx
@@ -0,0 +1,59 @@
+import { SVGProps } from "react";
+
+export function Book2(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" {...props}>
+ <g fill="currentColor">
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="5.75"
+ x2="5.75"
+ y1="1.75"
+ y2="12.75"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="8.75"
+ x2="12.25"
+ y1="5.25"
+ y2="5.25"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="8.75"
+ x2="12.25"
+ y1="8.25"
+ y2="8.25"
+ />
+ <path
+ d="M2.75,14.5V3.75c0-1.105,.895-2,2-2H15.25V12.75"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <path
+ d="M5.25,16.25h-.75c-.966,0-1.75-.783-1.75-1.75s.784-1.75,1.75-1.75H15.25c-.641,.844-.734,2.547,0,3.5H5.25Z"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/nucleo/bullet-list.tsx b/packages/ui/src/icons/nucleo/bullet-list.tsx
new file mode 100644
index 0000000000..4ea2af2bea
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/bullet-list.tsx
@@ -0,0 +1,74 @@
+import { SVGProps } from "react";
+
+export function BulletList(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" {...props}>
+ <g fill="currentColor">
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="8.25"
+ x2="15.75"
+ y1="11.25"
+ y2="11.25"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="8.25"
+ x2="15.75"
+ y1="14.75"
+ y2="14.75"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="8.25"
+ x2="15.75"
+ y1="4.25"
+ y2="4.25"
+ />
+ <line
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ x1="8.25"
+ x2="15.75"
+ y1="7.75"
+ y2="7.75"
+ />
+ <circle
+ cx="3.75"
+ cy="4.25"
+ fill="none"
+ r="1.5"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <circle
+ cx="3.75"
+ cy="11.25"
+ fill="none"
+ r="1.5"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/nucleo/headset.tsx b/packages/ui/src/icons/nucleo/headset.tsx
new file mode 100644
index 0000000000..7012e37f01
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/headset.tsx
@@ -0,0 +1,26 @@
+import { SVGProps } from "react";
+
+export function Headset(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" {...props}>
+ <g fill="currentColor">
+ <path
+ d="M13,13.25l-.342,1.447c-.208,.909-1.017,1.553-1.949,1.553h-1.959"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <path
+ d="M3.75,7.353l-1.123,.567c-.813,.411-1.246,1.319-1.053,2.209l.335,1.545c.199,.92,1.013,1.576,1.955,1.576h1.137s-1.084-5-1.084-5c-.099-.403-.166-.817-.166-1.25,0-2.899,2.351-5.25,5.25-5.25s5.25,2.351,5.25,5.25c0,.433-.067,.847-.166,1.25l-1.084,5h1.137c.941,0,1.755-.656,1.955-1.576l.335-1.545c.193-.89-.24-1.799-1.053-2.209l-1.123-.567"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/nucleo/hexadecagon-star.tsx b/packages/ui/src/icons/nucleo/hexadecagon-star.tsx
new file mode 100644
index 0000000000..d90375d587
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/hexadecagon-star.tsx
@@ -0,0 +1,23 @@
+import { SVGProps } from "react";
+
+export function HexadecagonStar(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" {...props}>
+ <g fill="currentColor">
+ <path
+ d="M12.606,7.655c-.044-.136-.161-.235-.302-.255l-2.051-.298-.917-1.858c-.127-.256-.546-.256-.673,0l-.917,1.858-2.051,.298c-.141,.021-.258,.12-.302,.255-.044,.136-.007,.285,.095,.384l1.484,1.446-.351,2.042c-.024,.141,.034,.283,.149,.367s.269,.094,.395,.029l1.834-.964,1.834,.964c.055,.029,.115,.043,.174,.043,.078,0,.155-.024,.221-.072,.115-.084,.173-.226,.149-.367l-.351-2.042,1.484-1.446c.102-.1,.139-.249,.095-.384Z"
+ fill="currentColor"
+ stroke="none"
+ />
+ <path
+ d="M15.718,8.293l-1.468-1.468v-2.075c0-.552-.448-1-1-1h-2.075l-1.468-1.468c-.391-.39-1.024-.39-1.414,0l-1.468,1.468h-2.075c-.552,0-1,.448-1,1v2.075l-1.468,1.468c-.391,.39-.391,1.024,0,1.414l1.468,1.468v2.075c0,.552,.448,1,1,1h2.075l1.468,1.468c.391,.39,1.024,.39,1.414,0l1.468-1.468h2.075c.552,0,1-.448,1-1v-2.075l1.468-1.468c.391-.39,.391-1.024,0-1.414Z"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/icons/nucleo/index.ts b/packages/ui/src/icons/nucleo/index.ts
index 5b935c687f..990943e364 100644
--- a/packages/ui/src/icons/nucleo/index.ts
+++ b/packages/ui/src/icons/nucleo/index.ts
@@ -1,3 +1,6 @@
+export * from "./blog";
+export * from "./book2";
+export * from "./bullet-list";
export * from "./chart-line";
export * from "./code";
export * from "./crosshairs";
@@ -10,6 +13,8 @@ export * from "./flag-wavy";
export * from "./gaming-console";
export * from "./gear";
export * from "./globe";
+export * from "./headset";
+export * from "./hexadecagon-star";
export * from "./hyperlink";
export * from "./invoice-dollar";
export * from "./mobile-phone";
@@ -18,6 +23,7 @@ export * from "./paintbrush";
export * from "./qrcode";
export * from "./referred-via";
export * from "./sliders";
+export * from "./stars2";
export * from "./tablet";
export * from "./tag";
export * from "./tv";
diff --git a/packages/ui/src/icons/nucleo/stars2.tsx b/packages/ui/src/icons/nucleo/stars2.tsx
new file mode 100644
index 0000000000..ed78aa7ba9
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/stars2.tsx
@@ -0,0 +1,34 @@
+import { SVGProps } from "react";
+
+export function Stars2(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" {...props}>
+ <g fill="currentColor">
+ <polyline
+ fill="none"
+ points="10.852 3.842 12.323 3.628 13.25 1.75 14.177 3.628 16.25 3.93 14.75 5.392 15.025 6.995"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <polyline
+ fill="none"
+ points="7.148 3.842 5.677 3.628 4.75 1.75 3.823 3.628 1.75 3.93 3.25 5.392 2.975 6.995"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <polygon
+ fill="none"
+ points="9 5.739 10.545 8.87 14 9.372 11.5 11.809 12.09 15.25 9 13.625 5.91 15.25 6.5 11.809 4 9.372 7.455 8.87 9 5.739"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ </g>
+ </svg>
+ );
+}
diff --git a/packages/ui/src/nav/content/resources-content.tsx b/packages/ui/src/nav/content/resources-content.tsx
new file mode 100644
index 0000000000..d1ccaf159e
--- /dev/null
+++ b/packages/ui/src/nav/content/resources-content.tsx
@@ -0,0 +1,39 @@
+import { ALL_TOOLS, cn } from "@dub/utils";
+import Link from "next/link";
+import { RESOURCES } from "../../content";
+import { ContentProps, createHref } from "../shared";
+import { ContentLinkCard, contentHeadingClassName } from "./shared";
+
+export function ResourcesContent({ domain }: ContentProps) {
+ return (
+ <div className="grid w-[32rem] grid-cols-2">
+ <div className="border-l border-gray-200 p-5">
+ <p className={cn(contentHeadingClassName, "mb-2")}>Tools</p>
+ <div className="flex flex-col gap-2">
+ {ALL_TOOLS.map(({ name, slug }) => (
+ <Link
+ key={slug}
+ href={createHref(`/tools/${slug}`, domain)}
+ title={name}
+ className="block text-sm font-medium text-gray-500 transition-colors hover:text-gray-700"
+ >
+ {name}
+ </Link>
+ ))}
+ </div>
+ </div>
+ <div className="p-5">
+ <p className={cn(contentHeadingClassName, "mb-2")}>Resources</p>
+ <div className="-mx-2 flex flex-col gap-0.5">
+ {RESOURCES.map(({ icon: Icon, name, href }) => (
+ <ContentLinkCard
+ href={createHref(href, domain)}
+ icon={<Icon className={cn("h-5 w-5 shrink-0 text-gray-600")} />}
+ title={name}
+ />
+ ))}
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/packages/ui/src/nav/nav.tsx b/packages/ui/src/nav/nav.tsx
index 31d3748f46..365787def0 100644
--- a/packages/ui/src/nav/nav.tsx
+++ b/packages/ui/src/nav/nav.tsx
@@ -12,6 +12,7 @@ import { useScroll } from "../hooks";
import { MaxWidthWrapper } from "../max-width-wrapper";
import { NavLogo } from "../nav-logo";
import { ProductContent } from "./content/product-content";
+import { ResourcesContent } from "./content/resources-content";
import { SolutionsContent } from "./content/solutions-content";
import { createHref } from "./shared";
@@ -37,6 +38,7 @@ const navItems = [
},
{
name: "Resources",
+ content: ResourcesContent,
},
];