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

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

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 }}