aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials/post.html
blob: 1c655c11a681541417bd9874f80a50e572cd80d0 (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
<article class="pv2 bt bb b--black-10">
  {{ partial "meta_links.html" . }}
  <a class="db no-underline dim near-black" href="{{ .RelPermalink }}">
    <div class="cf">
      {{ $image := "" }}
      {{ if (.Resources.ByType "image").GetMatch "featured*" }}
        {{ $image =  (.Resources.ByType "image").GetMatch "*featured*" }}
      {{ else if resources.Get (index .Params.images 0) }}
        {{ $image =  resources.Get (index .Params.images 0) }}
      {{ end }}
      {{ with $image }}
        <div class="fl-ns mb4 mb0-ns pr3-ns">
          <img
            src="{{ if ne .MediaType.SubType "svg" }}
              {{ $image := .Fill (default "150x150" $.Params.thumbnail_size) }}
              {{ $image.RelPermalink }}
            {{ else }}
              {{ $image.RelPermalink }}
            {{ end }}"
            class="mw-20-ns db center"
          />
        </div>
      {{ end }}
      <h3 class="f3 baskerville mv1 lh-title">{{ .Title }}</h3>
      <div class="f5 lh-copy">
        <!-- {{ .Summary }} -->
        {{ .Summary | replaceRE `<sup.*?><a href.*?#fn:.*?footnote-ref.*?/a></sup>` "" | safeHTML }}
      </div>
    </div>
  </a>
  {{ if .Params.metadata }}
    {{ partial "metadata.html" . }}
  {{ end }}
</article>