Fixe le menu pour qu'il se ferme après avoir cliqué sur un lien

This commit is contained in:
Simon 2022-09-08 16:41:49 +02:00
parent b8549888d8
commit 04bf002fbc
2 changed files with 11 additions and 1 deletions

View File

@ -446,6 +446,15 @@ a:hover {
outline: 0;
}
.navbar-dark .navbar-toggler {
color: #fff;
border-color: #fff;
}
.navbar-dark .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgb(255, 255, 255)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.bg-1 {
background-repeat: no-repeat;
background-size: cover;

View File

@ -1,3 +1,4 @@
<section class="fixed-top navigation py-3">
<div class="container">
<nav class="navbar navbar-expand-sm navbar-dark">
@ -38,7 +39,7 @@
</li>
{{ else }}
<li class="nav-item">
<a class="nav-link" {{if findRE `^http` .URL}}target="_blank" rel="noopener" {{end}}
<a onclick="$('#navigation').removeClass('show')" class="nav-link" {{if findRE `^http` .URL}}target="_blank" rel="noopener" {{end}}
href="{{if findRE `^#` .URL}}{{if not $.IsHome}}{{site.BaseURL | relLangURL}}{{end}}{{.URL}}{{else}}{{.URL | relLangURL}}{{end}}">{{.Name}}</a>
</li>
{{ end }}