use normal img with loading=lazy and

This commit is contained in:
lesion 2021-12-02 12:43:53 +01:00
parent 1c45adc684
commit 7059c6c337
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -1,7 +1,7 @@
<template lang="pug">
v-card.h-event.event.d-flex
nuxt-link(:to='`/event/${event.slug || event.id}`')
v-img.u-featured.img(aspect-ratio='1.7778' :src='thumbnail' :position='thumbnailPosition' :alt='event.media && event.media.length ? event.media[0].name : ""')
img.img.u-featured(:src='thumbnail' :alt='alt' loading='lazy' :style="{ 'object-position': thumbnailPosition }")
v-icon.float-right.mr-1(v-if='event.parentId' color='success') mdi-repeat
.title.p-name {{event.title}}
@ -17,7 +17,7 @@
v-menu(offset-y)
template(v-slot:activator="{on}")
v-btn.align-self-end(icon v-on='on' color='primary')
v-btn.align-self-end(icon v-on='on' color='primary' alt='more')
v-icon mdi-dots-vertical
v-list(dense)
v-list-item-group
@ -61,6 +61,9 @@ export default {
}
return path
},
alt () {
return this.event.media && this.event.media.length ? this.event.media[0].name : ''
},
thumbnailPosition () {
if (this.event.media && this.event.media.length && this.event.media[0].focalpoint) {
const focalpoint = this.event.media[0].focalpoint