Skip to content

Commit 89b06f2

Browse files
committed
update
1 parent 18cc8a2 commit 89b06f2

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

app/learn/large-language-models/batch-size-vs-sequence-length/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default function BatchSizeVsSequenceLengthPage() {
66
contentPath="large-language-models/batch-size-vs-sequence-length"
77
prevLink={{ href: "/learn", label: "← Back to Course" }}
88
nextLink={{ href: "/learn", label: "Continue Learning →" }}
9+
youtubeVideoId="bu5dhaLmr7E"
910
/>
1011
);
1112
}

components/lesson-page.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)