Einbinden von CustomCSS setzt keine Site-Base mehr davor + kleinere Anpassungen um Leerzeilen zu vermeiden

This commit is contained in:
mdn 2023-01-22 00:47:23 +01:00
parent c14beceef6
commit 631c22e7c6
18 changed files with 134 additions and 146 deletions

View file

@ -3,27 +3,26 @@
<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">
<!-- TODO Via SVG eigenes Icon vielleicht mal zeichnen wie bei Bootstrap mit MDN als Inhalt -->
<i class="bi me-2" data-feather="home"></i>
{{ if .IsHome }}
{{ print .Site.Title }}
{{ else }}
{{ print .Site.Title " | " .Title }}
{{ end }}
<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 }}
</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 }}
{{- range .Site.Menus.main -}}
<!-- 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 }}
{{- 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 -}}
</a>
{{ end }}
{{- end }}
</nav>
</div>
</div>