aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials/metadata.html
blob: bb2e4d39afd723cf8ee7f7ea4054d41cfe468e18 (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
48
49
50
51
52
53
54
55
56
57
58
59
{{ $dateTime := .PublishDate.Format "2006-01-02" }}
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
<div class="f6 lh-copy mv0 ph4 pv2">
  By &mdash;
  {{ range .Params.authors }}
    {{ $name := . }}
    {{ $path := printf "/%s/%s" "authors" ( $name | urlize ) }}
    {{ with $.GetPage $path }}
      {{ if isset .Params "name" }}
        <a class="link underline color-inherit" href="{{ .RelPermalink }}">
          {{- default $name .Params.name -}}
        </a>
      {{ else }}
        {{ $name }}
      {{ end }}
    {{ else }}
      {{ $name }}
    {{ end }}
  {{ end }}


  <br />
  <i class="far fa-calendar"></i>
  <time datetime="{{ $dateTime }}">
    {{ .Date.Format $dateFormat }}
  </time>
  {{ with .Params.location }}
    &mdash;
    {{ . }}
  {{ end }}

  {{ if eq .Section "post" }}
    | {{ .ReadingTime }} mins read
  {{ end }}

  {{ with .GetTerms "tags" }}
    |
    <a href="/tags" class="link w3-text-theme ph1">
      <i class="fas fa-tags"></i>
    </a>
    {{ range . }}
      <a class="link underline color-inherit" href="{{ .RelPermalink }}">
        {{- .Title -}}
      </a>
    {{ end }}
  {{ end }}

  {{ with .GetTerms "categories" }}
    |
    <a href="/categories" class="link w3-text-theme ph1">
      <i class="fas fa-folder-open"></i>
    </a>
    {{ range . }}
      <a class="link underline color-inherit" href="{{ .RelPermalink }}">
        {{- .Title -}}
      </a>
    {{ end }}
  {{ end }}
</div>