aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials/hero.html
blob: 8ed0b6252448bdb6c961815b71c5dab614338272 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<div
  id="hero"
  class="py-16"
  style="background: linear-gradient( rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15) ){{ with resources.Get (index .Params.images 0) }}
    , url('{{ .RelPermalink }}') center
  {{ end }};"
>
  <div class="max-w-screen-md mx-auto px-2 text-white font-serif text-center">
    {{ if eq .Type "authors" }}
      {{ $avatar :=  index .Params.images 1 }}
      {{ if hasPrefix $avatar "http" }}
        {{ $avatar = resources.GetRemote $avatar }}
      {{ else }}
        {{ $avatar = resources.Get $avatar }}
      {{ end }}
      {{ with $avatar }}
        <img
          src="{{ .RelPermalink }}"
          class="rounded-full w-64 block mx-auto"
          alt=""
        />
      {{ end }}
      <h1 class="">
        {{ .Params.Name }}
      </h1>

      <h3 class="font-normal">
        {{ .Params.role | markdownify }}
      </h3>

      {{ with .Params.Subtitle }}
        <h3 class="">
          {{ . | markdownify }}
        </h3>
      {{ end }}


      <div class="text-4xl mt-4">
        {{ partial "social_links" .Params }}
      </div>
    {{ else }}

      <h1 class="berkshire-swash">{{ .Title }}</h1>
      {{ .Content }}
    {{ end }}
  </div>
</div>