diff options
author | Michał Sapka <michal@sapka.me> | 2023-01-19 22:33:36 +0100 |
---|---|---|
committer | Michał Sapka <michal@sapka.me> | 2023-01-19 22:33:36 +0100 |
commit | 36662ef4d3993b3fa6e7a1fa9519172cb68c1e26 (patch) | |
tree | 21498b2e084ea458e79eb35676c67fdf31f1cd3f /layouts/shortcodes/imgproc.html | |
parent | 1314cf4f87489ed903f5b09ccbffd4d52a07f48d (diff) |
feat:article for 2023-01-19
Diffstat (limited to 'layouts/shortcodes/imgproc.html')
-rw-r--r-- | layouts/shortcodes/imgproc.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/layouts/shortcodes/imgproc.html b/layouts/shortcodes/imgproc.html index c8f75c2..f271fd6 100644 --- a/layouts/shortcodes/imgproc.html +++ b/layouts/shortcodes/imgproc.html @@ -1,6 +1,8 @@ {{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }} {{ $command := .Get 1 }} {{ $options := .Get 2 }} +{{ $caption := .Get 3 }} +{{ $source := .Get 4 }} {{ if eq $command "Fit"}} {{ $img = $img.Fit $options }} {{ else if eq $command "Resize"}} @@ -15,6 +17,10 @@ <figure> <img class="centered" src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}"> <figcaption> - {{.Get 3}} + {{ $caption }} + + {{- if $source }} + <a href="{{ $source }}" target="_blank" title="source">[source]</a> + {{ end }} </figcaption> </figure> |