Merge branch 'sanity-cms' of https://gitea.rannes.dev/christian/my-portfolio into sanity-cms

This commit is contained in:
ChrQR 2024-05-12 14:11:17 +02:00
commit 3b46a33b5d
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ export async function load({ params }) {
title, title,
slug, slug,
_createdAt, _createdAt,
coverImage { mainImage {
..., ...,
asset-> asset->
}, },

View File

@ -6,7 +6,7 @@
{#each data.posts as post} {#each data.posts as post}
<div class="border-2 border-slate-500 rounded my-2 text-l p-4"> <div class="border-2 border-slate-500 rounded my-2 text-l p-4">
<img class="max-h-32 mx-auto" src={post.coverImage.asset.url} alt={post.title}> <img class="max-h-32 mx-auto" src={post.mainImage.asset.url} alt={post.title}>
<h2 class="text-xl">{post.title}</h2> <h2 class="text-xl">{post.title}</h2>
{#each post.body as block} {#each post.body as block}
<PortableText <PortableText