aboutsummaryrefslogtreecommitdiff
path: root/generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2022-07-19 11:59:45 -0400
committerThedro Neely <thedroneely@gmail.com>2022-07-19 11:59:45 -0400
commitea54421b15c9705f86a8d25a6caaa40791d66e18 (patch)
tree546ec8892c2140a48129fd521189dc68b567c95b /generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html
parentf888991f298e59933250c8d56080c1805068f5e0 (diff)
downloadthedroneely.com-ea54421b15c9705f86a8d25a6caaa40791d66e18.tar.gz
thedroneely.com-ea54421b15c9705f86a8d25a6caaa40791d66e18.tar.bz2
thedroneely.com-ea54421b15c9705f86a8d25a6caaa40791d66e18.zip
app: Refactor and CSS rewrite
Diffstat (limited to 'generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html')
-rw-r--r--generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html34
1 files changed, 22 insertions, 12 deletions
diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html b/generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html
index f309fdc..a2574d5 100644
--- a/generators/hugo/themes/tdro/layouts/shortcodes/sideimage.html
+++ b/generators/hugo/themes/tdro/layouts/shortcodes/sideimage.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="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 }}"/>
+<side-note-aside>
+ <label for="{{ $id }}" title="{{ .Inner | replaceRE "\n" " " | markdownify }}"><span>{{ $mark | markdownify }}</span></label>
+ <input type="checkbox" id="{{ $id }}" name="toggle">
+ <side-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>
+ </side-node>
+</side-note-aside>