38 lines
1.6 KiB
HTML
38 lines
1.6 KiB
HTML
<nav class="navbar is-fixed-top is-transparent" role="navigation" aria-label="main navigation">
|
|
<div class="navbar-brand">
|
|
<a class="navbar-item" href="{{ .Site.Home.Permalink }}">
|
|
<img src="https://bulma.io/images/placeholders/128x128.png">
|
|
</a>
|
|
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbar">
|
|
<span aria-hidden="true"></span>
|
|
<span aria-hidden="true"></span>
|
|
<span aria-hidden="true"></span>
|
|
</a>
|
|
|
|
<div id="navbar" class="navbar-menu">
|
|
<div class="navbar-start">
|
|
<a class="navbar-item {{ if eq .Permalink .Site.Home.Permalink }}is-active is-tab{{ end }}" href="{{ .Site.Home.Permalink }}">Accueil</a>
|
|
{{ $currentPage := . }}
|
|
{{ range .Site.Menus.main }}
|
|
{{ if .HasChildren }}
|
|
<div class="navbar-item has-dropdown is-hoverable {{ if $currentPage.HasMenuCurrent "main" . }}is-active is-tab{{ end }}">
|
|
<a href="#" class="navbar-link">
|
|
{{ .Pre }}
|
|
<span>{{ .Name }}</span>
|
|
</a>
|
|
<div class="navbar-dropdown">
|
|
{{ range .Children }}
|
|
<a class="navbar-item {{ if $currentPage.IsMenuCurrent "main" . }}is-active is-tab{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
{{ else }}
|
|
<a class="navbar-item {{ if $currentPage.IsMenuCurrent "main" . }}is-active is-tab{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
<div class="navbar-end"><!-- See later to differentiate --></div>
|
|
</div>
|
|
</div>
|
|
</nav>
|