Added Sb1 Actual integration to projects.
All checks were successful
Build and deploy website / build (push) Successful in 39s

- Code style is Catppuccin Mocha
- Added lang tag to project
- Added keywords to project
- Sort projects by latest updated
This commit is contained in:
2025-02-27 21:13:01 +01:00
parent 14c65bda05
commit a2584b97a1
13 changed files with 175 additions and 33 deletions

View File

@ -2,6 +2,7 @@
import type { Project } from "@/types/types"
import type { NavLink } from "@/utils/linking"
import ProjectCard from "./ProjectCard.astro"
import dayjs from "dayjs"
interface Props {
projects: ReadonlyArray<Project>
@ -14,19 +15,26 @@ const baseUrl: NavLink = "/projects"
<div class="flex flex-wrap justify-around">
{
projects.map(
({ data: { title, description, tags, heroImage, heroImageAlt }, id }) => (
<div class="my-5 px-2">
<ProjectCard
title={title}
linkTo={`${baseUrl}/${id}`}
description={description}
tags={tags}
image={heroImage}
imageAlt={heroImageAlt}
/>
</div>
),
)
projects
.toSorted((a, b) =>
dayjs(a.data.updatedAt).isBefore(dayjs(b.data.updatedAt)) ? 1 : -1,
)
.map(
({
data: { title, description, tags, heroImage, heroImageAlt },
id,
}) => (
<div class="my-5 px-2">
<ProjectCard
title={title}
linkTo={`${baseUrl}/${id}`}
description={description}
tags={tags}
image={heroImage}
imageAlt={heroImageAlt}
/>
</div>
),
)
}
</div>