fix fadein transtion

This commit is contained in:
isUnknown 2024-09-17 15:20:46 +02:00
parent c13626ce09
commit c65f5f228b
2 changed files with 7 additions and 8 deletions

View file

@ -203,6 +203,7 @@
}
img {
opacity: 0;
transition: var(--transition-image-opacity);
}
img.show {

View file

@ -22,15 +22,13 @@ document.addEventListener("DOMContentLoaded", () => {
});
nodes.images.forEach((image) => {
setTimeout(() => {
if (image.complete) {
if (image.complete) {
show(image);
} else {
image.addEventListener("load", () => {
show(image);
} else {
image.addEventListener("load", () => {
show(image);
});
}
}, 10);
});
}
});
// Key shortcuts