bop-hugo-theme/layouts/partials/header.html

24 lines
561 B
HTML

{{ $currentPage := . }}
<header>
<h1>
{{ with resources.Get "img/titre.png" }}
<a href="{{ $.Site.BaseURL | relURL }}">
<img src="{{ .RelPermalink }}" />
</a>
{{ else }}
<a href="{{ $.Site.BaseURL | relURL }}">{{ .Site.Title }}</a>
{{ end }}
</h1>
{{ with $.Site.Params.Description }}
{{ . }}
{{ end }}
<nav>
{{ range $.Site.Sections }}
<a href="{{ .Permalink }}" class="{{ if eq $currentPage.Section .Section }}exposed{{ end }}">
{{ .Title | markdownify }}
</a>
{{ end }}
</nav>
</header>