From 463451bd7da76e66b1adfe1bc54ef077df13f427 Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Sun, 22 Dec 2024 11:33:27 +0100 Subject: [PATCH] Fix carrousel op ios --- data/activiteiten.md | 6 +++++- data/content.md | 10 +++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/data/activiteiten.md b/data/activiteiten.md index 62f2faa..a2cf79c 100644 --- a/data/activiteiten.md +++ b/data/activiteiten.md @@ -26,8 +26,12 @@ Activiteiten die voorbij zijn kun je let slideIndex = 1; +let slides = []; -let slides = [...(Array(29).keys().map((idx) => `${idx+1}`.padStart(2,"0")).map((arg) => `https://s3.asraphiel.dev/galerie/20241220/${arg}.jpg`))] +for(let i = 0; i < 29; i++) { + // [...((new Array(29)).keys().map((idx) => `${idx+1}`.padStart(2,"0")).map((arg) => `https://s3.asraphiel.dev/galerie/20241220/${arg}.jpg`))] + slides.push(`https://s3.asraphiel.dev/galerie/20241220/${(i+1).toString().padStart(2,"0")}.jpg`) +} function createImage(url, index, total) { let content = ` diff --git a/data/content.md b/data/content.md index 6001a67..83c387b 100644 --- a/data/content.md +++ b/data/content.md @@ -65,9 +65,17 @@ met een enkele uitzondering. Klik op de foto hieronder voor een impressie van he let slideIndex = 1; +let dots = document.getElementById("dots") + +let slides = []; + +for(let i = 0; i < 29; i++) { + // [...((new Array(29)).keys().map((idx) => `${idx+1}`.padStart(2,"0")).map((arg) => `https://s3.asraphiel.dev/galerie/20241220/${arg}.jpg`))] + slides.push(`https://s3.asraphiel.dev/galerie/20241220/${(i+1).toString().padStart(2,"0")}.jpg`) +} -let slides = [...(Array(29).keys().map((idx) => `${idx+1}`.padStart(2,"0")).map((arg) => `https://s3.asraphiel.dev/galerie/20241220/${arg}.jpg`))] +// dots.innerHTML = `slides length: ${slides.length}` function createImage(url, index, total) { let content = `