Experiments with resolving

This commit is contained in:
Jade Ellis
2024-07-19 15:34:55 +01:00
parent ae3c753d71
commit e7a42d7b74
4 changed files with 340 additions and 36 deletions
@@ -1,8 +1,10 @@
<script>
<script lang="ts">
export let src;
export let alt;
export let title;
export let thumb;
// export let align
// export let small: boolean;
// console.log("imgcmp", thumb);
let className = "";
export { className as class };
@@ -25,6 +27,18 @@
<figcaption>{title}</figcaption>
{/if}
</figure>
<!-- {:else}
<img
{src}
{alt}
{title}
style:float={align}
width={thumb?.originalWidth}
height={thumb?.originalHeight}
style:background-image={loaded ? "none" : `url('${thumb?.thumbSrc}')`}
on:load={() => loaded = true}
/>
{/if} -->
<style>
img {