import Image from "next/image"; import { ImageIcon } from "lucide-react"; import { cn } from "@/lib/utils"; type PortfolioCoverProps = { src: string | null; title: string; category?: string; sizes?: string; priority?: boolean; className?: string; }; const DEFAULT_SIZES = "(min-width: 1024px) 33vw, (min-width: 640px) 50vw, 100vw"; /** * Project cover. Renders the stored image when present, otherwise a restrained * branded placeholder (owner will replace placeholders with real artwork). * Fills a positioned, aspect-sized parent (`relative` + `aspect-*`). */ export function PortfolioCover({ src, title, category, sizes = DEFAULT_SIZES, priority = false, className, }: PortfolioCoverProps) { if (src) { return ( {title} ); } const monogram = title.trim().charAt(0).toUpperCase() || "•"; return (
{monogram} {category}
); }