wf4/app/components/Blog/Author.vue
webfussel 9b66a79a8c add: category, date sorting
Add category layouts and date sorting
2025-07-11 13:32:59 +02:00

29 lines
No EOL
599 B
Vue

<template>
<aside class="BlogAuthor">
<div class="image">
<img :src="image" :alt="`Bild von ${name}`"/>
</div>
<div class="meta">
<span class="name">{{ name }}</span>
<span class="date">{{ dateFormatted }}</span>
</div>
</aside>
</template>
<script setup lang="ts">
type Props = {
name: string
image: string
date: string
}
const { date } = defineProps<Props>()
const formatter = new Intl.DateTimeFormat('de-DE', {
year: 'numeric',
month: 'long',
day: '2-digit',
})
const dateFormatted = computed(() => formatter.format(new Date(date)))
</script>