diff --git a/srcs/requirements/svelte/api_front/public/global.css b/srcs/requirements/svelte/api_front/public/global.css index e5845aa1..b6baa24e 100644 --- a/srcs/requirements/svelte/api_front/public/global.css +++ b/srcs/requirements/svelte/api_front/public/global.css @@ -12,6 +12,11 @@ body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; /* tmp? */ background: bisque; + + /* overflow-x: hidden; */ + /* This seems to have fixed my pages that are too long */ + /* but now i can't scroll anywhere ... */ + /* overflow-y: hidden; */ } a { diff --git a/srcs/requirements/svelte/api_front/src/ProfileDisplay.svelte b/srcs/requirements/svelte/api_front/src/ProfileDisplay.svelte index 035a1e7a..9ba1a28c 100644 --- a/srcs/requirements/svelte/api_front/src/ProfileDisplay.svelte +++ b/srcs/requirements/svelte/api_front/src/ProfileDisplay.svelte @@ -46,13 +46,17 @@ const rand = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min; - const animate = star => { - star.style.setProperty("--star-left", `${rand(-10, 100)}%`); - star.style.setProperty("--star-top", `${rand(-40, 80)}%`); + // it's unhappy that "star" isn't typeset, no idea what to do about it... + const animate = (star) => { + // the if seems to have fixed the type issue + if (star) { + star.style.setProperty("--star-left", `${rand(-10, 100)}%`); + star.style.setProperty("--star-top", `${rand(-40, 80)}%`); - star.style.animation = "none"; - star.offsetHeight; - star.style.animation = ""; + star.style.animation = "none"; + star.offsetHeight; + star.style.animation = ""; + } } // This is the part i invented, it was kinda a fucking nightmare... @@ -105,6 +109,40 @@ {/if} +