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 program overview UI to match embed

Tim Wilson998036f28aef
diff --git a/apps/web/app/app.dub.co/embed/inline/hero-background.tsx b/apps/web/app/app.dub.co/embed/inline/hero-background.tsx
deleted file mode 100644
index a1712cb33e..0000000000
--- a/apps/web/app/app.dub.co/embed/inline/hero-background.tsx
+++ /dev/null
@@ -1,333 +0,0 @@
-"use client";
-
-import { BlurImage } from "@dub/ui";
-import { cn } from "@dub/utils";
-import { CSSProperties, useId } from "react";
-
-export function HeroBackground({
- logo,
- color,
-}: {
- logo?: string | null;
- color?: string | null;
-}) {
- const id = useId();
-
- return (
- <div
- className="absolute inset-0 isolate -z-[1] overflow-hidden bg-neutral-50 [container-type:size]"
- style={
- {
- color: color || "#737373",
- "--brand": color || "#737373",
- "--brand-dark": "oklch(from var(--brand) 0.38 min(c, 0.17) h)",
- } as CSSProperties
- }
- >
- <div className="absolute inset-0 [mask-image:linear-gradient(90deg,transparent_40%,black)]">
- {color ? (
- <div className="absolute inset-0 bg-current opacity-10" />
- ) : (
- <RainbowGradient className="opacity-15" />
- )}
- </div>
-
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="718"
- height="258"
- fill="none"
- viewBox="0 0 718 258"
- className="pointer-events-none absolute right-0 top-0 hidden h-full w-auto md:block"
- >
- <mask
- id={`${id}-grid-mask`}
- width="100%"
- height="100%"
- x="0"
- y="0"
- maskUnits="userSpaceOnUse"
- style={{ maskType: "alpha" }}
- >
- <rect width="100%" height="100%" fill={`url(#${id}-c)`} />
- </mask>
- <rect
- fill={`url(#${id}-grid)`}
- mask={`url(#${id}-grid-mask)`}
- width="100%"
- height="100%"
- />
- <g clipPath={`url(#${id}-a)`}>
- <g filter={`url(#${id}-d)`}>
- <path
- fill={`url(#${id}-e)`}
- d="M478 65c0-8.837 7.163-16 16-16h128c8.837 0 16 7.163 16 16v128c0 8.837-7.163 16-16 16H494c-8.837 0-16-7.163-16-16z"
- />
- </g>
- <path
- stroke="#000"
- strokeOpacity="0.06"
- strokeWidth="0.75"
- d="M478 65c0-8.837 7.163-16 16-16h128c8.837 0 16 7.163 16 16v128c0 8.837-7.163 16-16 16H494c-8.837 0-16-7.163-16-16z"
- />
- <mask
- id={`${id}-h`}
- width="319"
- height="319"
- x="398"
- y="-30"
- maskUnits="userSpaceOnUse"
- style={{ maskType: "alpha" }}
- >
- <circle cx="557.5" cy="129.5" r="159.5" fill={`url(#${id}-g)`} />
- </mask>
- <g mask={`url(#${id}-h)`}>
- <g filter={`url(#${id}-i)`}>
- <rect
- width="40"
- height="40"
- x="418"
- y="29"
- fill={`url(#${id}-j)`}
- rx="8"
- />
- <rect
- width="40"
- height="40"
- x="418"
- y="29"
- stroke="#000"
- strokeOpacity="0.06"
- strokeWidth="0.75"
- rx="8"
- />
- <g
- stroke="#737373"
- strokeLinecap="round"
- strokeLinejoin="round"
- strokeWidth="1.5"
- opacity="0.2"
- >
- <path d="M438 51.222a2.222 2.222 0 1 0 0-4.444 2.222 2.222 0 0 0 0 4.444" />
- <path d="M429.944 54.278V43.722c2.663 1.194 5.076 1.357 8.056 0s5.393-1.389 8.056 0v10.556c-2.663-1.39-5.076-1.357-8.056 0s-5.393 1.193-8.056 0" />
- </g>
- </g>
- <g filter={`url(#${id}-k)`}>
- <rect
- width="40"
- height="40"
- x="658"
- y="189"
- fill={`url(#${id}-l)`}
- rx="8"
- />
- <rect
- width="40"
- height="40"
- x="658"
- y="189"
- stroke="#000"
- strokeOpacity="0.06"
- strokeWidth="0.75"
- rx="8"
- />
- <g
- stroke="#737373"
- strokeLinecap="round"
- strokeLinejoin="round"
- strokeWidth="1.5"
- opacity="0.2"
- >
- <path d="M678 209.917a2.445 2.445 0 1 0-.001-4.89 2.445 2.445 0 0 0 .001 4.89M673.265 216.639a4.89 4.89 0 0 1 4.735-3.667 4.89 4.89 0 0 1 4.735 3.667" />
- <path d="M685.639 208.389v5.805a2.444 2.444 0 0 1-2.445 2.445h-10.388a2.444 2.444 0 0 1-2.445-2.445v-10.388a2.444 2.444 0 0 1 2.445-2.445h5.805M685.028 198.917v6.111M688.083 201.972h-6.111" />
- </g>
- </g>
- </g>
- </g>
- <defs>
- <filter
- id={`${id}-d`}
- width="160.75"
- height="160.75"
- x="477.625"
- y="48.625"
- colorInterpolationFilters="sRGB"
- filterUnits="userSpaceOnUse"
- >
- <feFlood floodOpacity="0" result="BackgroundImageFix" />
- <feBlend
- in="SourceGraphic"
- in2="BackgroundImageFix"
- result="shape"
- />
- <feColorMatrix
- in="SourceAlpha"
- result="hardAlpha"
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
- />
- <feOffset />
- <feGaussianBlur stdDeviation="6" />
- <feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic" />
- <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0" />
- <feBlend in2="shape" result="effect1_innerShadow_21_5513" />
- </filter>
- <filter
- id={`${id}-i`}
- width="40.75"
- height="40.75"
- x="417.625"
- y="28.625"
- colorInterpolationFilters="sRGB"
- filterUnits="userSpaceOnUse"
- >
- <feFlood floodOpacity="0" result="BackgroundImageFix" />
- <feBlend
- in="SourceGraphic"
- in2="BackgroundImageFix"
- result="shape"
- />
- <feColorMatrix
- in="SourceAlpha"
- result="hardAlpha"
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
- />
- <feOffset />
- <feGaussianBlur stdDeviation="6" />
- <feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic" />
- <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0" />
- <feBlend in2="shape" result="effect1_innerShadow_21_5513" />
- </filter>
- <filter
- id={`${id}-k`}
- width="40.75"
- height="40.75"
- x="657.625"
- y="188.625"
- colorInterpolationFilters="sRGB"
- filterUnits="userSpaceOnUse"
- >
- <feFlood floodOpacity="0" result="BackgroundImageFix" />
- <feBlend
- in="SourceGraphic"
- in2="BackgroundImageFix"
- result="shape"
- />
- <feColorMatrix
- in="SourceAlpha"
- result="hardAlpha"
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
- />
- <feOffset />
- <feGaussianBlur stdDeviation="6" />
- <feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic" />
- <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0" />
- <feBlend in2="shape" result="effect1_innerShadow_21_5513" />
- </filter>
- <linearGradient id={`${id}-c`} gradientUnits="userSpaceOnUse">
- <stop offset="0" stopColor="#000" stopOpacity="0" />
- <stop offset="1" stopColor="#000" stopOpacity="1" />
- </linearGradient>
- <linearGradient
- id={`${id}-e`}
- x1="558"
- x2="558"
- y1="209"
- y2="49"
- gradientUnits="userSpaceOnUse"
- >
- <stop stopColor="#fff" stopOpacity="0.23" />
- <stop offset="1" stopColor="#fff" stopOpacity="0.3" />
- </linearGradient>
- <linearGradient
- id={`${id}-j`}
- x1="438"
- x2="438"
- y1="69"
- y2="29"
- gradientUnits="userSpaceOnUse"
- >
- <stop stopColor="#fff" stopOpacity="0.23" />
- <stop offset="1" stopColor="#fff" stopOpacity="0.3" />
- </linearGradient>
- <linearGradient
- id={`${id}-l`}
- x1="678"
- x2="678"
- y1="229"
- y2="189"
- gradientUnits="userSpaceOnUse"
- >
- <stop stopColor="#fff" stopOpacity="0.23" />
- <stop offset="1" stopColor="#fff" stopOpacity="0.3" />
- </linearGradient>
- <radialGradient
- id={`${id}-g`}
- cx="0"
- cy="0"
- r="1"
- gradientTransform="rotate(90 214 343.5)scale(159.5)"
- gradientUnits="userSpaceOnUse"
- >
- <stop offset="0.73" stopColor="#fff" />
- <stop offset="1" stopColor="#fff" stopOpacity="0" />
- </radialGradient>
- <clipPath id={`${id}-a`}>
- <path fill="#fff" d="M0 0h718v258H0z" />
- </clipPath>
- <pattern
- id={`${id}-grid`}
- x={-2.25}
- y={9}
- width={20}
- height={20}
- patternUnits="userSpaceOnUse"
- >
- <path
- d={`M 20 0 L 0 0 0 20`}
- fill="transparent"
- stroke="currentColor"
- strokeOpacity={0.2}
- strokeWidth={1}
- />
- </pattern>
- </defs>
- </svg>
-
- <div className="absolute inset-0 mix-blend-soft-light [mask-image:linear-gradient(90deg,transparent_40%,black)]">
- {color ? (
- <div className="absolute inset-0 bg-current" />
- ) : (
- <RainbowGradient />
- )}
- </div>
-
- <div
- className={cn(
- "absolute right-4 top-4 block size-6 min-[300px]:size-8",
-
- // Position based on cqh to adjust for container height
- "md:right-[62cqh] md:top-1/2 md:size-[32cqh] md:-translate-y-1/2 md:translate-x-1/2",
-
- "drop-shadow-[0_0_15px_rgb(from_var(--brand-dark,#000)_r_g_b/0.4)]",
- )}
- >
- {logo && (
- <BlurImage
- src={logo}
- alt="Program Logo"
- fill
- className="absolute object-cover object-center"
- />
- )}
- </div>
- </div>
- );
-}
-
-function RainbowGradient({ className }: { className?: string }) {
- return (
- <div className={cn("absolute inset-0 saturate-[1.5]", className)}>
- <div className="absolute right-[62cqh] top-1/2 aspect-square h-[200%] -translate-y-1/2 translate-x-1/2 rounded-full bg-[conic-gradient(from_-66deg_at_50%_50%,#855AFC_-32deg,#f00_63deg,#EAB308_158deg,#5CFF80_240deg,#855AFC_328deg,#f00_423deg)] blur-[50px]" />
- </div>
- );
-}
diff --git a/apps/web/app/app.dub.co/embed/inline/loading.tsx b/apps/web/app/app.dub.co/embed/inline/loading.tsx
index 58ca3ab031..fb92714d2e 100644
--- a/apps/web/app/app.dub.co/embed/inline/loading.tsx
+++ b/apps/web/app/app.dub.co/embed/inline/loading.tsx
@@ -1,13 +1,12 @@
+import { HeroBackground } from "@/ui/partners/hero-background";
import { Button, Copy, MoneyBill, Wordmark } from "@dub/ui";
-import { HeroBackground } from "./hero-background";
export default function EmbedInlineLoading() {
- const tabs = ["Quickstart", "Sales", "Leaderboard", "FAQ"];
return (
<div className="flex min-h-screen flex-col">
<div className="p-5">
<div className="relative flex flex-col overflow-hidden rounded-lg border border-neutral-300 p-4 md:p-6">
- <HeroBackground />
+ <HeroBackground color="#737373" />
<span className="flex items-center gap-2 text-sm text-neutral-500">
<MoneyBill className="size-4" />
Refer and earn
diff --git a/apps/web/app/app.dub.co/embed/inline/page-client.tsx b/apps/web/app/app.dub.co/embed/inline/page-client.tsx
index cec06334bf..0c21c42253 100644
--- a/apps/web/app/app.dub.co/embed/inline/page-client.tsx
+++ b/apps/web/app/app.dub.co/embed/inline/page-client.tsx
@@ -1,6 +1,7 @@
"use client";
import { DiscountProps } from "@/lib/types";
+import { HeroBackground } from "@/ui/partners/hero-background";
import { ProgramCommissionDescription } from "@/ui/partners/program-commission-description";
import { Link, PayoutStatus, Program } from "@dub/prisma/client";
import {
@@ -18,7 +19,6 @@ import { CSSProperties, useState } from "react";
import { LinkToken } from "../token";
import { EmbedActivity } from "./activity";
import { EmbedFAQ } from "./faq";
-import { HeroBackground } from "./hero-background";
import { EmbedLeaderboard } from "./leaderboard";
import { EmbedPayouts } from "./payouts";
import { EmbedQuickstart } from "./quickstart";
diff --git a/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/page-client.tsx b/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/page-client.tsx
index 341f2fed02..3511e77177 100644
--- a/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/page-client.tsx
+++ b/apps/web/app/partners.dub.co/(dashboard)/programs/[programSlug]/page-client.tsx
@@ -60,7 +60,7 @@ export default function ProgramPageClient() {
return (
<MaxWidthWrapper className="pb-10">
- <div className="relative flex flex-col rounded-lg border border-neutral-300 bg-gradient-to-r from-neutral-50 p-4 md:p-6">
+ <div className="relative z-0 flex flex-col overflow-hidden rounded-lg border border-neutral-300 p-4 md:p-6">
{program && (
<HeroBackground logo={program.logo} color={program.brandColor} />
)}
diff --git a/apps/web/ui/partners/hero-background.tsx b/apps/web/ui/partners/hero-background.tsx
index 17bfe4e5b7..a1712cb33e 100644
--- a/apps/web/ui/partners/hero-background.tsx
+++ b/apps/web/ui/partners/hero-background.tsx
@@ -1,5 +1,8 @@
+"use client";
+
import { BlurImage } from "@dub/ui";
-import Image from "next/image";
+import { cn } from "@dub/utils";
+import { CSSProperties, useId } from "react";
export function HeroBackground({
logo,
@@ -8,42 +11,323 @@ export function HeroBackground({
logo?: string | null;
color?: string | null;
}) {
- const heroGradient = color
- ? `conic-gradient(from 45deg at 65% 70%, ${color} 0deg, ${color} 72deg, ${color} 144deg, ${color} 197.89deg, ${color} 260.96deg, ${color} 360deg)`
- : "conic-gradient(from 45deg at 65% 70%, #855AFC 0deg, #3A8BFD 72deg, #00FFF9 144deg, #5CFF80 197.89deg, #EAB308 260.96deg, #FF0000 360deg)";
+ const id = useId();
return (
- <div className="animate-fade-in pointer-events-none absolute inset-0 overflow-hidden [mask-image:radial-gradient(100%_100%_at_top_right,black,transparent)] max-[350px]:opacity-50 sm:[mask-image:linear-gradient(to_right,transparent_50%,black_70%)]">
- <div className="absolute -right-[60px] top-[40px] isolate w-[600px] -translate-y-1/2 overflow-hidden bg-white sm:-right-[60px] sm:top-1/2 sm:w-[1200px] md:right-0">
- <div
- className="absolute -inset-[50%] opacity-15 blur-[100px]"
- style={{
- backgroundImage: heroGradient,
- }}
- />
- <Image
- src="https://assets.dub.co/misc/referrals-hero-background.svg"
- alt="Refer and earn"
- width={1200}
- height={630}
- className="relative"
- />
- <div
- className="absolute -inset-[50%] mix-blend-soft-light blur-[100px]"
- style={{
- backgroundImage: heroGradient,
- }}
+ <div
+ className="absolute inset-0 isolate -z-[1] overflow-hidden bg-neutral-50 [container-type:size]"
+ style={
+ {
+ color: color || "#737373",
+ "--brand": color || "#737373",
+ "--brand-dark": "oklch(from var(--brand) 0.38 min(c, 0.17) h)",
+ } as CSSProperties
+ }
+ >
+ <div className="absolute inset-0 [mask-image:linear-gradient(90deg,transparent_40%,black)]">
+ {color ? (
+ <div className="absolute inset-0 bg-current opacity-10" />
+ ) : (
+ <RainbowGradient className="opacity-15" />
+ )}
+ </div>
+
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="718"
+ height="258"
+ fill="none"
+ viewBox="0 0 718 258"
+ className="pointer-events-none absolute right-0 top-0 hidden h-full w-auto md:block"
+ >
+ <mask
+ id={`${id}-grid-mask`}
+ width="100%"
+ height="100%"
+ x="0"
+ y="0"
+ maskUnits="userSpaceOnUse"
+ style={{ maskType: "alpha" }}
+ >
+ <rect width="100%" height="100%" fill={`url(#${id}-c)`} />
+ </mask>
+ <rect
+ fill={`url(#${id}-grid)`}
+ mask={`url(#${id}-grid-mask)`}
+ width="100%"
+ height="100%"
/>
+ <g clipPath={`url(#${id}-a)`}>
+ <g filter={`url(#${id}-d)`}>
+ <path
+ fill={`url(#${id}-e)`}
+ d="M478 65c0-8.837 7.163-16 16-16h128c8.837 0 16 7.163 16 16v128c0 8.837-7.163 16-16 16H494c-8.837 0-16-7.163-16-16z"
+ />
+ </g>
+ <path
+ stroke="#000"
+ strokeOpacity="0.06"
+ strokeWidth="0.75"
+ d="M478 65c0-8.837 7.163-16 16-16h128c8.837 0 16 7.163 16 16v128c0 8.837-7.163 16-16 16H494c-8.837 0-16-7.163-16-16z"
+ />
+ <mask
+ id={`${id}-h`}
+ width="319"
+ height="319"
+ x="398"
+ y="-30"
+ maskUnits="userSpaceOnUse"
+ style={{ maskType: "alpha" }}
+ >
+ <circle cx="557.5" cy="129.5" r="159.5" fill={`url(#${id}-g)`} />
+ </mask>
+ <g mask={`url(#${id}-h)`}>
+ <g filter={`url(#${id}-i)`}>
+ <rect
+ width="40"
+ height="40"
+ x="418"
+ y="29"
+ fill={`url(#${id}-j)`}
+ rx="8"
+ />
+ <rect
+ width="40"
+ height="40"
+ x="418"
+ y="29"
+ stroke="#000"
+ strokeOpacity="0.06"
+ strokeWidth="0.75"
+ rx="8"
+ />
+ <g
+ stroke="#737373"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ opacity="0.2"
+ >
+ <path d="M438 51.222a2.222 2.222 0 1 0 0-4.444 2.222 2.222 0 0 0 0 4.444" />
+ <path d="M429.944 54.278V43.722c2.663 1.194 5.076 1.357 8.056 0s5.393-1.389 8.056 0v10.556c-2.663-1.39-5.076-1.357-8.056 0s-5.393 1.193-8.056 0" />
+ </g>
+ </g>
+ <g filter={`url(#${id}-k)`}>
+ <rect
+ width="40"
+ height="40"
+ x="658"
+ y="189"
+ fill={`url(#${id}-l)`}
+ rx="8"
+ />
+ <rect
+ width="40"
+ height="40"
+ x="658"
+ y="189"
+ stroke="#000"
+ strokeOpacity="0.06"
+ strokeWidth="0.75"
+ rx="8"
+ />
+ <g
+ stroke="#737373"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ opacity="0.2"
+ >
+ <path d="M678 209.917a2.445 2.445 0 1 0-.001-4.89 2.445 2.445 0 0 0 .001 4.89M673.265 216.639a4.89 4.89 0 0 1 4.735-3.667 4.89 4.89 0 0 1 4.735 3.667" />
+ <path d="M685.639 208.389v5.805a2.444 2.444 0 0 1-2.445 2.445h-10.388a2.444 2.444 0 0 1-2.445-2.445v-10.388a2.444 2.444 0 0 1 2.445-2.445h5.805M685.028 198.917v6.111M688.083 201.972h-6.111" />
+ </g>
+ </g>
+ </g>
+ </g>
+ <defs>
+ <filter
+ id={`${id}-d`}
+ width="160.75"
+ height="160.75"
+ x="477.625"
+ y="48.625"
+ colorInterpolationFilters="sRGB"
+ filterUnits="userSpaceOnUse"
+ >
+ <feFlood floodOpacity="0" result="BackgroundImageFix" />
+ <feBlend
+ in="SourceGraphic"
+ in2="BackgroundImageFix"
+ result="shape"
+ />
+ <feColorMatrix
+ in="SourceAlpha"
+ result="hardAlpha"
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
+ />
+ <feOffset />
+ <feGaussianBlur stdDeviation="6" />
+ <feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic" />
+ <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0" />
+ <feBlend in2="shape" result="effect1_innerShadow_21_5513" />
+ </filter>
+ <filter
+ id={`${id}-i`}
+ width="40.75"
+ height="40.75"
+ x="417.625"
+ y="28.625"
+ colorInterpolationFilters="sRGB"
+ filterUnits="userSpaceOnUse"
+ >
+ <feFlood floodOpacity="0" result="BackgroundImageFix" />
+ <feBlend
+ in="SourceGraphic"
+ in2="BackgroundImageFix"
+ result="shape"
+ />
+ <feColorMatrix
+ in="SourceAlpha"
+ result="hardAlpha"
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
+ />
+ <feOffset />
+ <feGaussianBlur stdDeviation="6" />
+ <feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic" />
+ <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0" />
+ <feBlend in2="shape" result="effect1_innerShadow_21_5513" />
+ </filter>
+ <filter
+ id={`${id}-k`}
+ width="40.75"
+ height="40.75"
+ x="657.625"
+ y="188.625"
+ colorInterpolationFilters="sRGB"
+ filterUnits="userSpaceOnUse"
+ >
+ <feFlood floodOpacity="0" result="BackgroundImageFix" />
+ <feBlend
+ in="SourceGraphic"
+ in2="BackgroundImageFix"
+ result="shape"
+ />
+ <feColorMatrix
+ in="SourceAlpha"
+ result="hardAlpha"
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
+ />
+ <feOffset />
+ <feGaussianBlur stdDeviation="6" />
+ <feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic" />
+ <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0" />
+ <feBlend in2="shape" result="effect1_innerShadow_21_5513" />
+ </filter>
+ <linearGradient id={`${id}-c`} gradientUnits="userSpaceOnUse">
+ <stop offset="0" stopColor="#000" stopOpacity="0" />
+ <stop offset="1" stopColor="#000" stopOpacity="1" />
+ </linearGradient>
+ <linearGradient
+ id={`${id}-e`}
+ x1="558"
+ x2="558"
+ y1="209"
+ y2="49"
+ gradientUnits="userSpaceOnUse"
+ >
+ <stop stopColor="#fff" stopOpacity="0.23" />
+ <stop offset="1" stopColor="#fff" stopOpacity="0.3" />
+ </linearGradient>
+ <linearGradient
+ id={`${id}-j`}
+ x1="438"
+ x2="438"
+ y1="69"
+ y2="29"
+ gradientUnits="userSpaceOnUse"
+ >
+ <stop stopColor="#fff" stopOpacity="0.23" />
+ <stop offset="1" stopColor="#fff" stopOpacity="0.3" />
+ </linearGradient>
+ <linearGradient
+ id={`${id}-l`}
+ x1="678"
+ x2="678"
+ y1="229"
+ y2="189"
+ gradientUnits="userSpaceOnUse"
+ >
+ <stop stopColor="#fff" stopOpacity="0.23" />
+ <stop offset="1" stopColor="#fff" stopOpacity="0.3" />
+ </linearGradient>
+ <radialGradient
+ id={`${id}-g`}
+ cx="0"
+ cy="0"
+ r="1"
+ gradientTransform="rotate(90 214 343.5)scale(159.5)"
+ gradientUnits="userSpaceOnUse"
+ >
+ <stop offset="0.73" stopColor="#fff" />
+ <stop offset="1" stopColor="#fff" stopOpacity="0" />
+ </radialGradient>
+ <clipPath id={`${id}-a`}>
+ <path fill="#fff" d="M0 0h718v258H0z" />
+ </clipPath>
+ <pattern
+ id={`${id}-grid`}
+ x={-2.25}
+ y={9}
+ width={20}
+ height={20}
+ patternUnits="userSpaceOnUse"
+ >
+ <path
+ d={`M 20 0 L 0 0 0 20`}
+ fill="transparent"
+ stroke="currentColor"
+ strokeOpacity={0.2}
+ strokeWidth={1}
+ />
+ </pattern>
+ </defs>
+ </svg>
+
+ <div className="absolute inset-0 mix-blend-soft-light [mask-image:linear-gradient(90deg,transparent_40%,black)]">
+ {color ? (
+ <div className="absolute inset-0 bg-current" />
+ ) : (
+ <RainbowGradient />
+ )}
+ </div>
+
+ <div
+ className={cn(
+ "absolute right-4 top-4 block size-6 min-[300px]:size-8",
+
+ // Position based on cqh to adjust for container height
+ "md:right-[62cqh] md:top-1/2 md:size-[32cqh] md:-translate-y-1/2 md:translate-x-1/2",
+
+ "drop-shadow-[0_0_15px_rgb(from_var(--brand-dark,#000)_r_g_b/0.4)]",
+ )}
+ >
{logo && (
<BlurImage
src={logo}
alt="Program Logo"
- width={1200}
- height={1200}
- className="absolute right-[9.9%] top-[49.9%] size-10 -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-full bg-white sm:size-20 sm:drop-shadow-lg"
+ fill
+ className="absolute object-cover object-center"
/>
)}
</div>
</div>
);
}
+
+function RainbowGradient({ className }: { className?: string }) {
+ return (
+ <div className={cn("absolute inset-0 saturate-[1.5]", className)}>
+ <div className="absolute right-[62cqh] top-1/2 aspect-square h-[200%] -translate-y-1/2 translate-x-1/2 rounded-full bg-[conic-gradient(from_-66deg_at_50%_50%,#855AFC_-32deg,#f00_63deg,#EAB308_158deg,#5CFF80_240deg,#855AFC_328deg,#f00_423deg)] blur-[50px]" />
+ </div>
+ );
+}