deliciousium/themes/lightbi-hugo/layouts/partials/header.html

71 lines
2.3 KiB
HTML

{{ if .IsHome }}
{{ if .Site.Params.homeTitle }}{{ $.Scratch.Set "title" .Site.Params.homeTitle }}{{ else }}{{ $.Scratch.Set "title"
.Site.Title }}{{ end }}
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
{{ else }}
{{ $.Scratch.Set "title" .Title }}
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
{{ end }}
{{ $bigimg := $.Scratch.Get "bigimg" }}
{{ $title := $.Scratch.Get "title" }}
{{ $subtitle := $.Scratch.Get "subtitle" }}
{{ if .IsHome }}
{{ else }}
<header class="header-section mt-4 {{ if $bigimg }}has-img{{ end }}">
<div class="intro-header no-img mt-10">
<div class="container">
<div class="row justify-content-center">
{{ if or ( eq .Type "post") ( eq .Type "notes") ( eq .Type "collections") }}
<div class="col-sm-12 col-md-12 col-lg-8 col-xl-8">
{{ end }}
{{ if ne .Type "blog" }}
<div class="col-sm-12 col-md-12 col-lg-12 col-xl-12">
{{ end }}
<div class="{{ .Type }}-heading text-center">
{{ if or ( eq .Type "tags") }}
<h1 class="fw-semibold display-5 lh-1 mb-3">
{{ if .Data.Singular }}#{{ end }}{{ .Title }}
</h1>
<!-- <hr class="small"> -->
{{ end }}
{{ if eq .Type "list" }}
<h1 class="bino">{{ if .Data.Singular }}#{{ end }}{{ .Title }}</h1>
{{ else }}
{{if .Page.IsPage}}
<h1 class="fw-semibold display-5 lh-1 mb-3"> {{ with $title }}
{{.}}
{{ else }}
<br />
{{ end }}
</h1>
{{ else }}
{{ end }}
{{ end }}
{{ if $subtitle }}
{{ if eq .Type "page" }}
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
{{ else }}
<h6 class="{{ .Type }}-subheading display-6">{{ $subtitle }}</h6>
{{ end }}
{{ end }}
</div>
</div>
</div>
</div>
</div>
</div>
</header>
{{ end }}