Podcast Episode 1
Podcast episode block: the episode pinned to a board with a chapter-synced waveform player, timestamped show notes that jump the playhead, the offer from the show and follow buttons. A listener presses play, then clicks through.
Use it in a prompt
Use content/podcast-episode from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/content/podcast-episode.tsx. - Import it and pass your copy and images (Props tab):
import { PodcastEpisode } from "@/components/funneldna/content/podcast-episode"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/podcast-episode/component.tsx 719 lines
// layout: annotated-board
// Podcast episode block: the episode pinned to a board with a chapter-synced waveform player, timestamped show notes that jump the playhead, the offer from the show and follow buttons. A listener presses play, then clicks through.
// Theme: every colour, face, button, card and image reads the theme contract tokens. Neutral tints and brand tints mix in OKLCH with a neutral (--card). Platform icons are generic lucide glyphs (not official marks), so they take tokens too.
import * as React from "react"
import { Headphones, Mic, Music, Pause, Play, Podcast, Radio, RotateCcw, RotateCw, Rss, ShieldCheck } from "lucide-react"
export type PodcastChapter = {
/** Seconds from the start of the episode. */
time: number
/** Fascination-style show note for this chapter. */
title: string
}
export type PodcastPlatformIcon = "podcast" | "headphones" | "rss" | "radio" | "music" | "mic"
export type PodcastPlatform = {
name: string
/** Where the follow button goes. Without it the button calls onSubscribe. */
href?: string
icon?: PodcastPlatformIcon
}
export type PodcastOffer = {
heading: React.ReactNode
detail?: React.ReactNode
/** Slot item-1: product thumbnail. */
productImage?: string
productImageAlt?: string
/** Shown with a slash through it when supplied. */
regularPrice?: string
price: string
note?: string
label: string
reassurance?: string
href?: string
}
export type PodcastEpisodeCopy = {
episode: string
/** "Hosted by {host}" */
host: string
/** "{minutes} min listen" */
listen: string
play: string
pause: string
back: string
forward: string
seek: string
/** "{current} of {total}" (screen readers) */
position: string
/** "{current} / {total}" (visible clock) */
clock: string
idle: string
intro: string
/** "Play from {time}: {chapter}" */
jump: string
/** "Follow on {platform}" */
follow: string
regular: string
today: string
}
export type PodcastEpisodeProps = {
showName?: string
episodeNumber?: string | number
title?: React.ReactNode
/** Episode length in seconds. The audio's real length replaces it once loaded. */
durationSeconds?: number
/** Slot product: square cover art. */
coverImage?: string
coverAlt?: string
hostName?: string
/** Slot presenter: host portrait. */
hostImage?: string
hostImageAlt?: string
/** One-sentence lines for the pitch note. */
pitch?: React.ReactNode[]
/** The single-word line that lands the pitch. */
punchline?: React.ReactNode
showNotesHeading?: React.ReactNode
chapters?: PodcastChapter[]
/** Real episode audio. Without it, play calls onPlay for the page to wire. */
audioSrc?: string
startAt?: number
/** Waveform peaks, 0 to 1. */
peaks?: number[]
offer?: PodcastOffer
subscribeHeading?: React.ReactNode
platforms?: PodcastPlatform[]
copy?: Partial<PodcastEpisodeCopy>
onPlay?: (seconds: number) => void
onSeek?: (seconds: number) => void
onAction?: () => void
onSubscribe?: (platform: PodcastPlatform) => void
state?: "default" | "hover" | "active" | "disabled"
className?: string
}
export function PodcastEpisode(props: PodcastEpisodeProps) {
const {
showName = "",
episodeNumber = 1,
title = "Build your first funnel with a clear plan",
durationSeconds = 1800,
coverImage,
coverAlt = "Podcast cover art",
hostName = "",
hostImage,
hostImageAlt,
pitch = [],
punchline,
showNotesHeading = "What you'll take away from this episode",
chapters = [],
audioSrc,
startAt = 0,
peaks,
offer,
subscribeHeading = "Get every new episode free",
platforms = [],
onPlay,
onSeek,
onAction,
onSubscribe,
state = "default",
className,
} = props
const copy: PodcastEpisodeCopy = { ...DEFAULT_COPY, ...props.copy }
const uid = React.useId()
const titleId = `${uid}-title`
const audioRef = React.useRef<HTMLAudioElement>(null)
const waveRef = React.useRef<HTMLDivElement>(null)
const draggingRef = React.useRef(false)
const [audioDuration, setAudioDuration] = React.useState<number | null>(null)
const total = Math.max(1, audioDuration ?? durationSeconds)
const [position, setPosition] = React.useState(() => clamp(startAt, 0, total))
const [hover, setHover] = React.useState<number | null>(null)
const [dragging, setDragging] = React.useState(false)
const [playing, setPlaying] = React.useState(false)
const disabled = state === "disabled"
const forcedHover = state === "hover"
const forcedActive = state === "active"
const sorted = React.useMemo(() => [...chapters].sort((a, b) => a.time - b.time), [chapters])
const chapterAt = (seconds: number) => {
let found = -1
sorted.forEach((chapter, i) => {
if (chapter.time <= seconds) found = i
})
return found
}
const shownPos = forcedActive ? total * 0.52 : position
const frac = clamp(shownPos / total, 0, 1)
const tipFrac = disabled ? null : forcedHover ? 0.64 : forcedActive ? frac : hover
const activeIdx = chapterAt(shownPos)
const started = playing || position > 0 || forcedActive
const bars = peaks && peaks.length > 1 ? peaks : DEFAULT_PEAKS
const tipIdx = tipFrac === null ? -1 : chapterAt(tipFrac * total)
const tipText = tipIdx >= 0 ? sorted[tipIdx].title : copy.intro
const nowText = !started ? copy.idle : activeIdx >= 0 ? sorted[activeIdx].title : copy.intro
const metaBits: React.ReactNode[] = [
hostName ? <strong>{fill(copy.host, { host: hostName })}</strong> : null,
showName || null,
fill(copy.listen, { minutes: String(Math.max(1, Math.round(total / 60))) }),
].filter(Boolean)
const seek = (seconds: number) => {
if (disabled) return
const t = clamp(seconds, 0, total)
setPosition(t)
const audio = audioRef.current
if (audio) audio.currentTime = t
onSeek?.(t)
}
const togglePlay = () => {
if (disabled) return
const audio = audioRef.current
if (audio && !audio.paused) {
audio.pause()
return
}
if (audio) void audio.play().catch(() => setPlaying(false))
onPlay?.(position)
}
const playFrom = (seconds: number) => {
if (disabled) return
seek(seconds)
const audio = audioRef.current
if (audio && audio.paused) void audio.play().catch(() => setPlaying(false))
onPlay?.(clamp(seconds, 0, total))
}
const fractionAt = (clientX: number) => {
const box = waveRef.current?.getBoundingClientRect()
if (!box || box.width === 0) return 0
return clamp((clientX - box.left) / box.width, 0, 1)
}
const onWaveDown = (e: React.PointerEvent<HTMLDivElement>) => {
if (disabled) return
e.currentTarget.setPointerCapture(e.pointerId)
draggingRef.current = true
setDragging(true)
const f = fractionAt(e.clientX)
setHover(f)
seek(f * total)
}
const onWaveMove = (e: React.PointerEvent<HTMLDivElement>) => {
if (disabled) return
const f = fractionAt(e.clientX)
setHover(f)
if (draggingRef.current) seek(f * total)
}
const endDrag = (e: React.PointerEvent<HTMLDivElement>) => {
draggingRef.current = false
setDragging(false)
if (e.pointerType !== "mouse") setHover(null)
}
const onWaveLeave = () => {
if (!draggingRef.current) setHover(null)
}
const onWaveKey = (e: React.KeyboardEvent<HTMLDivElement>) => {
if (disabled) return
const steps: Record<string, number> = { ArrowRight: 5, ArrowUp: 5, ArrowLeft: -5, ArrowDown: -5, PageUp: 30, PageDown: -30 }
if (e.key in steps) {
e.preventDefault()
seek(position + steps[e.key])
} else if (e.key === "Home") {
e.preventDefault()
seek(0)
} else if (e.key === "End") {
e.preventDefault()
seek(total)
}
}
const ctaClass = `pe-cta${forcedHover ? " is-hover" : ""}${forcedActive ? " is-active" : ""}`
const rootClass = `cf-podcast-episode${dragging ? " is-dragging" : ""}${disabled ? " is-disabled" : ""}${className ? ` ${className}` : ""}`
return (
<section className={rootClass} aria-labelledby={titleId}>
<style>{CSS}</style>
{audioSrc ? (
<audio
ref={audioRef}
src={audioSrc}
preload="metadata"
onLoadedMetadata={(e) => {
const d = e.currentTarget.duration
if (Number.isFinite(d) && d > 0) setAudioDuration(d)
}}
onTimeUpdate={(e) => {
if (!draggingRef.current) setPosition(e.currentTarget.currentTime)
}}
onPlay={() => setPlaying(true)}
onPause={() => setPlaying(false)}
onEnded={() => setPlaying(false)}
/>
) : null}
<div className="pe-wrap">
<header className="pe-head">
<p className="pe-ep">
<span className="pe-ep-label">{copy.episode}</span>
<span className="pe-ep-num">{episodeNumber}</span>
</p>
<div className="pe-head-copy">
<h2 className="pe-title" id={titleId}>
{title}
</h2>
<p className="pe-meta">
{hostImage ? <img src={hostImage} alt={hostImageAlt ?? hostName} width={96} height={96} /> : null}
<span className="pe-meta-text">
{metaBits.map((bit, i) => (
<React.Fragment key={i}>
<span className="pe-meta-bit">
{bit}
{i < metaBits.length - 1 ? SEP : null}
</span>
{i < metaBits.length - 1 ? " " : null}
</React.Fragment>
))}
</span>
</p>
</div>
</header>
<div className="pe-board">
<div className="pe-col pe-col--b">
{coverImage ? (
<figure className="pe-cover pe-reveal" style={iv(0)}>
<img src={coverImage} alt={coverAlt} width={800} height={800} />
</figure>
) : null}
<div className="pe-note pe-player pe-reveal" style={iv(1)}>
<div className="pe-player-top">
<button
type="button"
className={`pe-play${forcedActive ? " is-active" : ""}`}
aria-label={playing ? copy.pause : copy.play}
disabled={disabled}
onClick={togglePlay}
>
{playing ? (
<Pause aria-hidden="true" fill="currentColor" strokeWidth={2.5} />
) : (
<Play className="pe-play-glyph" aria-hidden="true" fill="currentColor" strokeWidth={2.5} />
)}
</button>
<p className="pe-now">
<span className="pe-now-title">{nowText}</span>
<span className="pe-now-time">
{fill(copy.clock, { current: formatTime(shownPos), total: formatTime(total) })}
</span>
</p>
<div className="pe-skips">
<button type="button" className="pe-skip" aria-label={copy.back} disabled={disabled} onClick={() => seek(position - 15)}>
<RotateCcw aria-hidden="true" size={20} strokeWidth={2.5} />
</button>
<button type="button" className="pe-skip" aria-label={copy.forward} disabled={disabled} onClick={() => seek(position + 30)}>
<RotateCw aria-hidden="true" size={20} strokeWidth={2.5} />
</button>
</div>
</div>
<div className="pe-wave-wrap">
<div
ref={waveRef}
className="pe-wave"
role="slider"
tabIndex={disabled ? -1 : 0}
aria-label={copy.seek}
aria-valuemin={0}
aria-valuemax={Math.round(total)}
aria-valuenow={Math.round(shownPos)}
aria-valuetext={fill(copy.position, { current: formatTime(shownPos), total: formatTime(total) })}
aria-disabled={disabled || undefined}
onPointerDown={onWaveDown}
onPointerMove={onWaveMove}
onPointerUp={endDrag}
onPointerCancel={endDrag}
onPointerLeave={onWaveLeave}
onKeyDown={onWaveKey}
>
{bars.map((peak, i) => {
const centre = (i + 0.5) / bars.length
const tone = centre <= frac ? " is-played" : !forcedActive && tipFrac !== null && centre <= tipFrac ? " is-preview" : ""
return <span key={i} className={`pe-bar${tone}`} style={{ height: `${Math.round(16 + clamp(peak, 0, 1) * 84)}%` }} />
})}
<span className="pe-cursor" style={{ left: `${(frac * 100).toFixed(2)}%` }} aria-hidden="true" />
</div>
{sorted.length ? (
<div className="pe-ticks" aria-hidden="true">
{sorted.map((chapter, i) => (
<span
key={`${chapter.time}-${i}`}
className={i === activeIdx ? "is-on" : undefined}
style={{ left: `${(clamp(chapter.time / total, 0, 1) * 100).toFixed(2)}%` }}
/>
))}
</div>
) : null}
{tipFrac !== null ? (
<span className="pe-tip" aria-hidden="true" style={{ left: `clamp(110px, ${(tipFrac * 100).toFixed(2)}%, calc(100% - 110px))` }}>
<b>{formatTime(tipFrac * total)}</b>
{tipText}
</span>
) : null}
</div>
</div>
</div>
<div className="pe-col pe-col--a">
{pitch.length || punchline ? (
<div className={`pe-note pe-note--pinned pe-pitch pe-reveal${forcedHover ? " is-hover" : ""}`} style={iv(2)}>
{pitch.map((line, i) => (
<p className="pe-line" key={i}>
{line}
</p>
))}
{punchline ? <p className="pe-punch">{punchline}</p> : null}
</div>
) : null}
{offer ? (
<article className="pe-note pe-offer pe-reveal" style={iv(4)} aria-labelledby={`${uid}-offer`}>
<div className="pe-offer-top">
{offer.productImage ? <img src={offer.productImage} alt={offer.productImageAlt ?? ""} width={128} height={128} /> : null}
<h3 className="pe-h3" id={`${uid}-offer`}>
{offer.heading}
</h3>
</div>
{offer.detail ? <p className="pe-offer-detail">{offer.detail}</p> : null}
<p className="pe-price">
{offer.regularPrice ? (
<>
<span className="pe-sr">{copy.regular}</span>
<s className="pe-was">{offer.regularPrice}</s>
</>
) : null}
<span className="pe-sr">{copy.today}</span>
<strong className="pe-now-price">{offer.price}</strong>
</p>
{offer.note ? <p className="pe-price-note">{offer.note}</p> : null}
{offer.href && !disabled ? (
<a className={ctaClass} href={offer.href} onClick={() => onAction?.()}>
{offer.label}
</a>
) : (
<button type="button" className={ctaClass} disabled={disabled} onClick={() => onAction?.()}>
{offer.label}
</button>
)}
{offer.reassurance ? (
<p className="pe-reassure">
<ShieldCheck aria-hidden="true" strokeWidth={2.5} />
{offer.reassurance}
</p>
) : null}
</article>
) : null}
</div>
<div className="pe-col pe-col--c">
{sorted.length ? (
<section className="pe-note pe-note--pinned pe-notes pe-reveal" style={iv(3)} aria-labelledby={`${uid}-notes`}>
<h3 className="pe-h3" id={`${uid}-notes`}>
{showNotesHeading}
</h3>
<ol className="pe-chapters">
{sorted.map((chapter, i) => (
<li key={`${chapter.time}-${i}`}>
<button
type="button"
className={`pe-chap${i === activeIdx ? " is-on" : ""}`}
aria-current={i === activeIdx ? "true" : undefined}
aria-label={fill(copy.jump, { time: formatTime(chapter.time), chapter: chapter.title })}
disabled={disabled}
onClick={() => playFrom(chapter.time)}
>
<span className="pe-chap-time">{formatTime(chapter.time)}</span>
<span className="pe-chap-text">{chapter.title}</span>
</button>
</li>
))}
</ol>
</section>
) : null}
{platforms.length ? (
<section className="pe-note pe-note--pinned pe-subs pe-reveal" style={iv(5)} aria-labelledby={`${uid}-subs`}>
<h3 className="pe-h3" id={`${uid}-subs`}>
{subscribeHeading}
</h3>
<ul className="pe-plats">
{platforms.map((platform, i) => {
const Icon = PLATFORM_ICONS[platform.icon ?? guessIcon(platform.name)]
const label = fill(copy.follow, { platform: platform.name })
const inner = (
<>
<Icon aria-hidden="true" size={20} strokeWidth={2.5} />
<span>{platform.name}</span>
</>
)
return (
<li key={`${platform.name}-${i}`}>
{platform.href && !disabled ? (
<a className="pe-plat" href={platform.href} aria-label={label} onClick={() => onSubscribe?.(platform)}>
{inner}
</a>
) : (
<button type="button" className="pe-plat" aria-label={label} disabled={disabled} onClick={() => onSubscribe?.(platform)}>
{inner}
</button>
)}
</li>
)
})}
</ul>
</section>
) : null}
</div>
</div>
</div>
</section>
)
}
export default PodcastEpisode
const SEP = " ·"
const DEFAULT_COPY: PodcastEpisodeCopy = {
episode: "Episode",
host: "Hosted by {host}",
listen: "{minutes} min listen",
play: "Play episode",
pause: "Pause episode",
back: "Back 15 seconds",
forward: "Forward 30 seconds",
seek: "Episode position",
position: "{current} of {total}",
clock: "{current} / {total}",
idle: "Press play to start listening",
intro: "Intro",
jump: "Play from {time}: {chapter}",
follow: "Follow on {platform}",
regular: "Regular price",
today: "Today's price",
}
const PLATFORM_ICONS: Record<PodcastPlatformIcon, typeof Podcast> = {
podcast: Podcast,
headphones: Headphones,
rss: Rss,
radio: Radio,
music: Music,
mic: Mic,
}
function guessIcon(name: string): PodcastPlatformIcon {
const n = name.toLowerCase()
if (n.includes("rss") || n.includes("feed")) return "rss"
if (n.includes("spotify") || n.includes("music")) return "headphones"
if (n.includes("radio")) return "radio"
return "podcast"
}
function clamp(value: number, min: number, max: number) {
return Math.min(max, Math.max(min, value))
}
function fill(template: string, values: Record<string, string>) {
return Object.entries(values).reduce((text, [key, value]) => text.split(`{${key}}`).join(value), template)
}
function formatTime(seconds: number) {
const s = Math.max(0, Math.floor(seconds))
const h = Math.floor(s / 3600)
const m = Math.floor((s % 3600) / 60)
const sec = String(s % 60).padStart(2, "0")
return h ? `${h}:${String(m).padStart(2, "0")}:${sec}` : `${String(m).padStart(2, "0")}:${sec}`
}
function iv(i: number) {
return { "--pe-i": i } as React.CSSProperties
}
function makePeaks(count: number): number[] {
return Array.from({ length: count }, (_, i) => {
const swell = 0.55 + 0.45 * Math.sin(i * 0.21 + 0.6)
const grain = 0.5 + 0.5 * Math.sin(i * 1.93 + 0.3) * Math.cos(i * 0.71)
return Math.round(clamp(0.22 + 0.78 * swell * (0.45 + 0.55 * grain), 0.18, 1) * 100) / 100
})
}
const DEFAULT_PEAKS = makePeaks(48)
const R = ".cf-podcast-episode"
const CSS = `
${R} {
--pe-fill: var(--accent-fill, var(--accent));
--pe-btn: var(--button-bg, var(--cta));
--pe-btn-2: var(--button-bg-2, var(--cta-2));
--pe-ring: oklch(from var(--field-focus, var(--accent)) l c h / .6);
position: relative;
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 120px);
background: var(--band);
color: var(--band-ink);
font-family: var(--font-body);
overflow-x: clip;
}
${R} *, ${R} *::before, ${R} *::after { box-sizing: border-box; }
${R} img { display: block; max-width: 100%; }
${R} .pe-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
${R} .pe-wrap { max-width: 1120px; margin: 0 auto; }
${R} .pe-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: clamp(20px, 3vw, 40px); margin: 0 0 clamp(40px, 5vw, 64px); }
${R} .pe-ep { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 112px; margin: 0; padding: 16px 20px 18px; border: 1px solid oklch(from var(--band-ink) l c h / .16); border-radius: var(--radius, 12px); background: oklch(from var(--band-ink) l c h / .08); color: var(--band-ink); text-align: center; }
${R} .pe-ep-label { font-size: .875rem; font-weight: 800; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; }
${R} .pe-ep-num, ${R} .pe-now-price { font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: clamp(2.5rem, 4.2vw, 3.75rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
${R} .pe-title { margin: 0; color: var(--band-ink); font-family: var(--font-display); font-weight: var(--display-weight, 800); text-transform: var(--display-case, none); letter-spacing: var(--display-tracking, -0.025em); font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.06; text-wrap: balance; }
${R} .pe-meta { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; color: var(--band-ink); font-size: clamp(1.125rem, 1.5vw, 1.375rem); font-weight: 500; line-height: 1.4; text-wrap: pretty; }
${R} .pe-meta img { flex: none; width: 48px; height: 48px; border-radius: 999px; object-fit: cover; object-position: center 25%; }
${R} .pe-meta strong { font-weight: 800; }
${R} .pe-meta-text { min-width: 0; }
${R} .pe-meta-bit { display: inline-block; max-width: 100%; }
${R} .pe-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; gap: 32px; }
${R} .pe-col { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
${R} .pe-col--a { grid-column: 1; grid-row: 1; padding-top: 40px; }
${R} .pe-col--b { grid-column: 2; grid-row: 1; }
${R} .pe-col--c { grid-column: 3; grid-row: 1; padding-top: 16px; }
${R} .pe-note { position: relative; padding: clamp(20px, 3vw, 28px); background: var(--card); color: var(--ink); border: 1px solid var(--card-border, oklch(from var(--ink) l c h / .12)); border-radius: var(--card-radius, var(--radius, 14px)); box-shadow: var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .22), 0 4px 10px -2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .2))); rotate: var(--pe-tilt, 0deg); }
${R} .pe-note--pinned::before { content: ""; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 999px; background: radial-gradient(circle at 35% 30%, oklch(from var(--pe-fill) calc(l + .18) c h), var(--pe-fill) 62%); box-shadow: 0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .5); }
${R} .pe-pitch { --pe-tilt: -1.4deg; }
${R} .pe-notes { --pe-tilt: 1deg; }
${R} .pe-subs { --pe-tilt: -0.8deg; }
${R} .pe-note--pinned:hover, ${R} .pe-note--pinned.is-hover { rotate: 0deg; translate: 0 -2px; }
${R} .pe-h3 { margin: 0 0 16px; color: var(--ink); font-family: var(--font-display); font-weight: var(--display-weight, 800); text-transform: var(--display-case, none); font-size: clamp(1.3125rem, 1.8vw, 1.625rem); line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
${R} .pe-cover { margin: 0; }
${R} .pe-cover img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center; border-radius: 12px; filter: drop-shadow(0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .45)) drop-shadow(0 14px 18px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .4)); }
${R} .pe-player { padding: clamp(20px, 2.4vw, 24px); padding-bottom: 24px; }
${R} .pe-player-top { display: flex; align-items: center; gap: 16px; }
${R} .pe-play { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 999px; color: var(--accent-fill-ink, var(--card)); background: linear-gradient(oklch(from var(--pe-fill) calc(l + .04) c h), oklch(from var(--pe-fill) calc(l - .05) c h)); box-shadow: inset 0 1px 0 oklch(from var(--pe-fill) calc(l + .14) c h / .7), inset 0 -3px 0 oklch(from var(--pe-fill) calc(l - .16) c h), 0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .3), 0 6px 12px -4px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .45); cursor: pointer; }
${R} .pe-play svg { width: 22px; height: 22px; }
${R} .pe-play .pe-play-glyph { margin-left: 3px; }
${R} .pe-play:hover { background: linear-gradient(oklch(from var(--pe-fill) calc(l - .01) c h), oklch(from var(--pe-fill) calc(l - .1) c h)); }
${R} .pe-play:active, ${R} .pe-play.is-active { transform: translateY(1px); box-shadow: inset 0 2px 4px oklch(from var(--pe-fill) calc(l - .24) c h / .55), inset 0 -2px 0 oklch(from var(--pe-fill) calc(l - .16) c h), 0 1px 1px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .3); }
${R} .pe-play:disabled { transform: none; background: var(--secondary); color: var(--secondary-ink); box-shadow: var(--button-2-shadow, var(--shadow-sm)); cursor: not-allowed; }
${R} .pe-now { flex: 1; min-width: 0; margin: 0; }
${R} .pe-now-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--ink); font-size: clamp(1rem, 1.25vw, 1.0625rem); font-weight: 700; line-height: 1.3; text-wrap: balance; overflow-wrap: anywhere; }
${R} .pe-now-time { display: block; margin-top: 4px; color: var(--muted); font-size: .9375rem; font-weight: 600; line-height: 1.4; font-variant-numeric: tabular-nums; }
${R} .pe-skips { flex: none; display: flex; gap: 8px; }
${R} .pe-skip { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--button-2-border, transparent); border-radius: 999px; background: var(--button-2-bg, var(--secondary)); color: var(--button-2-ink, var(--secondary-ink)); cursor: pointer; }
${R} .pe-skip:hover { background: oklch(from var(--button-2-bg, var(--secondary)) calc(l - .04) c h); }
${R} .pe-skip:active { transform: translateY(1px); }
${R} .pe-skip:disabled { color: var(--muted); cursor: not-allowed; transform: none; }
${R} .pe-wave-wrap { position: relative; margin-top: 20px; }
${R} .pe-wave { position: relative; display: flex; align-items: center; gap: 2px; height: 64px; border-radius: 8px; cursor: pointer; touch-action: pan-y; user-select: none; outline: none; }
${R} .pe-bar { flex: 1 1 0; min-width: 2px; border-radius: 999px; background: color-mix(in oklch, var(--ink) 22%, var(--card)); pointer-events: none; }
${R} .pe-bar.is-preview { background: color-mix(in oklch, var(--pe-fill) 45%, var(--card)); }
${R} .pe-bar.is-played { background: var(--pe-fill); }
${R} .pe-cursor { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); pointer-events: none; }
${R} .pe-ticks { position: relative; height: 8px; margin-top: 10px; }
${R} .pe-ticks span { position: absolute; top: 0; width: 2px; height: 8px; margin-left: -1px; border-radius: 2px; background: color-mix(in oklch, var(--ink) 35%, var(--card)); }
${R} .pe-ticks span.is-on { width: 4px; margin-left: -2px; background: var(--pe-fill); }
${R} .pe-tip { position: absolute; top: 72px; z-index: 2; max-width: 220px; padding: 6px 12px; overflow: hidden; border-radius: 8px; background: var(--ink); color: var(--card); font-size: .875rem; font-weight: 600; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; transform: translateX(-50%); pointer-events: none; box-shadow: var(--shadow-sm, 0 1px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .3)); }
${R} .pe-tip b { margin-right: 6px; font-weight: 800; font-variant-numeric: tabular-nums; }
${R}.is-disabled .pe-wave { cursor: not-allowed; }
${R}.is-disabled .pe-bar { opacity: .5; }
${R} .pe-pitch p { margin: 0; }
${R} .pe-line { color: var(--ink); font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.5; text-wrap: pretty; }
${R} .pe-line:first-child { font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.3; }
${R} .pe-line + .pe-line { margin-top: 12px; }
${R} .pe-pitch .pe-punch { margin-top: 16px; color: var(--accent); font-family: var(--font-display); font-weight: var(--display-weight, 800); text-transform: var(--display-case, none); font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.06; letter-spacing: -.03em; }
${R} .pe-chapters { display: grid; gap: 4px; margin: 0 -12px; padding: 0; list-style: none; }
${R} .pe-chap { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: min(var(--button-radius, 10px), 14px); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
${R} .pe-chap:hover { background: color-mix(in oklch, var(--ink) 5%, var(--card)); }
${R} .pe-chap.is-on { background: color-mix(in oklch, var(--accent) 10%, var(--card)); }
${R} .pe-chap:disabled { cursor: not-allowed; background: transparent; }
${R} .pe-chap-time { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 4px 12px; border-radius: 999px; background: color-mix(in oklch, var(--ink) 7%, var(--card)); color: var(--ink); font-size: .875rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
${R} .pe-chap.is-on .pe-chap-time { background: var(--pe-fill); color: var(--accent-fill-ink, var(--card)); }
${R} .pe-chap-text { padding-top: 2px; font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.4; text-wrap: pretty; }
${R} .pe-chap.is-on .pe-chap-text { font-weight: 700; }
${R} .pe-offer { border-color: oklch(from var(--accent) l c h / .4); box-shadow: var(--shadow-lg, 0 2px 4px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .22), 0 12px 24px -8px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .32)); }
${R} .pe-offer-top { display: flex; align-items: flex-start; gap: 16px; }
${R} .pe-offer-top img { flex: none; width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
${R} .pe-offer-top .pe-h3 { margin: 0; }
${R} .pe-offer-detail { margin: 12px 0 0; color: var(--muted); font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.5; text-wrap: pretty; }
${R} .pe-price { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 20px 0 0; }
${R} .pe-was { position: relative; color: var(--muted); font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3125rem, 1.8vw, 1.625rem); line-height: 1; text-decoration: none; font-variant-numeric: tabular-nums; }
${R} .pe-was::after { content: ""; position: absolute; top: 50%; left: -10%; right: -10%; height: 3px; margin-top: -1.5px; border-radius: 3px; background: var(--danger); rotate: -18deg; }
${R} .pe-now-price { color: var(--ink); }
${R} .pe-price-note { margin: 12px 0 0; color: var(--muted); font-size: .9375rem; font-weight: 600; line-height: 1.4; }
${R} .pe-cta { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin: 20px 0 0; padding: 12px 28px; border: 0; border-radius: var(--button-radius, var(--radius, 12px)); background: linear-gradient(oklch(from var(--pe-btn) calc(l + .04) c h), oklch(from var(--pe-btn-2) calc(l - .02) c h)); color: var(--button-ink, var(--cta-ink)); font-family: var(--button-font, var(--font-display)); font-weight: var(--button-weight, 800); text-transform: var(--button-case, none); font-size: clamp(1.125rem, 1.55vw, 1.375rem); line-height: 1.15; text-align: center; text-wrap: balance; text-decoration: none; text-shadow: var(--button-text-shadow, none); cursor: pointer; box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--pe-btn) calc(l + .14) c h / .7), inset 0 -3px 0 oklch(from var(--pe-btn) calc(l - .16) c h), 0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .3), 0 8px 16px -6px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .45)); }
${R} .pe-cta:hover, ${R} .pe-cta.is-hover { background: linear-gradient(oklch(from var(--pe-btn) calc(l - .01) c h), oklch(from var(--pe-btn-2) calc(l - .07) c h)); box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--pe-btn) calc(l + .1) c h / .6), inset 0 -3px 0 oklch(from var(--pe-btn) calc(l - .2) c h), 0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .34), 0 10px 18px -6px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .55)); }
${R} .pe-cta:active, ${R} .pe-cta.is-active { transform: translateY(1px); background: linear-gradient(oklch(from var(--pe-btn) calc(l - .05) c h), oklch(from var(--pe-btn-2) calc(l - .08) c h)); box-shadow: inset 0 2px 4px oklch(from var(--pe-btn) calc(l - .24) c h / .55), inset 0 -2px 0 oklch(from var(--pe-btn) calc(l - .16) c h), 0 1px 1px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / .3); }
${R} .pe-cta:disabled { transform: none; background: var(--secondary); color: var(--secondary-ink); text-shadow: none; box-shadow: var(--button-2-shadow, var(--shadow-sm)); cursor: not-allowed; }
${R} .pe-offer .pe-cta { min-height: 64px; margin-top: 24px; }
${R} .pe-reassure { margin: 12px 0 0; color: var(--muted); font-size: .9375rem; font-weight: 600; line-height: 1.4; text-align: center; text-wrap: pretty; }
${R} .pe-reassure svg { display: inline-block; width: 16px; height: 16px; margin-inline-end: .4em; vertical-align: -0.15em; color: var(--success); }
${R} .pe-plats { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
${R} .pe-plat { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid var(--button-2-border, transparent); border-radius: var(--button-radius, var(--radius, 12px)); background: var(--button-2-bg, var(--secondary)); color: var(--button-2-ink, var(--secondary-ink)); box-shadow: var(--button-2-shadow, var(--shadow-sm)); font-family: var(--button-font, var(--font-display)); font-weight: var(--button-weight, 800); text-transform: var(--button-case, none); font-size: 1.0625rem; line-height: 1.2; text-align: left; text-decoration: none; cursor: pointer; }
${R} .pe-plat svg { flex: none; }
${R} .pe-plat:hover { background: oklch(from var(--button-2-bg, var(--secondary)) calc(l - .04) c h); }
${R} .pe-plat:active { transform: translateY(1px); }
${R} .pe-plat:disabled { transform: none; background: color-mix(in oklch, var(--ink) 4%, var(--card)); color: var(--muted); box-shadow: none; cursor: not-allowed; }
${R} :is(.pe-cta, .pe-play, .pe-skip, .pe-plat, .pe-chap):focus-visible { outline: 3px solid var(--pe-ring); outline-offset: 3px; }
${R} .pe-wave:focus-visible { outline: 3px solid var(--pe-ring); outline-offset: 6px; }
@media (max-width: 1080px) {
${R} .pe-head { max-width: 600px; margin-inline: auto; }
${R} .pe-board { display: flex; flex-direction: column; align-items: stretch; gap: 32px; max-width: 600px; margin-inline: auto; }
${R} .pe-note, ${R} .pe-cover { min-width: 0; max-width: 100%; }
${R} .pe-col { display: contents; }
${R} .pe-cover { order: 1; }
${R} .pe-player { order: 2; margin-top: -8px; }
${R} .pe-pitch { order: 3; --pe-tilt: -0.7deg; }
${R} .pe-notes { order: 4; --pe-tilt: 0.5deg; }
${R} .pe-offer { order: 5; }
${R} .pe-subs { order: 6; --pe-tilt: -0.4deg; }
}
@media (max-width: 640px) {
${R} .pe-head { grid-template-columns: minmax(0, 1fr); gap: 12px; }
${R} .pe-ep { flex-direction: row; align-items: baseline; justify-self: start; gap: 10px; min-width: 0; padding: 6px 14px 8px; }
${R} .pe-ep .pe-ep-num { font-size: 1.75rem; }
${R} .pe-meta img { width: 44px; height: 44px; }
${R} .pe-player-top { gap: 12px; }
${R} .pe-skips { gap: 4px; }
}
@media (min-width: 1081px) {
${R} .pe-offer-top { flex-direction: column; gap: 16px; }
${R} .pe-offer-top img { width: 72px; height: 72px; }
}
@media (prefers-reduced-motion: no-preference) {
${R} .pe-reveal { animation: pe-rise .45s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(min(var(--pe-i, 0), 4) * .07s); }
${R} .pe-note--pinned { transition: rotate .2s ease, translate .2s ease; }
${R} :is(.pe-cta, .pe-play, .pe-skip, .pe-plat, .pe-chap) { transition: background .16s ease, box-shadow .16s ease, transform .16s ease; }
${R} .pe-bar { transition: background .16s ease; }
${R} .pe-cursor { transition: left .2s linear; }
${R}.is-dragging .pe-cursor { transition: none; }
@keyframes pe-rise { from { opacity: .82; translate: 0 8px; } }
}
`
pieces/content/podcast-episode/specimen.tsx 64 lines
import __studioImagea6f04cb9 from "../assets/738ef72e0ef92b3b.webp";
import __studioImaged427e221 from "../assets/6f9865dd81ac925f.webp";
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import { PodcastEpisode } from "../podcast-episode"
export const states = ["default", "hover", "active", "disabled"]
type SpecimenState = "default" | "hover" | "active" | "disabled"
export default function PodcastEpisodeSpecimen({ state = "default" }: { state?: SpecimenState }) {
const sample = defaults.sample
const guide = sample.items[0]
return (
<PodcastEpisode
state={state}
showName="The Funnel Starter Podcast"
episodeNumber={14}
title="Build your first funnel with three pages, not ten"
durationSeconds={2304}
coverImage={slot(
"product",
__studioImagea6f04cb9
)}
coverAlt="Studio microphone in front of a desk with a laptop and three sketched funnel pages"
hostName="Maya Ellis"
hostImage={slot(
"presenter",
__studioImaged427e221
)}
hostImageAlt="Portrait of Maya Ellis"
pitch={[
"Most first funnels never launch.",
"You open the builder, see ten pages to make, and stall on page one.",
"Maya cuts that list to the pages that actually sell.",
]}
punchline="Three."
showNotesHeading="Four fixes for your first funnel, in order"
chapters={[
{ time: 195, title: "Why your first funnel needs three pages, not ten" },
{ time: 700, title: "The one question that writes your headline for you" },
{ time: 1325, title: "How to price your offer before you open a page builder" },
{ time: 1890, title: "The 5-minute launch check that catches broken forms" },
]}
offer={{
heading: "Map your three pages tonight",
detail: `${sample.name}: the guide, workbook and checklist in one download.`,
productImage: slot("item-1", guide.image),
productImageAlt: guide.imageAlt,
regularPrice: sample.regularPrice,
price: sample.price,
note: sample.note,
label: "Send me the kit",
reassurance: sample.guarantee,
}}
subscribeHeading="Get every new episode free"
platforms={[
{ name: "Apple Podcasts", icon: "podcast" },
{ name: "Spotify", icon: "headphones" },
{ name: "RSS feed", icon: "rss" },
]}
/>
)
}
| Name | Type | Details |
|---|---|---|
showName OptionalPodcastEpisode |
string |
|
episodeNumber OptionalPodcastEpisode |
string | number |
|
title OptionalPodcastEpisode |
React.ReactNode |
|
durationSeconds OptionalPodcastEpisode |
number |
|
coverImage OptionalPodcastEpisode |
string |
|
coverAlt OptionalPodcastEpisode |
string |
|
hostName OptionalPodcastEpisode |
string |
|
hostImage OptionalPodcastEpisode |
string |
|
hostImageAlt OptionalPodcastEpisode |
string |
|
pitch OptionalPodcastEpisode |
React.ReactNode[] |
|
punchline OptionalPodcastEpisode |
React.ReactNode |
|
showNotesHeading OptionalPodcastEpisode |
React.ReactNode |
|
chapters OptionalPodcastEpisode |
PodcastChapter[] |
|
audioSrc OptionalPodcastEpisode |
string |
|
startAt OptionalPodcastEpisode |
number |
|
peaks OptionalPodcastEpisode |
number[] |
|
offer OptionalPodcastEpisode |
PodcastOffer |
|
subscribeHeading OptionalPodcastEpisode |
React.ReactNode |
|
platforms OptionalPodcastEpisode |
PodcastPlatform[] |
|
copy OptionalPodcastEpisode |
Partial<PodcastEpisodeCopy> |
|
onPlay OptionalPodcastEpisode |
(seconds: number) => void |
|
onSeek OptionalPodcastEpisode |
(seconds: number) => void |
|
onAction OptionalPodcastEpisode |
() => void |
|
onSubscribe OptionalPodcastEpisode |
(platform: PodcastPlatform) => void |
|
state OptionalPodcastEpisode |
"default" | "hover" | "active" | "disabled" |
|
className OptionalPodcastEpisode |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
presenter- A photo of the host, coach or founder.
product- The main product shot or cover (ebook, kit, bottle).
-
6f9865dd81ac925f.webp
image/webp · 104 KB
-
738ef72e0ef92b3b.webp
image/webp · 101 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB