Files
caperren-com/src/components/Timeline.astro
Corwin Perren 9a4ecdd073
All checks were successful
Build and Test - Staging / determine_version (pull_request) Successful in 24s
Build and Test - Staging / build_and_push (pull_request) Successful in 2m5s
Build and Test - Staging / test (pull_request) Successful in 3s
Build and Test - Staging / deploy_staging (pull_request) Successful in 5s
Move inline typescript to dedicated scripts directory
2025-11-07 20:58:03 -08:00

34 lines
1.2 KiB
Plaintext

---
import type {timelineEntry} from "@interfaces/timeline.ts";
const timeline: timelineEntry[] = Astro.props.timeline || [];
---
<custom-timeline>
<div class="relative z-10 grid gap-6 grid-flow-row sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 3xl:grid-cols-6"
data-timeline>
{timeline.map((entry, index) => (
<div class="pt-1 border bg-black border-caperren-green rounded-lg min-w-s max-w-s px-2 pb-2"
data-timeline-node-index={index}
>
<h3 class="text-lg font-bold">
{entry.event}
</h3>
<h4 class="font-semibold leading-none">
{entry.eventDetail}
</h4>
<time class="mb-2 mt-1 text-sm italic leading-none">
{entry.date}
</time>
{entry.description && (
<p class="text-sm font-normal">
{entry.description}
</p>
)}
</div>
))}
</div>
</custom-timeline>
<script src="@scripts/components/timeline.ts"/>