add: first post, external posts, new comps
Add first post for monday, add external posts from other authors, add components for internal and external links
This commit is contained in:
parent
427d9ae276
commit
0a481fee5e
19 changed files with 264 additions and 329 deletions
|
@ -5,7 +5,7 @@
|
|||
loading="lazy"
|
||||
width="50"
|
||||
height="50"
|
||||
:srcset="imageSet.join(', ')"
|
||||
:srcset="imageSet"
|
||||
:src="initialImage"
|
||||
aria-hidden="true"
|
||||
:alt="`Profilbild von ${name}`"
|
||||
|
@ -24,9 +24,10 @@ import { getImageSet, getInitialImage } from '../../utils/image'
|
|||
type Props = {
|
||||
name: string
|
||||
date: string
|
||||
img?: string
|
||||
}
|
||||
|
||||
const { name, date } = defineProps<Props>()
|
||||
const { name, date, img } = defineProps<Props>()
|
||||
|
||||
const formatter = new Intl.DateTimeFormat('de-DE', {
|
||||
year: 'numeric',
|
||||
|
@ -36,6 +37,13 @@ const formatter = new Intl.DateTimeFormat('de-DE', {
|
|||
|
||||
const dateFormatted = computed(() => formatter.format(new Date(date)))
|
||||
|
||||
const imageSet = getImageSet('/img/blog/authors/', name)
|
||||
const initialImage = getInitialImage('/img/blog/authors/', name)
|
||||
const imageSet = computed(() => {
|
||||
if (img) return img
|
||||
return getImageSet('/img/blog/authors/', name).join(', ')
|
||||
})
|
||||
|
||||
const initialImage = computed(() => {
|
||||
if (img) return img
|
||||
return getInitialImage('/img/blog/authors/', name)
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue