From 52ed87a9673259c7801b1866a1bb5fd18eefdc4b Mon Sep 17 00:00:00 2001 From: Cailean Finn Date: Mon, 15 Jul 2024 12:53:37 +0100 Subject: [PATCH] shuffle images --- build.py | 4 +- public/gallery.html | 150 ++++++++++++++++++++++---------------------- 2 files changed, 78 insertions(+), 76 deletions(-) diff --git a/build.py b/build.py index ff3c260..789860b 100644 --- a/build.py +++ b/build.py @@ -1,4 +1,5 @@ import os +import random import markdown import re from jinja2 import Environment, FileSystemLoader @@ -125,7 +126,8 @@ class Website: if image_path.startswith("/images/."): image_path = image_path.replace("/images/.", "/images") self.all_images.append(image_path) - + random.shuffle(self.all_images) + print(self.all_images) html_output = template.render( images=self.all_images ) diff --git a/public/gallery.html b/public/gallery.html index eaaaa30..2ad375a 100644 --- a/public/gallery.html +++ b/public/gallery.html @@ -34,157 +34,157 @@