From b23c0b48fbb860ccea1fadf16d28a51b57c65391 Mon Sep 17 00:00:00 2001 From: Mike Karl Date: Tue, 21 Oct 2025 10:22:00 +0200 Subject: [PATCH] Enhance Card component with new background image and styling options; update Home page to utilize these features for improved visual appeal across sections. --- app/components/card.tsx | 39 ++++++++++++++++++++++++-- app/page.tsx | 62 +++++++++++++++++++++++++++++++++++------ 2 files changed, 91 insertions(+), 10 deletions(-) diff --git a/app/components/card.tsx b/app/components/card.tsx index ab57a04..2fa425b 100644 --- a/app/components/card.tsx +++ b/app/components/card.tsx @@ -6,6 +6,10 @@ interface CardProps { variant?: 'default' | 'elevated' | 'glass' | 'outlined'; hover?: boolean; style?: React.CSSProperties; + bgImageUrl?: string; // optional background image shown on right with a diagonal mask + bgOpacity?: number; // 0..1 opacity for the image + bgDim?: number; // 0..1 black overlay intensity over the image + bg?: string; // optional generic CSS background (e.g., linear-gradient) } export default function Card({ @@ -13,9 +17,13 @@ export default function Card({ className = '', variant = 'default', hover = true, - style + style, + bgImageUrl, + bgOpacity = 0.25, + bgDim = 0.35, + bg }: CardProps) { - const baseClasses = "rounded-xl transition-all duration-300 ease-out"; + const baseClasses = "relative overflow-hidden rounded-xl transition-all duration-300 ease-out"; const variantClasses = { default: "bg-gray-900/50 border border-gray-800/50 backdrop-blur-sm", @@ -37,6 +45,33 @@ export default function Card({ ...style }} > + {(bg || bgImageUrl) && ( + <> + {/* Image layer clipped with diagonal mask, only right side visible */} +
+ {/* Dimming overlay to preserve contrast over the image area only */} +
+ + )} {children}
); diff --git a/app/page.tsx b/app/page.tsx index ad253d3..b1113f4 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -6,7 +6,12 @@ export default function Home() { {/* Hero Section */}
- +

About Me

@@ -21,7 +26,14 @@ export default function Home() {
- +

Current Focus

@@ -38,7 +50,13 @@ export default function Home() {
- +

Quick Stats

@@ -65,7 +83,12 @@ export default function Home() { {/* Education Section */}
- +

Gymnasium Zwiesel

High School Education

@@ -77,7 +100,12 @@ export default function Home() {
- +

University of Passau

Higher Education

@@ -154,7 +182,13 @@ export default function Home() { {/* Portfolio Section */}
- +

Raytracing in a Weekend

Graphics Programming

@@ -196,7 +230,13 @@ export default function Home() {
- +

6502 Emulator

System Programming

@@ -217,7 +257,13 @@ export default function Home() {
- +

Brainfuck RS

Language Implementation