feat(lesereisen): frontend — type badge, Journey reader, type selector on new #789

Merged
marcel merged 27 commits from feat/issue-752-lesereisen-frontend into feat/issue-751-journey-item-crud-api 2026-06-09 11:47:46 +02:00
Showing only changes of commit c50f04bafa - Show all commits

View File

@@ -1,8 +1,7 @@
<script lang="ts">
import { m } from '$lib/paraglide/messages.js';
import { plainExcerpt } from '$lib/shared/utils/extractText';
import { formatDate } from '$lib/shared/utils/date';
import { formatAuthorName } from './utils';
import { formatAuthorName, formatPublishedAt } from './utils';
import type { components } from '$lib/generated/api';
type GeschichteRow = Pick<
@@ -14,10 +13,7 @@ let { geschichte }: { geschichte: GeschichteRow } = $props();
const isJourney = $derived(geschichte.type === 'JOURNEY');
const publishedAt = $derived.by(() => {
if (!geschichte.publishedAt) return null;
return formatDate(geschichte.publishedAt.slice(0, 10), 'short');
});
const publishedAt = $derived(formatPublishedAt(geschichte.publishedAt, 'short'));
const authorName = $derived(formatAuthorName(geschichte.author));
</script>