From eaf34ca6ddde9aa5a0763f2f0618191248ef1130 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Sun, 3 May 2020 17:41:00 +0200 Subject: [PATCH] don't collapse navbar on home --- layouts/partials/footer.html | 7 +++++++ layouts/partials/header.html | 4 +--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 9a0d215..f5aad77 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -48,4 +48,11 @@ function ThisYear() { document.getElementById('thisyear').innerHTML = new Date().getFullYear(); }; + + $(document).ready(function() { + if ( $(location).attr("pathname") == "/") { + $('.collapse').collapse('show'); + } + }); + //$('.collapse').show(); diff --git a/layouts/partials/header.html b/layouts/partials/header.html index cce3fc2..85920c8 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -33,9 +33,7 @@ {{ end }} {{ end }} - + {{- partial "navLang.html" . -}}