- Herzlich Willkomen " . $_SESSION['username'] . "");
- }
- ?>
-
+
-
diff --git a/js/contentloader.js b/js/contentloader.js
index 67d32d3..1a50d85 100644
--- a/js/contentloader.js
+++ b/js/contentloader.js
@@ -2,7 +2,9 @@ window.addEventListener('load', async () => {
console.log("Seite geladen");
//getNewUniqueLink();
+ setActiveNav();
document.getElementById('btnCreateTan').addEventListener('click' , async (event) => getNewUniqueLink());
+
})
async function getNewUniqueLink() {
@@ -45,3 +47,19 @@ function getCookieValue(a) {
var b = document.cookie.match('(^|;)\\s*' + a + '\\s*=\\s*([^;]+)');
return b ? b.pop() : '';
}
+
+function setActiveNav(){
+ if(window.location.href.indexOf("?") >= 0){
+ if(window.location.href.indexOf("page=home") >= 0){
+ $("#navItemHome").addClass('active');
+ } else if (window.location.href.indexOf("page=newEntry") >= 0){
+ $("#navItemEntry").addClass('active');
+ } else if (window.location.href.indexOf("page=myFriendsBook") >= 0){
+ $("#navItemDashboard").addClass('active');
+ } else if (window.location.href.indexOf("page=newEntry") >= 0){
+ $("#navItemEntry").addClass('active');
+ }
+ } else {
+ $("#navItemHome").addClass('active');
+ }
+}
diff --git a/segments/_footer.html b/segments/_footer.html
index 6b6e538..29513f5 100644
--- a/segments/_footer.html
+++ b/segments/_footer.html
@@ -1,4 +1,4 @@
-