diff options
| author | Xe Iaso <me@xeiaso.net> | 2023-10-02 13:55:39 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2023-10-02 13:55:39 -0400 |
| commit | 7939a6deaef4fba9d70417005d7931f41855ce5a (patch) | |
| tree | 6ce28e1d428e4e32ee7cd90051f9efb7f79084b8 /lume/src/_components | |
| parent | 90a93cefc6bc911198097fda07b264c0b7ef298b (diff) | |
| download | xesite-7939a6deaef4fba9d70417005d7931f41855ce5a.tar.xz xesite-7939a6deaef4fba9d70417005d7931f41855ce5a.zip | |
blog: gokrazy SD card resizing post
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'lume/src/_components')
| -rw-r--r-- | lume/src/_components/XeblogPicture.tsx | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/lume/src/_components/XeblogPicture.tsx b/lume/src/_components/XeblogPicture.tsx index 9f20e6c..857ce9f 100644 --- a/lume/src/_components/XeblogPicture.tsx +++ b/lume/src/_components/XeblogPicture.tsx @@ -5,22 +5,24 @@ export interface XeblogPicture { export default function XeblogPicture({ path, desc }: XeblogPicture) { return ( - <figure> - <picture> - <source - type="image/avif" - srcset={`https://cdn.xeiaso.net/file/christine-static/${path}.avif`} - /> - <source - type="image/webp" - srcset={`https://cdn.xeiaso.net/file/christine-static/${path}.webp`} - /> - <img - alt={`An image of ${prompt}`} - loading="lazy" - src={`https://cdn.xeiaso.net/file/christine-static/${path}.jpg`} - /> - </picture> + <figure className="max-w-3xl mx-auto"> + <a href={`https://cdn.xeiaso.net/file/christine-static/${path}.jpg`}> + <picture> + <source + type="image/avif" + srcset={`https://cdn.xeiaso.net/file/christine-static/${path}.avif`} + /> + <source + type="image/webp" + srcset={`https://cdn.xeiaso.net/file/christine-static/${path}.webp`} + /> + <img + alt={desc} + loading="lazy" + src={`https://cdn.xeiaso.net/file/christine-static/${path}.jpg`} + /> + </picture> + </a> {desc && <figcaption>{desc}</figcaption>} </figure> ); |
