From 15a418cf7c32b6ca508e45a48481d4eed801ee28 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Tue, 10 Sep 2019 16:09:35 +0200
Subject: [PATCH] Add navigation highlighting.
---
app/templates/base.html.j2 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/app/templates/base.html.j2 b/app/templates/base.html.j2
index dbf2b158..9d0194b0 100644
--- a/app/templates/base.html.j2
+++ b/app/templates/base.html.j2
@@ -193,6 +193,12 @@
document.getElementById("new-job"),
{"coverTrigger": false}
);
+ var entry;
+ for (entry of document.querySelectorAll("#slide-out a:not(.subheader)")) {
+ if (entry.href === window.location.href) {
+ entry.parentNode.classList.add("active");
+ }
+ }
{% for message in get_flashed_messages() %}
M.toast({html: '{{ message }}'})
{% endfor %}