Lesezeit added

This commit is contained in:
ebby 2026-08-29 10:45:37 +02:00
parent d1c87db4f7
commit 6951aa51d0
7 changed files with 7 additions and 2 deletions

View file

@ -29,6 +29,8 @@ const localeDate = formatLocalizedDateString(post.date)
<span>{localeDate}</span>
<span class="vertical-line"></span>
<span>Autor: {post.author}</span>
<span class="vertical-line"></span>
<span>Lesezeit: {post.time2read} min</span>
</div>
<p class="description">{post.description}</p>
</div>

View file

@ -18,6 +18,7 @@ const localeDate = formatLocalizedDateString(post.date)
<img src={img.src} alt={post.image.alt} class="rounded" />
<h2 class="headline">{post.title}</h2>
<h7 class="subtitle">{post.subtitle}</h7>
<p>Lesezeit: {post.time2read} min</p>
<p class="description">{post.description}</p>
<div class="bottom-info">
<span>Author: {post.author}</span>

View file

@ -14,6 +14,7 @@ const postSchema = z.object({
author: z.string(),
date: z.coerce.date(),
slug: z.string(),
time2read: z.int()
});
export type PostData = z.infer<typeof postSchema>;

View file

@ -9,6 +9,7 @@ image:
author: Tim
date: '2026-07-10'
slug: Under-Construction
time2read: 1
---
# All Endings Are Beginnings

View file

@ -9,6 +9,7 @@ image:
author: Tim
date: '2026-08-20'
slug: Ostseeurlaub
time2read: 6
---
Eigentlich soll es hier um unser (zukünftiges) Boot und die Segelreisen gehen.

View file

@ -9,6 +9,7 @@ image:
author: Tim
date: '2026-08-29'
slug: Luxusurlaub-in-Matrei
time2read: 14
---
Was könnte ein besser Kontrast zum Zelturlaub an der Ostsee sein, als eine Woche in einem luxuriösen Hotel, mitten in den Alpen?<br />

View file

@ -10,8 +10,6 @@ const allPostsSorted = (await getCollection('posts')).sort(
);
const [mostRecentPost, ...sortedPosts] = allPostsSorted;
console.log(mostRecentPost.data)
---
<Main title="Startseite">