Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
Add VidRush featured sponsor, fix sponsor grid packing (#278)
KapishDimad7b1fef753c6
diff --git a/app/(home)/components/sections/landing-partners.tsx b/app/(home)/components/sections/landing-partners.tsxindex 23538595..7a93c5a6 100644--- a/app/(home)/components/sections/landing-partners.tsx+++ b/app/(home)/components/sections/landing-partners.tsx@@ -1,11 +1,6 @@import { getLandingSponsors } from "@/config/sponsors";import { SectionHeading } from "../section-heading";-import {- BecomeSponsorCard,- SponsorCard,- TIER_LABEL,- TIER_STYLE,-} from "../sponsor-card";+import { SponsorGrid } from "../sponsor-grid";export function LandingPartners() {const promoted = getLandingSponsors();@@ -22,26 +17,11 @@ export function LandingPartners() {animated={false}/>- <div className="mx-auto mt-10 grid max-w-4xl grid-cols-2 gap-3 md:grid-cols-6">- {promoted.map((s) => {- const style = TIER_STYLE[s.tier];- return (- <div key={s.id} className={style.span}>- <SponsorCard- sponsor={s}- label={TIER_LABEL[s.tier]}- logoArea={style.logoArea}- maxH={style.maxH}- treatment={style.treatment}- />- </div>- );- })}- <BecomeSponsorCard- href="/sponsors"- className="col-span-2 md:col-span-2"- />- </div>+ <SponsorGrid+ sponsors={promoted}+ ctaHref="/sponsors"+ className="mx-auto mt-10 max-w-4xl"+ /></div></section>);diff --git a/app/(home)/components/sponsor-card.tsx b/app/(home)/components/sponsor-card.tsxindex 68cad8f1..f893a376 100644--- a/app/(home)/components/sponsor-card.tsx+++ b/app/(home)/components/sponsor-card.tsx@@ -17,25 +17,25 @@ export const TIER_STYLE: Record<{ span: string; logoArea: string; maxH: string; treatment: LogoTreatment }> = {legendary: {- span: "col-span-2 md:col-span-6",+ span: "col-span-2",logoArea: "min-h-24",maxH: "max-h-12",treatment: "color",},featured: {- span: "col-span-2 md:col-span-3",+ span: "col-span-2",logoArea: "min-h-20",maxH: "max-h-10",treatment: "color",},partner: {- span: "col-span-1 md:col-span-2",+ span: "col-span-1",logoArea: "min-h-16",maxH: "max-h-8",treatment: "reveal",},builder: {- span: "col-span-1 md:col-span-2",+ span: "col-span-1",logoArea: "min-h-16",maxH: "max-h-8",treatment: "muted",diff --git a/app/(home)/components/sponsor-grid.tsx b/app/(home)/components/sponsor-grid.tsxnew file mode 100644index 00000000..19424ac1--- /dev/null+++ b/app/(home)/components/sponsor-grid.tsx@@ -0,0 +1,124 @@+import type { Sponsor, SponsorTier } from "@/config/sponsors";+import { cn } from "@/lib/utils";+import {+ BecomeSponsorCard,+ SponsorCard,+ TIER_LABEL,+ TIER_STYLE,+} from "./sponsor-card";++const TIER_ORDER: SponsorTier[] = [+ "legendary",+ "featured",+ "partner",+ "builder",+];++const ROW_SIZES: Record<SponsorTier, number[]> = {+ legendary: [1],+ featured: [2, 3],+ partner: [3, 4, 2],+ builder: [3, 4, 2],+};++const MD_SPAN: Record<number, string> = {+ 1: "md:col-span-12",+ 2: "md:col-span-6",+ 3: "md:col-span-4",+ 4: "md:col-span-3",+};++function partition(count: number, sizes: number[]): number[] | null {+ const memo = new Map<number, number[] | null>();+ const solve = (rem: number): number[] | null => {+ if (rem === 0) return [];+ const cached = memo.get(rem);+ if (cached !== undefined) return cached;+ let result: number[] | null = null;+ for (const size of sizes) {+ if (size > rem) continue;+ const rest = solve(rem - size);+ if (rest) {+ result = [size, ...rest];+ break;+ }+ }+ memo.set(rem, result);+ return result;+ };+ return solve(count);+}++function packRows(count: number, sizes: number[]): number[] {+ return partition(count, sizes) ?? partition(count, [...sizes, 1]) ?? [count];+}++type Cell =+ | { kind: "sponsor"; sponsor: Sponsor }+ | { kind: "cta"; href: string };++function layoutCells(sponsors: Sponsor[], ctaHref: string) {+ const groups = TIER_ORDER.map((tier) => ({+ tier,+ cells: sponsors+ .filter((s) => s.tier === tier)+ .map((sponsor): Cell => ({ kind: "sponsor", sponsor })),+ })).filter((g) => g.cells.length > 0);++ const last = groups.at(-1);+ if (last) last.cells.push({ kind: "cta", href: ctaHref });+ else+ groups.push({ tier: "builder", cells: [{ kind: "cta", href: ctaHref }] });++ return groups.flatMap(({ tier, cells }) => {+ const rows = packRows(cells.length, ROW_SIZES[tier]);+ let index = 0;+ return rows.flatMap((rowSize) => {+ const row = cells.slice(index, index + rowSize);+ index += rowSize;+ return row.map((cell) => ({+ cell,+ tier,+ mdSpan: MD_SPAN[rowSize] ?? "md:col-span-12",+ }));+ });+ });+}++export function SponsorGrid({+ sponsors,+ ctaHref,+ className,+}: {+ sponsors: Sponsor[];+ ctaHref: string;+ className?: string;+}) {+ return (+ <div className={cn("grid grid-cols-2 gap-3 md:grid-cols-12", className)}>+ {layoutCells(sponsors, ctaHref).map(({ cell, tier, mdSpan }) => {+ const style = TIER_STYLE[tier];+ if (cell.kind === "cta") {+ return (+ <BecomeSponsorCard+ key="cta"+ href={cell.href}+ className={cn("col-span-2", mdSpan)}+ />+ );+ }+ return (+ <div key={cell.sponsor.id} className={cn(style.span, mdSpan)}>+ <SponsorCard+ sponsor={cell.sponsor}+ label={TIER_LABEL[tier]}+ logoArea={style.logoArea}+ maxH={style.maxH}+ treatment={style.treatment}+ />+ </div>+ );+ })}+ </div>+ );+}diff --git a/app/(home)/sponsors/components/sections/wall-of-love.tsx b/app/(home)/sponsors/components/sections/wall-of-love.tsxindex 1ad61243..a7940081 100644--- a/app/(home)/sponsors/components/sections/wall-of-love.tsx+++ b/app/(home)/sponsors/components/sections/wall-of-love.tsx@@ -3,18 +3,11 @@ import Link from "next/link";import { Button } from "@/components/ui/button";import { activeSponsors, formerSponsors } from "@/config/sponsors";import { SectionHeading } from "../../../components/section-heading";-import {- BecomeSponsorCard,- SponsorCard,- TIER_LABEL,- TIER_STYLE,-} from "../../../components/sponsor-card";+import { SponsorCard } from "../../../components/sponsor-card";+import { SponsorGrid } from "../../../components/sponsor-grid";export function WallOfLove() {- const ordered = (- ["legendary", "featured", "partner", "builder"] as const- ).flatMap((tier) => activeSponsors.filter((s) => s.tier === tier));- const isEmpty = ordered.length === 0;+ const isEmpty = activeSponsors.length === 0;return (<section id="sponsors" className="relative py-12 sm:py-16">@@ -46,23 +39,7 @@ export function WallOfLove() {</Button></div>) : (- <div className="grid grid-cols-2 gap-3 md:grid-cols-6">- {ordered.map((s) => {- const style = TIER_STYLE[s.tier];- return (- <div key={s.id} className={style.span}>- <SponsorCard- sponsor={s}- label={TIER_LABEL[s.tier]}- logoArea={style.logoArea}- maxH={style.maxH}- treatment={style.treatment}- />- </div>- );- })}- <BecomeSponsorCard href="#tiers" className="md:col-span-4" />- </div>+ <SponsorGrid sponsors={activeSponsors} ctaHref="#tiers" />)}</div></section>diff --git a/config/sponsors.ts b/config/sponsors.tsindex 0de983c2..0f87410c 100644--- a/config/sponsors.ts+++ b/config/sponsors.ts@@ -71,6 +71,16 @@ export const sponsors: Sponsor[] = (isPaste: false,layout: "row",},+ {+ id: "vidrush",+ name: "VidRush",+ logoUrl: "/sponsors/vidrush.png",+ website:+ "https://vidrush.ai/?utm_source=remocn&utm_medium=sponsor&utm_campaign=remocn_sponsors_page",+ tier: "featured",+ customStyles: "opacity-90 max-w-full brightness-0",+ isPaste: false,+ },{id: "21st",name: "21st.dev",diff --git a/public/sponsors/vidrush.png b/public/sponsors/vidrush.pngnew file mode 100644index 00000000..bd936b3cBinary files /dev/null and b/public/sponsors/vidrush.png differ