cremeaux/layouts/partials/header.html

32 lines
1.0 KiB
HTML

<div class="container-header">
<div class="container grid-xl">
<header class="navbar navbar-main">
<section class="navbar-section">
<a href="/" class="">
<img src="logo.png" alt="Blason de Crémeaux" height="80" />
</a>
</section>
<section class="navbar-center">
{{ range .Site.Menus.main }}
<a href="{{ .URL }}" class="m-2 btn btn-primary {{ .Identifier }} {{ .Pre }}">{{ .Name }}</a>
{{ end }}
</section>
</header>
</div>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
{{ if .HasChildren }}
<header class="navbar navbar-submenu">
<section class="navbar-center btn-group btn-group-block">
{{ $color := .Pre }}
{{ range .Children }}
<a class="btn {{if $currentPage.IsMenuCurrent "main" .}}btn-primary{{else}}btn-link{{end}} {{$color}}" href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</section>
</header>
{{ end }}
{{ end }}
{{ end }}
</div>