From ef31fac5ca29c1052c3dc260630129b13f4aa008 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 20 Nov 2025 14:52:55 +0100 Subject: Added -set_seed flag; Added animation on error --- code/index.tmpl.html | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'code/index.tmpl.html') diff --git a/code/index.tmpl.html b/code/index.tmpl.html index 4c392bb..7e5f7bb 100644 --- a/code/index.tmpl.html +++ b/code/index.tmpl.html @@ -1,4 +1,5 @@ -{{ if false }} + +{{ if .Internal }} {{ end }} - - - @@ -142,13 +140,13 @@ function setPageChoose() { document.body.innerHTML = `
-
-
- - - -
-
+
+
+ + + +
+
@@ -199,6 +197,7 @@ function setPageChoose() { .then(function(response) { if (!response.ok) { console.error('Network response was not ok'); + const textElement = document.createElement('div'); } return response.json(); }) @@ -254,7 +253,16 @@ function setPageChoose() { }) .then(function(response) { if (!response.ok) { - console.error('Network response was not ok'); + console.error('Network response was not ok'); + + const textElement = document.createElement('div'); + textElement.textContent = 'Erreur'; + textElement.classList.add('fade'); + let buttons = document.querySelector("div#pin-login > form"); + buttons.appendChild(textElement); + setTimeout(function() { + textElement.remove(); + }, 1000); } return response.json(); }) @@ -418,7 +426,7 @@ function setPageThisPerson() { return response.text(); }) .then(function(response) { - {{ if false }} + {{ if .Internal }} console.log("response:", response); console.log(typeof(response)); console.log("wishlist.value:", wishlist.value); @@ -441,7 +449,7 @@ function setPageThisPerson() { sendWishlistButton.addEventListener("click", function(event) { event.preventDefault(); - {{ if false }} + {{ if .Internal }} console.log("Sending list of", global_all_data.thisName); console.log("content:", wishlist.value); {{ end }} @@ -485,7 +493,7 @@ function setPageThisPerson() { //- Main window.onload = function() { - {{ if false }} + {{ if .Internal }} // NOTE(luca): Users will expect going back to go to the home page so we do this manually. {{ end }} window.addEventListener('popstate', function(event) { -- cgit v1.2.3-70-g09d2