The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
added all bento cards and thumbnails
Steven Tey8c0655486829
diff --git a/app/dub.co/features/[slug]/page.tsx b/app/dub.co/features/[slug]/page.tsxindex a2a0cbcddd..6dd9aeef3f 100644--- a/app/dub.co/features/[slug]/page.tsx+++ b/app/dub.co/features/[slug]/page.tsx@@ -10,6 +10,8 @@ import DemoVideo from "./video";import MaxWidthWrapper from "@/components/shared/max-width-wrapper";import Link from "next/link";import { QRCodePicker } from "#/ui/modals/link-qr-modal";+import Image from "next/image";+import { getBlurDataURL } from "#/lib/images";export function generateMetadata({params,@@ -27,17 +29,32 @@ export function generateMetadata({});}-export default function FeaturePage({+export default async function FeaturePage({params,}: {params: {slug: string;};}) {- const data = FEATURES_LIST.find(({ slug }) => slug === params.slug);- if (!data) {+ const feature = FEATURES_LIST.find(({ slug }) => slug === params.slug);+ if (!feature) {notFound();}+ const data = {+ ...feature,+ thumbnailBlurhash: await getBlurDataURL(feature.thumbnail),+ bentoFeatures: feature.bentoFeatures+ ? await Promise.all(+ feature.bentoFeatures.map(async (feature) => ({+ ...feature,+ imageBlurhash: feature.image+ ? await getBlurDataURL(feature.image)+ : undefined,+ })),+ )+ : undefined,+ };+return (<><div className="mx-auto mt-12 max-w-md px-2.5 text-center sm:max-w-lg sm:px-0">@@ -67,6 +84,9 @@ export default function FeaturePage({<DemoVideo url={data.videoUrl} /><BlurImagesrc={data.thumbnail}+ placeholder="blur"+ blurDataURL={data.thumbnailBlurhash}+ priorityalt={data.title}width={1735}height={990}@@ -116,27 +136,43 @@ export default function FeaturePage({const BentoCard = ({title,description,+ image,+ imageBlurhash,href,}: {title: string;description: string;+ image?: string;+ imageBlurhash?: string;href?: string;}) => {const contents = (<divclassName={cn(- "relative h-[400px] overflow-hidden rounded-3xl border border-gray-200 bg-white/50 p-8 shadow backdrop-blur",+ "relative flex flex-col overflow-hidden rounded-3xl border border-gray-200 bg-white shadow",{"transition-all hover:shadow-lg": href,},)}>- {/* <img- src="/_static/features/analytics.svg"- alt="Analytics"- className="h-full w-full"- /> */}- <div className="absolute bottom-0 left-0 right-0 p-8">+ {image && (+ <div className="relative h-[250px]">+ <div className="absolute top-0 h-16 w-full bg-gradient-to-b from-white to-transparent" />+ <div className="absolute bottom-0 h-10 w-full bg-gradient-to-b from-transparent to-white" />+ <div className="absolute left-0 h-full w-16 bg-gradient-to-r from-white to-transparent" />+ <div className="absolute right-0 h-full w-16 bg-gradient-to-r from-transparent to-white" />+ <Image+ src={image}+ placeholder="blur"+ blurDataURL={imageBlurhash}+ alt={title}+ draggable={false}+ width={750}+ height={489}+ />+ </div>+ )}+ <div className="relative h-full bg-white p-8"><h3 className="text-xl font-semibold text-gray-700">{title}</h3><p className="mt-2 text-gray-500 [text-wrap:balance]">{description}</p></div>diff --git a/lib/constants/content.tsx b/lib/constants/content.tsxindex 6047fbde32..81538d0126 100644--- a/lib/constants/content.tsx+++ b/lib/constants/content.tsx@@ -123,11 +123,14 @@ export const FEATURES_LIST = [title: "Time-series data",description:"See how your links are performing over time with a beautiful time-series chart.",+ image:+ "https://d2vwwcvoksz7ty.cloudfront.net/features/time-series-data.png",},{title: "Geographic data",description:"Understand your audience with geographic data – on both a country and city level.",+ image: "https://d2vwwcvoksz7ty.cloudfront.net/features/geo-data.png",},{title: "Device data",@@ -154,7 +157,8 @@ export const FEATURES_LIST = ["Dub offers free and unlimited custom domains on all plans for you to create branded links that stand out.",icon: Airplay,slug: "branded-links",- thumbnail: "https://d2vwwcvoksz7ty.cloudfront.net/features/analytics.png",+ thumbnail:+ "https://d2vwwcvoksz7ty.cloudfront.net/features/branded-links.png",videoUrl:"https://www.youtube.com/embed/m062ApqcRow?si=8FRndy4ABWPTioHU&autoplay=1",bentoTitle: "Impress your audience with branded links",@@ -165,18 +169,21 @@ export const FEATURES_LIST = [title: "Unlimited custom domains",description:"Add as many custom domains as you want to your project at no extra cost.",+ image: "https://d2vwwcvoksz7ty.cloudfront.net/features/domains.png",href: "/help/article/how-to-add-custom-domain",},{- title: "Free SSL certificates",+ title: "Custom Social Media Cards",description:- "Dub automatically provisions and renews SSL certificates for your custom domains.",+ "Customize the title, description, and image of your links when shared on social media.",+ image:+ "https://d2vwwcvoksz7ty.cloudfront.net/features/social-cards.png",+ href: "/help/article/how-to-create-link#custom-social-media-cards?new",},{- title: "Vanity URLs",+ title: "Free SSL certificates",description:- "Create custom paths for your links to make them even more memorable.",- href: "/help/article/how-to-create-link",+ "Dub automatically provisions SSL certificates for your custom domains.",},{title: "Link cloaking",@@ -200,7 +207,7 @@ export const FEATURES_LIST = ["QR codes and short links are like peas in a pod. Dub offers free QR codes for every short link you create.",icon: QrCode,slug: "qr-codes",- thumbnail: "https://d2vwwcvoksz7ty.cloudfront.net/features/analytics.png",+ thumbnail: "https://d2vwwcvoksz7ty.cloudfront.net/features/qr-codes.png",videoUrl:"https://www.youtube.com/embed/m062ApqcRow?si=8FRndy4ABWPTioHU&autoplay=1",bentoTitle: "Gorgeous QR codes for your links",@@ -215,7 +222,8 @@ export const FEATURES_LIST = ["Customize your link's behavior with device targeting, geo targeting, link cloaking, and more.",icon: Link2,slug: "personalization",- thumbnail: "https://d2vwwcvoksz7ty.cloudfront.net/features/analytics.png",+ thumbnail:+ "https://d2vwwcvoksz7ty.cloudfront.net/features/personalization.png",videoUrl:"https://www.youtube.com/embed/m062ApqcRow?si=8FRndy4ABWPTioHU&autoplay=1",bentoTitle: "Optimize your links for every audience",@@ -226,12 +234,16 @@ export const FEATURES_LIST = [title: "Device targeting",description:"Redirect your audience to different destinations based on their device type (e.g. iOS/Android).",+ image:+ "https://d2vwwcvoksz7ty.cloudfront.net/features/device-targeting.png",href: "/help/article/how-to-create-link#device-targeting-ios--android",},{title: "Geo targeting",description:"Redirect your audience to different destinations based on their country of origin.",+ image:+ "https://d2vwwcvoksz7ty.cloudfront.net/features/geo-targeting.png",href: "/help/article/how-to-create-link#geo-targeting",},{@@ -263,7 +275,8 @@ export const FEATURES_LIST = ["Invite your teammates to collaborate on your links. For enterprises, Dub offers SAML SSO for better security.",icon: Users,slug: "collaboration",- thumbnail: "https://d2vwwcvoksz7ty.cloudfront.net/features/analytics.png",+ thumbnail:+ "https://d2vwwcvoksz7ty.cloudfront.net/features/collaboration.png",videoUrl:"https://www.youtube.com/embed/m062ApqcRow?si=8FRndy4ABWPTioHU&autoplay=1",bentoTitle: "Seamless collaboration for marketing teams",@@ -274,12 +287,14 @@ export const FEATURES_LIST = [title: "Unlimited teammates",description:"All paid plans come with unlimited teammates, so you can work with your team without worrying about extra costs.",+ image: "https://d2vwwcvoksz7ty.cloudfront.net/features/teammates.png",href: "/help/article/how-to-invite-teammates",},{title: "SAML SSO",description:"Dub offers SAML SSO for enterprises to provide better security and control over their projects.",+ image: "https://d2vwwcvoksz7ty.cloudfront.net/features/saml.png",href: "/help/category/saml-sso",},{diff --git a/public/_static/features/analytics.svg b/public/_static/features/analytics.svgdeleted file mode 100644index 0d069c944e..0000000000--- a/public/_static/features/analytics.svg+++ /dev/null@@ -1,30 +0,0 @@-<svg width="766" height="547" viewBox="0 0 766 547" fill="none" xmlns="http://www.w3.org/2000/svg">-<path d="M102.726 547H178.389C95.287 497.935 31.2353 420.035 0 327.066V429.818C27.2217 474.62 62.0632 514.28 102.726 547Z" fill="white"/>-<path d="M766 433.078V332.872C734.081 423.277 670.977 498.96 589.611 547H665.274C704.948 515.076 739.08 476.545 766 433.078Z" fill="white"/>-<path d="M666.867 547C705.801 515.495 739.373 477.624 766 434.972V547H666.867Z" fill="white"/>-<path d="M101.133 547C61.2178 514.7 26.9383 475.711 0 431.738V547H101.133Z" fill="white"/>-<path d="M295.338 547H180.363C95.9012 497.611 30.9775 418.438 0 323.89V72.11C8.26365 46.888 18.943 22.7601 31.7645 0H83.2928C45.8146 56.8043 24 124.855 24 198C24 366.227 139.389 507.503 295.338 547Z" fill="white"/>-<path d="M30.617 0C18.3713 21.8088 8.08604 44.8663 0 68.9337V0H30.617Z" fill="white"/>-<path d="M766 329.837V66.1633C758.039 43.0909 748.046 20.9652 736.235 0H684.707C722.185 56.8043 744 124.855 744 198C744 366.227 628.611 507.503 472.662 547H587.637C670.322 498.65 734.282 421.756 766 329.837Z" fill="white"/>-<path d="M766 0V63.1281C758.242 41.1538 748.641 20.0492 737.383 0H766Z" fill="white"/>-<path d="M299.505 547H468.495C625.993 509.005 743 367.167 743 198C743 124.822 721.105 56.757 683.508 0H628.811C672.102 53.9471 698 122.449 698 197C698 370.97 556.97 512 383 512C209.03 512 68 370.97 68 197C68 122.449 93.8983 53.9471 137.189 0H84.4917C46.8951 56.757 25 124.822 25 198C25 367.167 142.007 509.005 299.505 547Z" fill="white"/>-<path d="M383 511C556.417 511 697 370.417 697 197C697 122.397 670.983 53.8714 627.528 0H567.566C620.73 49.3108 654 119.77 654 198C654 347.117 533.117 468 384 468C234.883 468 114 347.117 114 198C114 119.77 147.27 49.3108 200.434 0H138.472C95.0168 53.8714 69 122.397 69 197C69 370.417 209.583 511 383 511Z" fill="white"/>-<path d="M653 198C653 346.565 532.565 467 384 467C235.435 467 115 346.565 115 198C115 119.671 148.479 49.1617 201.907 0H275.213C205.918 38.3477 159 112.195 159 197C159 321.264 259.736 422 384 422C508.264 422 609 321.264 609 197C609 112.195 562.082 38.3477 492.787 0H566.093C619.521 49.1617 653 119.671 653 198Z" fill="white"/>-<path d="M472 197C472 246.153 432.153 286 383 286C333.847 286 294 246.153 294 197C294 147.847 333.847 108 383 108C432.153 108 472 147.847 472 197Z" fill="white"/>-<path fill-rule="evenodd" clip-rule="evenodd" d="M384 332C458.006 332 518 272.006 518 198C518 123.994 458.006 64 384 64C309.994 64 250 123.994 250 198C250 272.006 309.994 332 384 332ZM473 197C473 246.706 432.706 287 383 287C333.294 287 293 246.706 293 197C293 147.294 333.294 107 383 107C432.706 107 473 147.294 473 197Z" fill="white"/>-<path fill-rule="evenodd" clip-rule="evenodd" d="M563 198C563 296.859 482.859 377 384 377C285.141 377 205 296.859 205 198C205 99.141 285.141 19 384 19C482.859 19 563 99.141 563 198ZM384 333C458.558 333 519 272.558 519 198C519 123.442 458.558 63 384 63C309.442 63 249 123.442 249 198C249 272.558 309.442 333 384 333Z" fill="white"/>-<path fill-rule="evenodd" clip-rule="evenodd" d="M384 421C507.712 421 608 320.712 608 197C608 111.922 560.568 37.9213 490.706 0H277.294C207.431 37.9213 160 111.922 160 197C160 320.712 260.288 421 384 421ZM564 198C564 297.411 483.411 378 384 378C284.589 378 204 297.411 204 198C204 98.5887 284.589 18 384 18C483.411 18 564 98.5887 564 198Z" fill="white"/>-<path d="M120 211C120 208.239 122.239 206 125 206H145C147.761 206 150 208.239 150 211V359H120V211Z" fill="#3957E3"/>-<path d="M162 135C162 132.239 164.239 130 167 130H187C189.761 130 192 132.239 192 135V359H162V135Z" fill="#3957E3"/>-<path d="M204 86C204 83.2386 206.239 81 209 81H229C231.761 81 234 83.2386 234 86V359H204V86Z" fill="#3957E3"/>-<path d="M246 301C246 298.239 248.239 296 251 296H271C273.761 296 276 298.239 276 301V359H246V301Z" fill="#3957E3"/>-<path d="M288 264C288 261.239 290.239 259 293 259H313C315.761 259 318 261.239 318 264V359H288V264Z" fill="#3957E3"/>-<path d="M330 286C330 283.239 332.239 281 335 281H355C357.761 281 360 283.239 360 286V359H330V286Z" fill="#3957E3"/>-<path d="M372 168C372 165.239 374.239 163 377 163H397C399.761 163 402 165.239 402 168V359H372V168Z" fill="#3957E3"/>-<path d="M414 189C414 186.239 416.239 184 419 184H439C441.761 184 444 186.239 444 189V359H414V189Z" fill="#3957E3"/>-<path d="M456 100C456 97.2386 458.239 95 461 95H481C483.761 95 486 97.2386 486 100V359H456V100Z" fill="#3957E3"/>-<path d="M498 234C498 231.239 500.239 229 503 229H523C525.761 229 528 231.239 528 234V359H498V234Z" fill="#3957E3"/>-<path d="M540 264C540 261.239 542.239 259 545 259H565C567.761 259 570 261.239 570 264V359H540V264Z" fill="#3957E3"/>-<path d="M582 189C582 186.239 584.239 184 587 184H607C609.761 184 612 186.239 612 189V359H582V189Z" fill="#3957E3"/>-<path d="M624 258C624 255.239 626.239 253 629 253H649C651.761 253 654 255.239 654 258V359H624V258Z" fill="#3957E3"/>-</svg>