aboutsummaryrefslogtreecommitdiff
path: root/generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html
diff options
context:
space:
mode:
Diffstat (limited to 'generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html')
-rw-r--r--generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html34
1 files changed, 22 insertions, 12 deletions
diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html b/generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html
index 498a901..d69966f 100644
--- a/generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html
+++ b/generators/hugo/themes/tdro/layouts/shortcodes/marginimage.html
@@ -1,14 +1,24 @@
-{{ $id := md5 (printf (.Get `mark`) .Inner) }}
-{{ $imageFile := print "public" (.Get `source`) }}
-{{ $image := imageConfig $imageFile }}
+{{- $mark := (.Get `mark`) -}}
+{{- $set := (.Get `set`) -}}
+{{- $source := (.Get `source`) -}}
+{{- $title := (.Get `title`) -}}
+{{- $id := md5 (printf $mark .Inner) -}}
+{{- $imageFile := print "public" $source -}}
+{{- $image := imageConfig $imageFile -}}
-<span class="marginnote-container">
- <label for="{{ $id }}" class="marginnote-toggle marginnote-mark" title="{{ .Inner | replaceRE "\n" " " | markdownify }}"><span>{{ .Get `mark` | markdownify }}</span></label>
- <input type="checkbox" id="{{ $id }}" class="marginnote-toggle">
- <span class="sans-serif marginnote 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 }}"/>
+<margin-note-aside>
+ <label for="{{ $id }}" title="{{ .Inner | replaceRE "\n" " " | markdownify }}"><span>{{ $mark | markdownify }}</span></label>
+ <input type="checkbox" id="{{ $id }}" name="toggle">
+ <margin-note title="{{ $mark }}" image {{ $set }}>
+ <a href="{{ $source }}" onclick="return false;">
+ <img data-image-zoom
+ src="{{ $source }}"
+ title="{{ $title }}"
+ width="{{ $image.Width }}"
+ height="{{ $image.Height }}"
+ alt="{{ .Inner | markdownify }}"
+ />
</a>
- <span class="sideimage-footer is-block has-text-centered has-text-grey-dark"><mark>{{ .Inner | markdownify }}</mark></span>
- </span>
-</span>
+ <mark>{{ .Inner | markdownify }}</mark>
+ </margin-note>
+</margin-note-aside>