import { useState } from "react"; import Markdown from "react-markdown"; import { Book, Project, AuthorProfile } from "../types"; import { Leaf, Feather, Star, Sparkles, BookOpen, ExternalLink, ArrowRight } from "lucide-react"; import SpotlightSection from "./SpotlightSection"; interface ClaraPortfolioProps { data: AuthorProfile; } export default function ClaraPortfolio({ data }: ClaraPortfolioProps) { const [selectedBook, setSelectedBook] = useState(null); const [selectedProject, setSelectedProject] = useState(null); const accentColor = data.accentColor || "#8FA797"; const secondaryColor = data.secondaryColor || "#B59EB1"; const bgColor = data.backgroundColor || "#0c0a09"; const cardBgColor = data.cardBgColor || "#1c1917"; const fontClass = data.fontFamily === "sans" ? "font-sans" : data.fontFamily === "mono" ? "font-mono" : "font-serif"; return (
{/* Hero Banner Background if present */} {data.heroBannerUrl && (
)} {/* Delicate organic gradients */}
{/* Header / Hero */}
{data.badgeText || "Lyrik & Naturphilosophie"}

{data.heroTitle || data.name || "CLARA FINCH"}

{data.heroSubtitle || "LYRIK, ESSAYS & NATURPHILOSOPHIE"}

{/* Main Grid */}
{/* About writer */}
{/* Outer soft natural glow */}
{data.name}

{data.aboutTitle || "Das Atmen zwischen den Zeilen"}

{data.bio}

{(data.bioTag1Label || data.bioTag1Value) && (
{data.bioTag1Label || "Genre"}
{data.bioTag1Value || "Lyrik & Essays"}
)} {(data.bioTag2Label || data.bioTag2Value) && (
{data.bioTag2Label || "Ästhetik"}
{data.bioTag2Value || "Natur & Poesie"}
)} {(data.bioTag3Label || data.bioTag3Value) && (
{data.bioTag3Label || "Fokus"}
{data.bioTag3Value || "Naturkontemplation"}
)}
{/* Section 1.5: Spotlight / Neuerscheinung */} {data.books?.find(b => b.isSpotlight) && ( b.isSpotlight)!} title={data.spotlightTitle} subtitle={data.spotlightSubtitle} accentColor={accentColor} secondaryColor={secondaryColor} cardBgColor={cardBgColor} /> )} {/* Dynamic ongoing work writing progress */}

{data.projectsTitle || "Aus den Notizbüchern"}

{data.projectsSubtitle || "Gedanken im Entwurf, Fragmente und Sammlungen, die bald das Licht der Welt erblicken."}

{data.projects.map((project) => ( ))}
{/* Bookshelf display */}

{data.booksTitle || "Gedruckte Werke"}

{data.booksSubtitle || "Erschlossene Wortlandschaften. Wählen Sie einen Band, um tiefer hineinzuhören."}

{data.books.map((book) => ( ))}
{/* Custom Highlight Section if present */} {(data.customSectionTitle || data.customSectionContent) && (
{data.customSectionTitle && (

{data.customSectionTitle}

)} {data.customSectionContent && (
)}
)}
{/* Book details modular modal */} {selectedBook && (
setSelectedBook(null)} />
{/* Book Cover */} {/* Details text area */}
Erschienen: {selectedBook.publishedYear} {selectedBook.genres?.map((genre) => ( {genre} ))}

{selectedBook.title}

{selectedBook.subtitle && (

{selectedBook.subtitle}

)}
{selectedBook.description}
{/* Embedded Spotify player (Only if playlist is non-empty) */} {selectedBook.spotifyPlaylistId && selectedBook.spotifyPlaylistId.trim() !== "" && (

Klanglandschaft (Begleitende Playlist)