hpr-tools/Show_Submission/pic_definitions.tpl

24 lines
935 B
Smarty

[%# Template for generating index.html via Markdown. -%]
[%# Last updated: |2022-12-04 12:53:26| -%]
[% USE piclist = datafile(piclist) -%]
[%# >> Single picture, no thumbnail -%]
[% MACRO pic1(prefix,title,fn1) BLOCK -%]
[%# SET fn1 = "$prefix" _ fn1.split('/').slice(-1).join('/') -%]
[% SET fn1 = "$prefix" _ fn1.remove('^.+/uploads/') -%]
[%title%]\
![[%title%]]([%fn1%])
[% END -%]
[%# >> Thumbnail, linking to full-sized picture -%]
[% MACRO pic2(prefix,title,fn1,fn2) BLOCK -%]
[%# SET fn1 = "$prefix" _ fn1.split('/').slice(-1).join('/') -%]
[%# SET fn2 = "$prefix" _ fn2.split('/').slice(-1).join('/') -%]
[% SET fn1 = "$prefix" _ fn1.remove('^.+/uploads/') -%]
[% SET fn2 = "$prefix" _ fn2.remove('^.+/uploads/') -%]
[%title%]\
[![[%title%]]([%fn1%])]([%fn2%])
<br/><small><small><em>Click the thumbnail to see the full-sized image</em></small></small>
[% END -%]
[%#
# vim: syntax=tt2:ts=8:sw=4:ai:et:tw=78:fo=tcrqn21
-%]