summaryrefslogtreecommitdiff
path: root/themes/itheme/layouts/_default/_markup/render-image.html
blob: fb211d3c86f87a58226596ce1e3dfba61b9b9002 (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

{{- $src := .Destination -}}

{{- with dict "Path" $src "Resources" .Page.Resources | partial "function/resource.html" -}}
    {{- $src = .RelPermalink -}}
{{- end -}}

{{ $sign := md5 $src}}


{{ $str := split .Text "|" }}

{{ $text := index $str 0 }}

{{ $size := default "big" (index $str 1) }}

<figure class="image component image-fullbleed body-copy-wide nr-scroll-animation nr-scroll-animation--on image-{{ $size }}">  <div class="component-content">
    <div class="image-sharesheet">
      <div class="image image-load image-asset image-{{ $sign }}" id="lht{{ $sign }}">
        <picture  class="picture">
          <img class="picture-image" data-src="{{ $src  | safeURL }}" alt="{{ .Text }}"  />
        </picture>
      </div>
    </div>
    <div class="image-description">
      <div class="image-caption">
        {{ $text }}
      </div>
    </div>
  </div>
</figure>