mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Patrick Kollitsch
10 hours ago c70b22c0c65d21fc25eda46a8182eb042da11da0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{{- /* @deprecated 2.21.0 remove in 3.0.0: remove this marker, it only detects site overrides of this partial (see #1120) */ -}}
{{- .Store.Set "ananke.deprecated.theme-partial.site-header.html" true -}}
{{ $featured_image := partials.Include "func/GetFeaturedImage.html" . }}
{{ $header := collections.Dictionary "page" . "variant" "site" "featured_image" $featured_image }}
{{ if $featured_image }}
  {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
  {{ $featured_image_class := site.Params.featured_image_class | compare.Default "cover bg-top" }}
  {{ $header_section_class := .Param "header_section_class" | compare.Default "tc-l pv4 pv6-l ph3 ph4-ns" }}
  {{ $background := partials.Include "func/FeaturedImageStyle.html" . }}
  {{ with $background.stylesheet }}<link rel="stylesheet" href="{{ . }}">{{ end }}
  <header class="{{ $featured_image_class }}" style="{{ $background.style | safe.CSS }}">
    {{ $cover_dimming_class := site.Params.cover_dimming_class | compare.Default "bg-black-60" }}
    <div class="{{ $cover_dimming_class }}">
      {{/* @deprecated 2.21.0 remove in 3.0.0: include site-navigation.html directly (see #1120) */ -}}
      {{ partials.Include "func/header/IncludeChecked.html" (collections.Dictionary "name" "site-navigation.html" "page" .) }}
      <div class="{{ $header_section_class }}">
        {{ partials.Include "header/content.html" $header }}
      </div>
    </div>
  </header>
{{ else }}
  <header>
    <div class="pb3-m pb6-l {{ .Site.Params.background_color_class | compare.Default "bg-black" }}">
      {{/* @deprecated 2.21.0 remove in 3.0.0: include site-navigation.html directly (see #1120) */ -}}
      {{ partials.Include "func/header/IncludeChecked.html" (collections.Dictionary "name" "site-navigation.html" "page" .) }}
      {{ $header_section_class := .Param "header_section_class" | compare.Default "tc-l pv3 ph3 ph4-ns" }}
      <div class="{{ $header_section_class }}">
        {{ partials.Include "header/content.html" $header }}
      </div>
    </div>
  </header>
{{ end }}