// Fake "ad" tiles — visual-only placeholders that look like scroll-stopping social ads. // Each renders a 9:16 phone-shaped card with a scene, a caption bar, a CTA, and platform chrome. const AdTile = ({ ad, height = 360, aspect = "9/16", fluid = false, playing = false, mediaOverride }) => { const isVideo = ad.kind === "video"; // When ad.raw === true, the social-feed chrome (top/bottom bars, hook, play icon) is hidden // so real media shows edge-to-edge. Defaults to false to keep the "in-feed" look. const showChrome = !ad.raw; const mediaSrc = mediaOverride || ad.media; const hasRealMedia = !!mediaSrc; // Two sizing modes: // - fixed (default): width derived from height × 9/16 — used by hero marquee + VideoAdsSection // - fluid: absolutely fills its parent (parent wrapper controls aspect ratio) — used for static 1:1 const innerStyle = fluid ? { position: "absolute", inset: 0, borderRadius: 18, overflow: "hidden", background: ad.bg, boxShadow: "0 20px 48px rgba(5,27,66,0.18), 0 2px 6px rgba(5,27,66,0.08)", border: "1px solid rgba(255,255,255,0.08)", color: "#fff", fontFamily: "'Lato',sans-serif", } : { position: "relative", width: Math.round(height * 9 / 16), height, borderRadius: 18, overflow: "hidden", background: ad.bg, boxShadow: "0 20px 48px rgba(5,27,66,0.18), 0 2px 6px rgba(5,27,66,0.08)", border: "1px solid rgba(255,255,255,0.08)", flex: "none", color: "#fff", fontFamily: "'Lato',sans-serif", }; return (
{/* Scene or real media */} {showChrome && ( <> {/* Platform chrome (top) */}
{ad.brandInitial}
{ad.brand}
Sponsored · {ad.platform}
···
{/* Scrim */}
{/* Play icon — only for fake videos (real videos already autoplay) */} {isVideo && !hasRealMedia && (
)} {/* Caption hook */} {ad.hook && (
{ad.hook}
)} {/* Bottom CTA bar */} {(ad.cta || ad.domain) && (
{ad.domain}
{ad.cta}
Shop Now
)} {/* Progress bar — only for fake videos */} {isVideo && !hasRealMedia && (
)} )}
); }; // Drawn "scene" for each ad — tasteful gradient + shape composition (no stock photos). // If ad.media (or mediaOverride) is provided (e.g. "uploads/my-ad.mp4" or "uploads/product.jpg"), // we render the real file instead of the fake scene. Videos autoplay muted and loop. // mediaOverride lets the hero marquee pick a different-aspect variant (e.g. ad.mediaMarquee). const AdScene = ({ ad, mediaOverride }) => { const src = mediaOverride || ad.media; if (src) { const lower = src.toLowerCase(); const isVideo = /\.(mp4|webm|mov|m4v|ogv)(\?|$)/.test(lower); // Default to `cover` so media fills the frame edge-to-edge. // For sources that don't exactly match the frame aspect, slight cropping occurs. // To avoid any crop, either (a) export at exact 1080×1920 (9:16) / square (1:1), // or (b) set ad.fit = "contain" on that specific ad. const fit = ad.fit || "cover"; return (
{isVideo ? (
); } return (
{ad.scene}
); }; // Scene library — abstract, on-brand compositions. const Scenes = { // Warm cream product shot productCream: ( <>
), // Fitness green gradient fitnessGreen: ( <>
), // Dark tech/SaaS techDark: ( <>
{/* Grid */}
), // Beauty peach beautyPeach: ( <>
), // DTC apparel — teal apparelTeal: ( <>
), // Food / restaurant — warm red foodRed: ( <>
), // Finance / app — navy blue financeNavy: ( <>
+312%
), // Skincare minimal skincareSand: ( <>
), // Eco / wellness green-cream wellnessOlive: ( <>
), }; // Ad data — 6 video + 6 image (plus extras for hero) const Ads = [ // VIDEOS — real media, `raw: true` hides the fake social chrome so videos play edge-to-edge { id: "v1", kind: "video", brand: "Lemon Burst", brandInitial: "L", platform: "Meta Reels", media: "uploads/Hyper%20MOtion%20Lemon%20(1).mp4", raw: true, bg: "#000" }, { id: "v2", kind: "video", brand: "Pawcast", brandInitial: "P", platform: "TikTok", media: "uploads/PAW%20With%20Caption.mp4", raw: true, bg: "#000" }, { id: "v3", kind: "video", brand: "Super Burger", brandInitial: "S", platform: "Meta Reels", media: "uploads/Burger%20Hyper%20(1).mp4", raw: true, bg: "#000" }, { id: "v4", kind: "video", brand: "Goelia", brandInitial: "G", platform: "TikTok", media: "uploads/Goelia%20(1).mp4", raw: true, bg: "#000" }, { id: "v5", kind: "video", brand: "Corvari", brandInitial: "C", platform: "Meta Reels", media: "uploads/Corvari%20Ads2%20StorytellingNEW.mp4", raw: true, bg: "#000" }, { id: "v6", kind: "video", brand: "Flakes", brandInitial: "F", platform: "TikTok", media: "uploads/Flake%20Test.mp4", raw: true, bg: "#000" }, // IMAGES { id: "i1", kind: "image", brand: "Apulia Olive Oil", brandInitial: "A", platform: "Meta", media: "uploads/Apulia%20Olive%20Oil.webp", // 1:1 for Static Creatives mediaMarquee: "uploads/Apulia%20Olive%20Oil%20916.webp", // 9:16 for hero scrolling raw: true, bg: "#000" }, { id: "i2", kind: "image", brand: "Mobili Rebecca", brandInitial: "M", platform: "Pinterest", media: "uploads/Mobili%20Rebecca.webp", mediaMarquee: "uploads/Mobili%20Rebecca%20916.webp", raw: true, bg: "#000" }, { id: "i3", kind: "image", brand: "Pawcast", brandInitial: "P", platform: "Meta", media: "uploads/Pawcast.webp", mediaMarquee: "uploads/Pawcast%20916.webp", raw: true, bg: "#000" }, { id: "i4", kind: "image", brand: "Kedor", brandInitial: "K", platform: "Google", media: "uploads/Kedor%20WPC.webp", // 1:1 only — appears in Static but NOT in marquee raw: true, bg: "#000" }, { id: "i5", kind: "image", brand: "Lemon Burst", brandInitial: "L", platform: "Meta", media: "uploads/Lemon%20Burst.webp", mediaMarquee: "uploads/Lemon%20Burst916.webp", raw: true, bg: "#000" }, { id: "i6", kind: "image", brand: "Goelia", brandInitial: "G", platform: "Pinterest", media: "uploads/Goelia.webp", mediaMarquee: "uploads/Goelia%20916.webp", raw: true, bg: "#000" }, ]; window.Ads = Ads; window.AdTile = AdTile; window.Scenes = Scenes;