mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 09:45:32 +00:00
More Menu, Added Basic Routing
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<header class="sticky w-100 font-serif mb-6">
|
||||
<nav class="flex flex-row w-100 bg-slate-50 border-t-[5px] border-gray-300 py-3 px-3 lg:px-8 flex-wrap">
|
||||
<nav class="flex flex-row w-100 bg-slate-50 border-t-[5px] border-gray-300 py-3 px-3 desktop:px-8 flex-wrap">
|
||||
<a href="/" class="text-xl xl:text-3xl grow-0 shrink-0 text-black hover:text-black ">
|
||||
<img src="/favicon.ico" class="inline-block w-8 h-8 xl:w-12 xl:h-12 mr-2 p-1 border border-gray-900 border-t-gray-200 border-l-gray-200 " alt="HKB-Logo" loading="lazy" />
|
||||
<span class="sm:hidden">J. G. Hamann: Kommentierte Briefausgabe</span>
|
||||
<span class="sm:hidden">Hamann: Komm. Briefausgabe</span>
|
||||
<span class="hidden sm:inline md:hidden">Johan Georg Hamann: Kommentierte Briefausgabe</span>
|
||||
<span class="hidden md:inline align-baseline">Johann Georg Hamann: Kommentierte Briefausgabe ( H K B )</span>
|
||||
</a>
|
||||
<div class="flex grow shrink">
|
||||
|
||||
</div>
|
||||
<div class="ha-menusymbol inline-block lg:hidden pr-3 align-bottom">
|
||||
<div class="ha-menusymbol inline-block desktop:hidden pr-3 align-bottom">
|
||||
<button id="openmenubutton">
|
||||
<svg role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
||||
aria-labelledby="hamburgerIconTitle">
|
||||
@@ -26,19 +26,35 @@
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="topnav" id="topnav">
|
||||
<div class="ha-topnav " id="ha-topnav">
|
||||
<a class="" href="/">
|
||||
Suche & Briefauswahl
|
||||
</a>
|
||||
<a class="" href="/kolloquien.html">
|
||||
<a class="" href="/Briefe/1">
|
||||
Briefansicht
|
||||
</a>
|
||||
<a class="" href="/acta-baende.html">
|
||||
Register
|
||||
</a>
|
||||
<a class="" href="/studien.html">
|
||||
<div class="ha-topnav-dropdown">
|
||||
<a class="cursor-default ha-menu-arrowsymbol">
|
||||
Register
|
||||
</a>
|
||||
<div class="ha-topnav-dropdown-content">
|
||||
<a class="" href="/Register/Register">Register</a>
|
||||
<a class="" href="/Register/Bibelstellenregister">Bibelstellenregister</a>
|
||||
<a class="" href="/Register/Forschungsbibliographie">Forschungsbibliographie</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ha-topnav-dropdown">
|
||||
<a class="cursor-default ha-menu-arrowsymbol">
|
||||
Edition
|
||||
</a>
|
||||
</a>
|
||||
<div class="ha-topnav-dropdown-content">
|
||||
<a class="" href="/Edition/Kontakt">Kontakt</a>
|
||||
<a class="" href="/Edition/Mitwirkende">Mitwirkende</a>
|
||||
<a class="" href="/Edition/Richtlinien">Editionsrichtlinien</a>
|
||||
<a class="" href="/Edition/Editionsgeschichte">Editionsgeschichte</a>
|
||||
<a class="" href="/Edition/Werkausgabe">Werkausgabe</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
@@ -46,8 +62,8 @@
|
||||
<script>
|
||||
|
||||
const _openmenu = function () {
|
||||
var x = document.getElementById("topnav");
|
||||
if (x !== null) x.className += " responsive";
|
||||
var x = document.getElementById("ha-topnav");
|
||||
if (x !== null) x.className += " ha-topnav-collapsed";
|
||||
let oldbutton = document.getElementById("openmenubutton");
|
||||
if (oldbutton !== null) oldbutton.setAttribute('class', 'hidden');
|
||||
let newbutton = document.getElementById("closemenubutton");
|
||||
@@ -55,8 +71,8 @@
|
||||
}
|
||||
|
||||
const _closemenu = function () {
|
||||
var x = document.getElementById("topnav");
|
||||
if (x !== null) x.className = "topnav";
|
||||
var x = document.getElementById("ha-topnav");
|
||||
if (x !== null) x.className = "ha-topnav";
|
||||
let oldbutton = document.getElementById("closemenubutton");
|
||||
if (oldbutton !== null) oldbutton.setAttribute('class', 'hidden');
|
||||
let newbutton = document.getElementById("openmenubutton");
|
||||
@@ -64,9 +80,9 @@
|
||||
|
||||
}
|
||||
|
||||
const _markactive = function () {
|
||||
const _markactive = function (element) {
|
||||
// Marks links as active
|
||||
var all_links = this.getElementsByTagName("a"),
|
||||
var all_links = element.getElementsByTagName("a"),
|
||||
i = 0, len = all_links.length,
|
||||
full_path = location.href.split('#')[0]; //Ignore hashes
|
||||
|
||||
@@ -80,5 +96,6 @@
|
||||
|
||||
document.getElementById("openmenubutton").addEventListener('click', _openmenu);
|
||||
document.getElementById("closemenubutton").addEventListener('click', _closemenu);
|
||||
_markactive(document.getElementById("ha-topnav"));
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user