mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
24 lines
528 B
Text
24 lines
528 B
Text
---
|
|
import { getVideoImages } from '~/helpers/listing-page.js'
|
|
const {
|
|
video
|
|
} = Astro.props
|
|
|
|
const images = getVideoImages( video )
|
|
---
|
|
<picture>
|
|
|
|
{ Object.entries( images.sources ).map( ([ key, source ]) => (
|
|
<source
|
|
sizes={ source.sizes }
|
|
data-srcset={ source.srcset }
|
|
type={ `image/${ key }` }
|
|
>
|
|
) ) }
|
|
|
|
<img
|
|
data-src={ images.imgSrc }
|
|
alt={ video.name }
|
|
class="absolute inset-0 h-full w-full object-cover lazyload"
|
|
>
|
|
</picture>
|