Updated to Astro v5 beta.
All checks were successful
Build and deploy website / build (push) Successful in 1m56s
All checks were successful
Build and deploy website / build (push) Successful in 1m56s
Created a new component for a collapsable list Implemented some of the new features. - astro:env - New astro content layer Signed-off-by: Martin Berg Alstad <git@martials.no>
This commit is contained in:
@ -1,12 +1,16 @@
|
||||
---
|
||||
import ProjectCard from "./ProjectCard.astro"
|
||||
import * as m from "@/paraglide/messages"
|
||||
import { type CollectionEntry } from "astro:content"
|
||||
import { type NavLink } from "@/utils/linking"
|
||||
|
||||
interface Props {
|
||||
projects: any[] // TODO Type this
|
||||
projects: CollectionEntry<"projects">[]
|
||||
}
|
||||
|
||||
const { projects } = Astro.props
|
||||
|
||||
const baseUrl: NavLink = "/projects"
|
||||
---
|
||||
|
||||
<h1 class="text-4xl font-bold text-center sm:my-10 mt-2">{m.myProjects()}</h1>
|
||||
@ -15,12 +19,12 @@ const { projects } = Astro.props
|
||||
projects.map(
|
||||
({
|
||||
data: { title, description, tags, heroImage, heroImageAlt },
|
||||
slug
|
||||
id
|
||||
}) => (
|
||||
<div class="my-5 px-2">
|
||||
<ProjectCard
|
||||
title={title}
|
||||
linkTo={`/project/${slug}`}
|
||||
linkTo={`${baseUrl}/${id}`}
|
||||
description={description}
|
||||
tags={tags}
|
||||
image={heroImage}
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
import Layout from "@/layouts/Layout.astro"
|
||||
import { Image } from "astro:assets"
|
||||
import { getEntry } from "astro:content"
|
||||
import { getEntry, render } from "astro:content"
|
||||
import BadgeList from "../badge/BadgeList.astro"
|
||||
import * as m from "@/paraglide/messages"
|
||||
import { languageTag } from "@/paraglide/runtime"
|
||||
@ -15,7 +15,7 @@ interface Props {
|
||||
const { project } = Astro.props
|
||||
|
||||
const entry = await getEntry("projects", project)
|
||||
const { Content } = await entry!.render()
|
||||
const { Content } = await render(entry)
|
||||
const {
|
||||
title,
|
||||
description,
|
||||
|
Reference in New Issue
Block a user