feat: make author clickable

This commit is contained in:
2023-08-12 18:32:56 +02:00
parent d2a02fcf34
commit 2b4173d759
27 changed files with 257 additions and 174 deletions

View File

@@ -248,12 +248,16 @@ document.querySelectorAll("[data-thumb]").forEach((entry) => {
const child = entry.querySelector("img[data-thumb-img]");
setTimeout(() => {
const isLoaded = child && child.complete && child.naturalHeight !== 0;
console.log(isLoaded, child.getAttribute("src"));
if (child && !isLoaded) {
child.style.opacity = 0;
child.style.filter = "blur(5px)";
child.addEventListener("load", () => {
child.style.transition = "opacity 0.3s ease";
child.style.transition = "opacity 0.3s ease, filter 0.6s ease";
child.style.opacity = 1;
child.style.filter = "blur(0px)";
setTimeout(() => {
entry.style.background = "";
}, 400);
});
}
}, 50);