FIX: better buttons
Better button stuff, better image naming and scaling
This commit is contained in:
parent
cbe1f89ec6
commit
266301aa58
6 changed files with 18 additions and 8 deletions
|
@ -1,6 +1,13 @@
|
|||
<template>
|
||||
<article class="Person flex-col">
|
||||
<img loading="lazy" width="150" height="150" :src="img" :alt="`Bild von ${name}`" />
|
||||
<img
|
||||
loading="lazy"
|
||||
width="150"
|
||||
height="150"
|
||||
:srcset="[getImage('1x', true), getImage('2x', true), getImage('3x', true)].join(', ')"
|
||||
:src="getImage('1x', false)"
|
||||
:alt="`Bild von ${name}`"
|
||||
/>
|
||||
<h3>{{name}}</h3>
|
||||
<p>
|
||||
<span v-for="tag in tags">{{tag}}</span>
|
||||
|
@ -19,5 +26,7 @@ type Props = {
|
|||
link: string
|
||||
}
|
||||
|
||||
defineProps<Props>()
|
||||
const { img } = defineProps<Props>()
|
||||
|
||||
const getImage = (size : '1x' | '2x' | '3x', set : boolean) => `/img/network/${img}@${size}.webp${set ? ` ${size}` : ''}`
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue