Updated
This commit is contained in:
parent
8197905483
commit
efc045bebd
48 changed files with 779 additions and 1140 deletions
17
@dasig/components/Image.astro
Normal file
17
@dasig/components/Image.astro
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
interface Props {
|
||||
avif: string
|
||||
webp: string
|
||||
size?: number
|
||||
alt?: string
|
||||
radius?: number
|
||||
}
|
||||
|
||||
const { avif, webp, size, alt, radius } = Astro.props
|
||||
---
|
||||
|
||||
<picture>
|
||||
<source srcset={avif} type="image/avif" />
|
||||
<source srcset={webp} type="image/webp" />
|
||||
<img style={`border-radius: ${radius}rem`} width={size} height="auto" decoding="async" loading="lazy" alt={alt} />
|
||||
</picture>
|
||||
Loading…
Add table
Add a link
Reference in a new issue