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 /assets | |
parent | 3d54a049288990067e2686379b60c2d4ff7becbe (diff) |
Download images is optional
Diffstat (limited to 'assets')
-rw-r--r-- | assets/js/main.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/assets/js/main.js b/assets/js/main.js index c6d6410..feea6aa 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -293,12 +293,15 @@ type: "image", image: { titleSrc: function(item) { - let caption = '<div title="Download" ' + + let caption = ''; + if(item.el.attr("downloadable") ){ + caption += '<div title="Download" ' + 'class="download-button"><a href="' + item.el.attr("href") + '" download="' + item.el.attr("orig_name") + '"><i class="fa fa-download"></i></a></div>' + '<div class="caption-surround">'; + } if( item.el.attr("phototitle") ) { caption += "<h2>" + item.el.attr("phototitle") + "</h2>"; } |