diff options
author | Karl <kc0bfv@gmail.com> | 2021-07-10 19:52:06 +0300 |
---|---|---|
committer | Karl <kc0bfv@gmail.com> | 2021-07-10 19:52:06 +0300 |
commit | 91e15316f64dfb3b1990299e9c2bdf442b4081aa (patch) | |
tree | 5d61b601e7a3d8e31ae1acd416362f868ff5dd9d /layouts | |
parent | e75c9c61a828d0d56b7d2ac2256e05b26c18697d (diff) | |
parent | 410af20133539767c33a91144ce1427ec0802665 (diff) |
Add feature to disable download button
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/sect_and_img_content.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/sect_and_img_content.html b/layouts/partials/sect_and_img_content.html index 8d9e06c..fca47bd 100644 --- a/layouts/partials/sect_and_img_content.html +++ b/layouts/partials/sect_and_img_content.html @@ -8,6 +8,7 @@ {{- $thumb_quality := default 50 ($.Param "thumb_quality") }} {{- $full_quality := default 90 ($.Param "full_quality") }} {{- $filename_as_phototitle := default false ($.Param "filename_as_phototitle") }} + {{- $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 }} @@ -149,8 +150,9 @@ {{- else }} <a class="gallery-item" phototitle="{{ .phototitle }}" description="{{ .description }}" - orig_name="{{ path.Base .image.Name }}" gallery_index="{{ .index }}" + downloadable="{{ cond $downloadable "true" "false" }}" + orig_name="{{ path.Base .image.Name }}" href="{{ .full.RelPermalink }}"> <img src="{{ .thumb.RelPermalink }}" {{ with .alt }} alt="{{ . }}"{{ end }}> |