From fe752192ff411c6a7e553d8fcf676e46823eb315 Mon Sep 17 00:00:00 2001 From: LogolicusZ Date: Fri, 12 Apr 2024 13:19:28 +0200 Subject: [PATCH] Trying to fix JS on Randomizer --- .../assets/images/gallery => docker-data/pictures}/pic0.png | 0 src/routes/+page.svelte | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename {static/assets/images/gallery => docker-data/pictures}/pic0.png (100%) diff --git a/static/assets/images/gallery/pic0.png b/docker-data/pictures/pic0.png similarity index 100% rename from static/assets/images/gallery/pic0.png rename to docker-data/pictures/pic0.png diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index d22c618..6c6a3a7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -6,7 +6,7 @@ } onMount(() => { - document.getElementById('banner').src = document.getElementById('banner').src.replace("pic0", `pic${rand(1,10)}`); + document.getElementById('banner').src = document.getElementById('banner').src.replace("pic0.png", `pic${rand(1,10)}.png`); console.log(document.getElementById('banner').src); }) @@ -26,7 +26,7 @@ - +