blogamore/layouts/partials/header.html

31 lines
1.3 KiB
HTML
Raw Normal View History

2022-11-13 20:52:45 +01:00
<header class="fixed-top_" style="padding-bottom: 3px;">
<div class="px-3 py-2 text-bg-dark">
<div class="container">
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
<a href="/" class="d-flex align-items-center my-2 my-lg-0 me-lg-auto text-white text-decoration-none">
<i class="bi me-2" data-feather="home"></i> <!-- TODO Via SVG eigenes Icon vielleicht mal zeichnen wie bei Bootstrap mit MDN als Inhalt -->
{{- if .IsHome -}}
{{- print .Site.Title -}}
{{- else -}}
{{- print .Site.Title " | " .Title -}}
{{- end }}
2022-11-13 20:52:45 +01:00
</a>
<nav id="nav" class="nav col-12 col-lg-auto my-2 justify-content-center my-md-0 text-small navbar-expand-md navbar-dark bg-dark">
{{- range .Site.Menus.main -}}
2022-11-13 20:52:45 +01:00
<!-- text-secondary bei der aktiven Url sonst text-white -->
<a class="nav-link text-white" href="{{ .URL }}">
{{- if .Pre -}}
{{- $icon := printf "<i class=\"bi d-block mx-auto mb-1\" data-feather=\"%s\"></i>" .Pre | safeHTML -}}
{{- $icon -}}
{{- end -}}
{{- $text := print .Name | safeHTML -}}
{{- $text -}}
2022-11-13 20:52:45 +01:00
</a>
{{- end }}
2022-11-13 20:52:45 +01:00
</nav>
</div>
</div>
</div>
</header>