feat: build interactive documentary page with audio player and chapter navigation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
28
apps/web/src/components/documentary/ChapterContent.tsx
Normal file
28
apps/web/src/components/documentary/ChapterContent.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import Image from "next/image";
|
||||
import type { Chapter } from "@afterlife/shared";
|
||||
|
||||
interface ChapterContentProps {
|
||||
chapter: Chapter;
|
||||
}
|
||||
|
||||
export function ChapterContent({ chapter }: ChapterContentProps) {
|
||||
return (
|
||||
<article className="max-w-3xl">
|
||||
{chapter.coverImage && (
|
||||
<div className="relative aspect-video rounded-lg overflow-hidden mb-8">
|
||||
<Image
|
||||
src={chapter.coverImage.url}
|
||||
alt={chapter.coverImage.alternativeText || chapter.title}
|
||||
fill
|
||||
className="object-cover"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<h2 className="text-3xl font-bold mb-6">{chapter.title}</h2>
|
||||
<div
|
||||
className="prose prose-invert prose-lg max-w-none"
|
||||
dangerouslySetInnerHTML={{ __html: chapter.content }}
|
||||
/>
|
||||
</article>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user