X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=index.html;h=92e115ede8e264b75a77843e21cf39ebbd5aff7f;hb=2df1196fca4eeda4f1cd2950a65a6b4d675769f1;hp=b36254964a2212e889e68312db54f55e5c3c597e;hpb=931b341b6782d5952682922097bb1bf624664dd3;p=zombocom-ai diff --git a/index.html b/index.html index b362549..92e115e 100644 --- a/index.html +++ b/index.html @@ -176,7 +176,19 @@ mute.addEventListener("click", () => { const img = document.createElement('img'); img.src = image.filename; - figure.appendChild(img); + + if (image.link) { + const a = document.createElement('a'); + a.href = image.link; + a.appendChild(img); + figure.appendChild(a); + } else { + figure.appendChild(img); + } + + if (image.censored) { + img.style.display = "none"; + } if (image.prompt && image.code) { const figcaption = document.createElement('figcaption'); @@ -192,6 +204,10 @@ mute.addEventListener("click", () => { window.scrollTo(0,0); }); + if (image.censored) { + figcaption.style.display = "none"; + } + figure.appendChild(figcaption); }