mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 17:55:32 +00:00
Added settings classes for CSS; added Register parsing
This commit is contained in:
@@ -66,43 +66,4 @@
|
||||
<a href="/Edition/Mitwirkende">Hg. v. Leonard Keidel und Janina Reibold, auf Grundlage der Vorarbeiten Arthur Henkels, unter Mitarbeit von G. Babelotzky, K. Bucher, Ch. Großmann, C.F. Haak, L. Klopfer, J. Knüchel, I. Langkabel und S. Martens (Heidelberg 2020ff.)</a>
|
||||
</div>
|
||||
}
|
||||
</header>
|
||||
|
||||
<script>
|
||||
|
||||
const _openmenu = function () {
|
||||
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");
|
||||
if (newbutton !== null) newbutton.setAttribute('class', '');
|
||||
}
|
||||
|
||||
const _closemenu = function () {
|
||||
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");
|
||||
if (newbutton !== null) newbutton.setAttribute('class', '');
|
||||
|
||||
}
|
||||
|
||||
const _markactive = function (element) {
|
||||
// Marks links as active which target URL starts with the current URL
|
||||
var all_links = element.getElementsByTagName("a"),
|
||||
i = 0, len = all_links.length,
|
||||
full_path = location.href.split('#')[0].toLowerCase(); //Ignore hashes
|
||||
|
||||
for (; i < len; i++) {
|
||||
if (full_path.startsWith(all_links[i].href.toLowerCase())) {
|
||||
console.log(all_links[i].href.split("#")[0]);
|
||||
all_links[i].className += " active";
|
||||
}
|
||||
}
|
||||
}
|
||||
document.getElementById("openmenubutton").addEventListener('click', _openmenu);
|
||||
document.getElementById("closemenubutton").addEventListener('click', _closemenu);
|
||||
_markactive(document.getElementById("ha-topnav"));
|
||||
</script>
|
||||
</header>
|
||||
Reference in New Issue
Block a user