diff options
| author | schererleander <leander@schererleander.de> | 2025-12-28 21:45:04 +0100 |
|---|---|---|
| committer | schererleander <leander@schererleander.de> | 2025-12-28 21:45:04 +0100 |
| commit | 33a0e018def36d6b5f26cefb0434064b33fb50fb (patch) | |
| tree | 52b343d93b4a843ea493796c4bbb7bb648a90b92 | |
| parent | cfa2ce5998866b018c33ea92df9604d9f72ace21 (diff) | |
feat: add image/video preview of projects
| -rw-r--r-- | components/projects-grid.tsx | 38 | ||||
| -rw-r--r-- | public/images/authentication-preview.png | bin | 0 -> 98037 bytes | |||
| -rw-r--r-- | public/videos/boilerplate-preview.mp4 | bin | 0 -> 166745 bytes | |||
| -rw-r--r-- | public/videos/spaceinvaders-preview.mp4 | bin | 0 -> 282733 bytes |
4 files changed, 32 insertions, 6 deletions
diff --git a/components/projects-grid.tsx b/components/projects-grid.tsx index 9ccb0fb..52ef95a 100644 --- a/components/projects-grid.tsx +++ b/components/projects-grid.tsx @@ -1,10 +1,13 @@ import { Card, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import Link from "next/link"; +import Image from "next/image"; interface Project { title: string; description: string; githubUrl: string; + videoSrc?: string; + imageSrc?: string; } const projects: Project[] = [ @@ -12,20 +15,23 @@ const projects: Project[] = [ title: "Boilerplate", description: "A comprehensive starter template for modern web development projects.", githubUrl: "https://github.com/schererleander/boilerplate", + videoSrc: "/videos/boilerplate-preview.mp4", }, { - title: "Quiz Website", - description: "An interactive quiz platform built to test your knowledge.", - githubUrl: "https://github.com/schererleander/quiz", + title: "Authentication", + description: "Simple authentication system built using Express.js.", + githubUrl: "https://github.com/schererleander/authentication", + imageSrc: "/images/authentication-preview.png" }, { title: "Space Invaders", - description: "A classic arcade game clone recreated with modern web technologies.", + description: "Space Invaders clone written in Python using Pygame for an old-school project.", githubUrl: "https://github.com/schererleander/spaceinvaders", + videoSrc: "/videos/spaceinvaders-preview.mp4", }, { title: "Specula", - description: "A mirror project or reflection tool (Description inferred from name).", + description: "A minimal TUI tool written in Go to view file metadata and description.", githubUrl: "https://github.com/schererleander/specula", }, ]; @@ -37,7 +43,27 @@ export function ProjectsGrid() { {projects.map((project) => ( <Link href={project.githubUrl} key={project.title} target="_blank" className="block group h-full"> <Card className="h-full transition-all duration-300 bg-card/50 hover:bg-card/80 shadow-none p-0 gap-0 overflow-hidden"> - <div className="w-full h-40 bg-muted animate-pulse" /> + {project.videoSrc ? ( + <video + className="w-full h-40 object-cover" + src={project.videoSrc} + autoPlay + loop + muted + playsInline + aria-label={`${project.title} preview`} + /> + ) : project.imageSrc ? ( + <Image + className="w-full h-40 object-cover" + src={project.imageSrc} + alt={`${project.title} preview`} + width={500} + height={300} + /> + ) : ( + <div className="w-full h-40 bg-muted animate-pulse" /> + )} <CardHeader className="p-6"> <CardTitle className="group-hover:text-primary transition-colors">{project.title}</CardTitle> <CardDescription className="text-muted-foreground/60 group-hover:text-muted-foreground transition-colors">{project.description}</CardDescription> diff --git a/public/images/authentication-preview.png b/public/images/authentication-preview.png Binary files differnew file mode 100644 index 0000000..d719982 --- /dev/null +++ b/public/images/authentication-preview.png diff --git a/public/videos/boilerplate-preview.mp4 b/public/videos/boilerplate-preview.mp4 Binary files differnew file mode 100644 index 0000000..01f478f --- /dev/null +++ b/public/videos/boilerplate-preview.mp4 diff --git a/public/videos/spaceinvaders-preview.mp4 b/public/videos/spaceinvaders-preview.mp4 Binary files differnew file mode 100644 index 0000000..5e9cb26 --- /dev/null +++ b/public/videos/spaceinvaders-preview.mp4 |
