Added restore functionality to small logo

This commit is contained in:
Kevin Veen-Birkenbach 2025-07-07 15:06:36 +02:00
parent 3f6a195ecb
commit d99a8c8452
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
3 changed files with 7 additions and 8 deletions

View File

@ -105,12 +105,11 @@ document.addEventListener("DOMContentLoaded", function() {
}); });
}); });
// Clicking the header's H1 will restore the original view document.querySelectorAll(".js-restore").forEach(el => {
const headerH1 = document.querySelector("header h1"); el.style.cursor = "pointer";
if (headerH1) { el.addEventListener("click", restoreOriginal);
headerH1.style.cursor = "pointer"; });
headerH1.addEventListener("click", restoreOriginal);
}
// On full page load, check URL parameters to auto-open an iframe // On full page load, check URL parameters to auto-open an iframe
window.addEventListener("load", function() { window.addEventListener("load", function() {

View File

@ -32,7 +32,7 @@
{% endif %} {% endif %}
> >
<div class="container"> <div class="container">
<header class="header"> <header class="header js-restore">
<img <img
src="{{ url_for('static', filename=platform.logo.cache) }}" src="{{ url_for('static', filename=platform.logo.cache) }}"
alt="logo" alt="logo"

View File

@ -54,7 +54,7 @@
</button> </button>
<div class="collapse navbar-collapse" id="navbarNav{{menu_type}}"> <div class="collapse navbar-collapse" id="navbarNav{{menu_type}}">
{% if menu_type == "header" %} {% if menu_type == "header" %}
<a class="navbar-brand d-flex align-items-center d-none" id="navbar_logo" href="/"> <a class="navbar-brand d-flex align-items-center d-none js-restore" id="navbar_logo" href="#">
<img <img
src="{{ url_for('static', filename=platform.logo.cache) }}" src="{{ url_for('static', filename=platform.logo.cache) }}"
alt="{{ platform.titel }}" alt="{{ platform.titel }}"