diff --git a/docs/cloudlog.md b/docs/cloudlog.md index e39cdab..d8b2252 100644 --- a/docs/cloudlog.md +++ b/docs/cloudlog.md @@ -46,8 +46,18 @@ title: Cloudlog iframe.src = `https://cloudlog.sa6anw.se/visitor/alpha`; } const windowWidth = window.innerWidth; - iframe.style.height = windowWidth < 600 ? "2200px" : "1700px"; + iframe.style.height = windowWidth < 600 ? "2100px" : "1600px"; }); + + document.addEventListener("DOMContentLoaded", () => { + const iframe = document.getElementById("cloudlog"); + if (iframe) { + iframe.src = "https://cloudlog.sa6anw.se/visitor/alpha"; + } + setIframeHeight(); // Sätt rätt höjd direkt + }); + + window.addEventListener("resize", setIframeHeight); // Ändra höjd vid fönsterändring