add: basic blog layout
Basic Blog Layout to work on
This commit is contained in:
parent
9d691974ce
commit
91b59e4ebe
15 changed files with 278 additions and 3 deletions
29
app/components/Blog/Author.vue
Normal file
29
app/components/Blog/Author.vue
Normal file
|
@ -0,0 +1,29 @@
|
|||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue