aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials/post.html
blob: fa6d485c24cc6758659346b0e3cffdf714222ad4 (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
<article class="pv4 bt bb b--black-10">
  <a class="db no-underline dim near-black" href="{{ .RelPermalink }}">
    <h3 class="f3 baskerville mt0 lh-title">{{ .Title }}</h3>
    <div class="cf">
      {{ $image := "" }}
      {{ if resources.Get (index .Params.images 0) }}
        {{ $image =  resources.Get (index .Params.images 0) }}
      {{ else if (.Resources.ByType "image").GetMatch "*featured*" }}
        {{ $image =  (.Resources.ByType "image").GetMatch "*featured*" }}
      {{ end }}
      {{ with $image }}
        {{ $image := .Resize (default "320x" .Params.thumbnail_size) }}
        <div class="fl-ns mb4 mb0-ns pr3-ns">
          <img src="{{ $image.RelPermalink }}" class="db center" />
        </div>
      {{ end }}
      <div class="f5 lh-copy">
        <!-- {{ .Summary }} -->
        {{ .Summary | replaceRE `<sup.*?><a href.*?#fn:.*?footnote-ref.*?/a></sup>` "" | safeHTML }}
      </div>
    </div>
  </a>
  {{ if in (slice "post" "talk") .Section }}
    {{ partial "metadata.html" . }}
  {{ end }}
</article>