Latest projects on landing page, moved landing page components
All checks were successful
Build and deploy website / build (push) Successful in 34s

This commit is contained in:
2025-02-16 12:01:51 +01:00
parent 22cdc634f9
commit e1c3ae7d87
7 changed files with 57 additions and 29 deletions

View File

@ -1,32 +1,12 @@
---
import ProjectCard from "./ProjectCard.astro"
import ProjectGrid from "./ProjectGrid.astro"
import { type CollectionEntry } from "astro:content"
import { type NavLink } from "@/utils/linking"
interface Props {
projects: CollectionEntry<"projects">[]
}
const { projects } = Astro.props
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>
),
)
}
</div>
<ProjectGrid projects={projects} />

View File

@ -0,0 +1,32 @@
---
import type { Project } from "@/types/types"
import type { NavLink } from "@/utils/linking"
import ProjectCard from "./ProjectCard.astro"
interface Props {
projects: ReadonlyArray<Project>
}
const { projects } = Astro.props
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>
),
)
}
</div>