Skip to content

Commit f9f882e

Browse files
authored
Merge pull request #4 from stackified/dev
feat(partners): add dynamic video section to partner profile pages
2 parents 5031b9d + f2b67b3 commit f9f882e

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

apps/web/app/partners/[slug]/page.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Navbar } from "@/components/navbar";
33
import { Footer } from "@/components/footer";
44
import { PartnerHero } from "@/components/sections/partner-hero";
55
import { PartnerBio } from "@/components/sections/partner-bio";
6+
import { PartnerVideo } from "@/components/sections/partner-video";
67
import { PartnerCTA } from "@/components/sections/partner-cta";
78
import { PartnerFeatures } from "@/components/sections/partner-features";
89
import { TrustMetricsSection } from "@/components/sections/trust-metrics-section";
@@ -15,6 +16,7 @@ interface PartnerData {
1516
imageUrl: string;
1617
quote?: string;
1718
ctaMessage?: string;
19+
youtubeId?: string;
1820
ctaUrl?: string;
1921
}
2022

@@ -25,6 +27,7 @@ const PARTNERS_DATA: Record<string, PartnerData> = {
2527
imageUrl: "/images/soloetv.png",
2628
quote: "Life is short and working for other people sucks",
2729
ctaMessage: "Trade with the broker I trust. Join me at RestroFX and experience trading the way it was meant to be. Raw spreads, lightning-fast execution, and a platform that puts you first.",
30+
youtubeId: "01loBLlZRHw",
2831
ctaUrl: "https://portal.restrofx.com/r/glaPWwHQ"
2932
},
3033
"default": {
@@ -67,6 +70,12 @@ export default function PartnerProfilePage({ params }: { params: { slug: string
6770
</ScrollReveal>
6871
</div>
6972

73+
{partner.youtubeId && (
74+
<ScrollReveal>
75+
<PartnerVideo youtubeId={partner.youtubeId} />
76+
</ScrollReveal>
77+
)}
78+
7079
<div className="py-4 sm:py-6">
7180
<ScrollReveal>
7281
<div className="text-center mb-12">
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
"use client";
2+
3+
import { motion } from "framer-motion";
4+
5+
interface PartnerVideoProps {
6+
youtubeId: string;
7+
}
8+
9+
export function PartnerVideo({ youtubeId }: PartnerVideoProps) {
10+
if (!youtubeId) return null;
11+
12+
return (
13+
<section className="py-24 relative overflow-hidden bg-transparent">
14+
<div className="container px-4 md:px-6">
15+
<motion.div
16+
initial={{ opacity: 0, scale: 0.95 }}
17+
whileInView={{ opacity: 1, scale: 1 }}
18+
viewport={{ once: true }}
19+
transition={{ duration: 0.8 }}
20+
className="relative max-w-5xl mx-auto group"
21+
>
22+
{/* Premium Glowing Backdrop */}
23+
<div className="absolute -inset-4 bg-primary/20 rounded-[2rem] blur-3xl opacity-50 -z-10 group-hover:opacity-75 transition-opacity duration-700" />
24+
25+
<div className="relative aspect-video rounded-3xl overflow-hidden border-2 border-white/10 shadow-2xl bg-background/50 backdrop-blur-sm">
26+
<iframe
27+
src={`https://www.youtube.com/embed/${youtubeId}?rel=0&modestbranding=1`}
28+
title="YouTube video player"
29+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
30+
allowFullScreen
31+
className="absolute inset-0 w-full h-full"
32+
/>
33+
</div>
34+
35+
{/* Decorative Border Glow */}
36+
<div className="absolute inset-0 rounded-3xl border border-primary/20 pointer-events-none group-hover:border-primary/40 transition-colors duration-500" />
37+
</motion.div>
38+
</div>
39+
</section>
40+
);
41+
}

0 commit comments

Comments
 (0)