);
}
// Cards in a responsive grid
export function TutorialGrid({ tutorials, className }: { tutorials: TutorialMeta[]; className?: string }) {
return (
{tutorials.map((t) => (
))}
);
}
// A tutorial with a video: its poster beside the title (or above it when compact) and a Watch link
function FeaturedTutorial({ tutorial, compact }: { tutorial: TutorialMeta; compact?: boolean }) {
const track = getTrack(tutorial.track);
return (
{tutorial.title}
{tutorial.description}
{tutorial.draft && }
{tutorial.level} · {tutorial.minutes} min watch
Watch
);
}
// Tutorials with videos get the room; pass only those. Compact puts two smaller cards per row on anything wider than a phone
export function FeaturedTutorials({
tutorials,
compact,
className,
}: {
tutorials: TutorialMeta[];
compact?: boolean;
className?: string;
}) {
if (tutorials.length === 0) return null;
return (
Featured videos
{tutorials.map((t) => (
))}
);
}
// Written tutorials as plain text rows, with no cover image
export function TutorialRows({ tutorials }: { tutorials: TutorialMeta[] }) {
return (