home/layouts/partials/header.html

49 lines
1.8 KiB
HTML
Raw Normal View History

2024-08-27 23:06:37 +00:00
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
<link rel="manifest" href="/images/site.webmanifest">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
<title>{{ .Title }} | {{ .Site.Title }}</title>
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}" />
<link rel="stylesheet" href="{{ "/css/fonts.css" | relURL }}" />
{{ range .Site.Params.custom_css -}}
<link rel="stylesheet" href="{{ . | absURL }}">
{{- end }}
{{ partial "head_custom.html" . }}
</head>
<body>
<header>
<nav>
<ul>
{{ $title := lower .Title }}
{{ $section := lower .Section }}
<li class="pull-left {{ if .IsHome }}current{{ end }}">
<a href="{{ .Site.BaseURL }}">~/home</a>
</li>
{{ range .Site.Menus.main }}
{{ $name := lower .Name }}
<li class="pull-left {{ if eq $name $title }}current{{ else if eq $section $name }}current{{ else if eq $title (pluralize $name) }}current{{ end }}">
<a href="{{ .URL }}" target="{{ if gt .Weight 2 }}_blank{{ end }}">~/{{ lower .Name }}</a>
</li>
{{end}}
{{ range .Site.Menus.feed }}
{{ $name := lower .Name}}
<li class="pull-right">
<a href="{{ .URL }}">~/{{ lower .Name}}</a>
</li>
{{end}}
</ul>
</nav>
</header>