mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
Clear thumb after load
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
// console.log("imgcmp", thumb);
|
// console.log("imgcmp", thumb);
|
||||||
let className = "";
|
let className = "";
|
||||||
export { className as class };
|
export { className as class };
|
||||||
|
let loaded = false
|
||||||
// console.log(src)
|
// console.log(src)
|
||||||
// import _PastedImage20240716123726Png from "./Pasted%20image%2020240716123726.png?meta";
|
// import _PastedImage20240716123726Png from "./Pasted%20image%2020240716123726.png?meta";
|
||||||
</script>
|
</script>
|
||||||
@@ -17,7 +18,8 @@
|
|||||||
{title}
|
{title}
|
||||||
width={thumb?.originalWidth}
|
width={thumb?.originalWidth}
|
||||||
height={thumb?.originalHeight}
|
height={thumb?.originalHeight}
|
||||||
style:background-image="url('{thumb?.thumbSrc}')"
|
style:background-image={loaded ? "none" : `url('${thumb?.thumbSrc}')`}
|
||||||
|
on:load={() => loaded = true}
|
||||||
/>
|
/>
|
||||||
{#if title}
|
{#if title}
|
||||||
<figcaption>{title}</figcaption>
|
<figcaption>{title}</figcaption>
|
||||||
@@ -28,6 +30,7 @@
|
|||||||
img {
|
img {
|
||||||
max-height: 60vh;
|
max-height: 60vh;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
width: auto;
|
width: auto;
|
||||||
height: auto;
|
height: auto;
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
Reference in New Issue
Block a user