diff options
author | Fabrizio W <fabrizio2210@gamil.com> | 2021-04-11 10:59:40 +0300 |
---|---|---|
committer | Fabrizio W <fabrizio2210@gamil.com> | 2021-07-10 12:01:03 +0300 |
commit | 3b3938be0173c7920b81c011ad511ab2d658e796 (patch) | |
tree | 6f68267d64d991ba60a4f4d4514c3c2c482fa024 /layouts | |
parent | 3d54a049288990067e2686379b60c2d4ff7becbe (diff) |
Download images is optional
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/sect_and_img_content.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/sect_and_img_content.html b/layouts/partials/sect_and_img_content.html index f4b81bd..6841039 100644 --- a/layouts/partials/sect_and_img_content.html +++ b/layouts/partials/sect_and_img_content.html @@ -7,6 +7,7 @@ {{- $full_width := default 960 ($.Param "full_width") }} {{- $thumb_quality := default 50 ($.Param "thumb_quality") }} {{- $full_quality := default 90 ($.Param "full_quality") }} + {{- $downloadable := default true ($.Param "images_downloadable") }} {{- $thumb_size := printf "%dx q%d" $thumb_width $thumb_quality }} {{- $full_size := printf "%dx q%d" $full_width $full_quality }} @@ -142,8 +143,11 @@ {{- else }} <a class="gallery-item" phototitle="{{ .phototitle }}" description="{{ .description }}" - orig_name="{{ path.Base .image.Name }}" gallery_index="{{ .index }}" + {{- if $downloadable }} + downloadable="yes" + orig_name="{{ path.Base .image.Name }}" + {{- end }} href="{{ .full.RelPermalink }}"> <img src="{{ .thumb.RelPermalink }}" {{ with .alt }} alt="{{ . }}"{{ end }}> |