fixed navbar collapse on mobile
All checks were successful
ci/woodpecker/push/main Pipeline was successful

This commit is contained in:
Ell 2023-07-09 14:06:52 +02:00
parent d1de0d218c
commit c2714a6bc0

View file

@ -19,9 +19,6 @@
<!-- Navbar content --> <!-- Navbar content -->
<div class="collapse navbar-collapse" id="navbar-content"> <div class="collapse navbar-collapse" id="navbar-content">
<script>
$(".navbar-collapse a").on("click", () => $(".navbar-collapse").collapse("hide"));
</script>
<div class="navbar-nav mr-auto" id="nav-items"> <div class="navbar-nav mr-auto" id="nav-items">
{% if page.nav %} {% if page.nav %}
{% include {{ page.nav }} %} {% include {{ page.nav }} %}
@ -29,6 +26,7 @@
{% include {{ layout.nav }} %} {% include {{ layout.nav }} %}
{% endif %} {% endif %}
</div> </div>
<span class="navbar-text custom-control custom-checkbox"> <span class="navbar-text custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="dark-mode"> <input type="checkbox" class="custom-control-input" id="dark-mode">
<label class="custom-control-label" for="dark-mode">🌙 Dark Mode</label> <label class="custom-control-label" for="dark-mode">🌙 Dark Mode</label>
@ -42,5 +40,9 @@
}); });
</script> </script>
</span> </span>
<script>
$(".navbar-collapse a").on("click", () => $(".navbar-collapse").collapse("hide"));
</script>
</div> </div>
</nav> </nav>