aboutsummaryrefslogtreecommitdiff
path: root/generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html
blob: f309fdc480519dd681abf1edfeac1812e6e668c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{{ $id := md5 (printf (.Get `mark`) .Inner) }}
{{ $imageFile := print "public" (.Get `source`) }}
{{ $image := imageConfig $imageFile }}

<span class="sidenote-container">
  <label for="{{ $id }}" class="sidenote-toggle sidenote-mark" title="{{ .Inner | replaceRE "\n" " " | markdownify }}"><span>{{ .Get `mark` | markdownify }}</span></label>
  <input type="checkbox" id="{{ $id }}" class="sidenote-toggle">
  <span class="sans-serif sidenote sideimage {{ .Get `set` }}note">
    <a href="{{.Get `source`}}" onclick="return false;">
      <img data-image-zoom src="{{ .Get `source`}}" alt="{{ .Inner | markdownify }}" title="{{ .Get `title`}}" width="{{ $image.Width }}" height="{{ $image.Height }}"/>
    </a>
    <span class="sideimage-footer is-block has-text-centered has-text-grey-dark"><mark>{{ .Inner | markdownify }}</mark></span>
  </span>
</span>