--- /** * ProjectCard.astro * --------------------------------------------------------------------------- * Card for a single project entry from the `projects` collection. Renders title, * role, tech pills, summary, and links (repo/demo/case study). Placeholder * entries (frontmatter `placeholder: true`) get a subtle badge so they read as * "to be filled" rather than real work, per the chosen content approach. */ import { type CollectionEntry } from 'astro:content'; import Icon from '@components/Icon.astro'; interface Props { project: CollectionEntry<'projects'>; } const { project } = Astro.props; const d = project.data; const links = [ d.repo && { href: d.repo, label: 'GitHub', icon: 'github' }, d.demo && { href: d.demo, label: 'Live demo', icon: 'open-in-new' }, d.caseStudy && { href: d.caseStudy, label: 'Case study', icon: 'file-document-outline' }, ].filter(Boolean) as { href: string; label: string; icon: string }[]; ---

{d.title}

{d.role}

{d.placeholder && ( Placeholder )}
{d.tech.length > 0 && ( )}

{d.summary}

{links.length > 0 && ( )}