diff options
| author | maike <maike@synzr.tw> | 2026-09-02 21:41:31 +0500 |
|---|---|---|
| committer | maike <maike@synzr.tw> | 2026-09-02 22:20:44 +0500 |
| commit | e176c0f0709bd17a46d943b96e631a3f2b1320fb (patch) | |
| tree | 422c5fec7cb4b1f90ec4d895b7f86329bcddb87e /partials/_figure.p | |
| parent | e7c15e2602e49355444f5d90819dfd0ea66e47bf (diff) | |
| download | hamster-e176c0f0709bd17a46d943b96e631a3f2b1320fb.tar.gz hamster-e176c0f0709bd17a46d943b96e631a3f2b1320fb.tar.bz2 hamster-e176c0f0709bd17a46d943b96e631a3f2b1320fb.zip | |
Clickable IRL photo
Diffstat (limited to 'partials/_figure.p')
| -rw-r--r-- | partials/_figure.p | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/partials/_figure.p b/partials/_figure.p new file mode 100644 index 0000000..df7c653 --- /dev/null +++ b/partials/_figure.p @@ -0,0 +1,29 @@ +@USE +/partials/_picture.p + +@figure[images;default_type;.caption;.alt;.height;.href] +^if(def $alt){ + $resolved_alt[$alt] +}(def $caption){ + $resolved_alt[$caption] +} + +<figure class="figure"> +# HACK боже какое оно вонючее + ^if(def $href){ + <a href="$href"> + } + ^picture[$images;$default_type; + $.alt[$resolved_alt] + $.height[$height] + $.class[image] + ] + ^if(def $href){ + </a> + } + + ^if(def $caption){ + <figcaption class="caption">$caption</figcaption> + } +</figure> +#end @figure[] |
