gabrielgio.me @ efeff0b95653056677bdf6fecc3064bc813b555a

 1{{ $featured_image := .Param "featured_image"}}
 2{{ if $featured_image }}
 3  {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
 4  {{ $featured_image := (trim $featured_image "/") | absURL }}
 5  <header class="cover bg-top" style="background-image: url('{{ $featured_image }}');">
 6    <div class="{{ .Site.Params.cover_dimming_class | default "bg-black-60" }}">
 7      {{ partial "site-navigation.html" .}}
 8      <div class="tc-l pv4 pv6-l ph3 ph4-ns">
 9        <h1 class="f2 f-subheadline-l fw2 white-90 mb0 lh-title">
10          {{ .Title | default .Site.Title }}
11        </h1>
12        {{ with .Params.description }}
13          <h2 class="fw1 f5 f3-l white-80 measure-wide-l center mt3">
14            {{ . }}
15          </h2>
16        {{ end }}
17      </div>
18    </div>
19  </header>
20{{ else }}
21  <header>
22    <div class="pb3-m pb6-l {{ .Site.Params.background_color_class | default "bg-black" }}">
23      {{ partial "site-navigation.html" . }}
24      <div class="tc-l pv3 ph3 ph4-ns">
25        <h1 class="f2 f-subheadline-l fw2 light-silver mb0 lh-title">
26          {{ .Title | default .Site.Title }}
27        </h1>
28        {{ with .Params.description }}
29          <h2 class="fw1 f5 f3-l white-80 measure-wide-l center lh-copy mt3 mb4">
30            {{ . }}
31          </h2>
32        {{ end }}
33      </div>
34    </div>
35  </header>
36{{ end }}