diff --git a/src/components/Card.astro b/src/components/Card.astro index 106bebb..06b9a3b 100644 --- a/src/components/Card.astro +++ b/src/components/Card.astro @@ -23,6 +23,12 @@ interface Props { const { entry } = Astro.props; const { data, id } = entry; + +// Tech chips are capped to keep the row on a single line (the full list still +// lives in data-tech for search). +const maxTech = 3; +const shownTech = data.tech.slice(0, maxTech); +const extraTech = data.tech.length - maxTech; ---
person.name).join(', ')} data-description={data.description} - class="border-line bg-surface overflow-hidden rounded-[var(--radius-card)] border" + class="group border-line bg-surface overflow-hidden rounded-[var(--radius-card)] border transition duration-200 ease-in-out hover:-translate-y-2 hover:shadow-2xl" >
-

{data.title}

- {data.year} +

+ {data.title} +

+ + {data.year} +
{ /* Plain text — the whole card is already a link, so no nested anchors. */ } -

+

Built by {data.builtBy.map((person) => person.name).join(', ')}

+

+ {data.description} +

+ +
    + { + shownTech.map((t) => ( +
  • + {t} +
  • + )) + } + { + extraTech > 0 && ( +
  • + +{extraTech} more +
  • + ) + } +
diff --git a/src/content/projects/example-project-1/index.md b/src/content/projects/example-project-1/index.md index f89c5fa..a3f4392 100644 --- a/src/content/projects/example-project-1/index.md +++ b/src/content/projects/example-project-1/index.md @@ -8,7 +8,7 @@ builtBy: url: 'https://example.com/student-3' - name: 'Example Student 4' url: 'https://example.com/student-4' -tech: ['TypeScript', 'pnpm'] +tech: ['TypeScript', 'pnpm', 'TypeScript', 'pnpm', 'TypeScript', 'pnpm'] year: 2021 domains: ['web', 'cybersecurity'] github: 'https://github.com/example/example-project-1'