From d99a8c845236fb4ea30aaf499b1dd5ed492debc4 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 7 Jul 2025 15:06:36 +0200 Subject: [PATCH] Added restore functionality to small logo --- app/static/js/iframe.js | 11 +++++------ app/templates/moduls/base.html.j2 | 2 +- app/templates/moduls/navigation.html.j2 | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/static/js/iframe.js b/app/static/js/iframe.js index d7e8a9c..2cb199d 100644 --- a/app/static/js/iframe.js +++ b/app/static/js/iframe.js @@ -105,12 +105,11 @@ document.addEventListener("DOMContentLoaded", function() { }); }); - // Clicking the header's H1 will restore the original view - const headerH1 = document.querySelector("header h1"); - if (headerH1) { - headerH1.style.cursor = "pointer"; - headerH1.addEventListener("click", restoreOriginal); - } + document.querySelectorAll(".js-restore").forEach(el => { + el.style.cursor = "pointer"; + el.addEventListener("click", restoreOriginal); + }); + // On full page load, check URL parameters to auto-open an iframe window.addEventListener("load", function() { diff --git a/app/templates/moduls/base.html.j2 b/app/templates/moduls/base.html.j2 index 884010a..8ce3d6b 100644 --- a/app/templates/moduls/base.html.j2 +++ b/app/templates/moduls/base.html.j2 @@ -32,7 +32,7 @@ {% endif %} >
-
+
logo