@@ -18,9 +18,10 @@ interface LessonPageProps {
1818 contentPath : string ;
1919 prevLink ?: { href : string ; label : string } ;
2020 nextLink ?: { href : string ; label : string } ;
21+ youtubeVideoId ?: string ;
2122}
2223
23- export function LessonPage ( { contentPath, prevLink, nextLink } : LessonPageProps ) {
24+ export function LessonPage ( { contentPath, prevLink, nextLink, youtubeVideoId } : LessonPageProps ) {
2425 const { language } = useLanguage ( ) ;
2526 const pathname = usePathname ( ) ;
2627 const [ markdownContent , setMarkdownContent ] = useState < string > ( '' ) ;
@@ -184,6 +185,20 @@ export function LessonPage({ contentPath, prevLink, nextLink }: LessonPageProps)
184185 < div className = "container mx-auto px-4 sm:px-6 lg:px-8 pt-8 pb-16" >
185186 < article className = "max-w-4xl mx-auto" >
186187 < div className = "bg-white/5 backdrop-blur-xl border border-white/10 rounded-3xl shadow-2xl p-8 sm:p-12" >
188+ { youtubeVideoId && (
189+ < div className = "mb-8" >
190+ < div className = "relative" style = { { paddingTop : '56.25%' } } >
191+ < iframe
192+ className = "absolute top-0 left-0 w-full h-full rounded-lg shadow-2xl"
193+ src = { `https://www.youtube.com/embed/${ youtubeVideoId } ` }
194+ title = "YouTube video player"
195+ frameBorder = "0"
196+ allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
197+ allowFullScreen
198+ > </ iframe >
199+ </ div >
200+ </ div >
201+ ) }
187202 < div className = "prose prose-lg prose-invert max-w-none" >
188203 < MarkdownRenderer content = { markdownContent } />
189204 </ div >
0 commit comments