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

Patrick Kollitsch
13 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
{{- /*
  Header component: the `description` from the front matter of the page.
  Renders nothing if the page has no description.
 
  The `site` variant (list pages) renders an `h2`. The `page` variant (single
  pages) renders a `div`.
*/ -}}
{{- $context := . -}}
{{- with .page.Params.description -}}
  {{- if compare.Eq $context.variant "page" -}}
    <div class="fw1 f5 f3-l white-80 measure-wide-l center lh-copy mt3 mb4">
      {{ . }}
    </div>
  {{- else if $context.featured_image -}}
    <h2 class="fw1 f5 f3-l white-80 measure-wide-l center mt3">
      {{ . }}
    </h2>
  {{- else -}}
    <h2 class="fw1 f5 f3-l white-80 measure-wide-l center lh-copy mt3 mb4">
      {{ . }}
    </h2>
  {{- end -}}
{{- end -}}