diff options
author | FChannel <> | 2021-07-08 23:15:49 -0700 |
---|---|---|
committer | FChannel <> | 2021-07-08 23:15:49 -0700 |
commit | 6ba4ff0a930f3a3c053af2553950fcfe5b5ad180 (patch) | |
tree | 139a20c0578ca47a43bf8112e977dda689b1b1cd | |
parent | 3d6891c9403bbc3c7d268c17b5e514bb38eb2881 (diff) |
changed catalog image to previw image if available
-rw-r--r-- | static/ncatalog.html | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/static/ncatalog.html b/static/ncatalog.html index 4c6c589..68bb01a 100644 --- a/static/ncatalog.html +++ b/static/ncatalog.html @@ -67,7 +67,15 @@ img.style = "max-width: 180px; max-height: 180px;" img.setAttribute("id", "img") img.setAttribute("main", "1") - img.setAttribute("src", "{{ proxy (index .Attachment 0).Href }}") + img.setAttribute("enlarge", "0") + img.setAttribute("attachment", "{{ proxy (index .Attachment 0).Href }}") + {{ if .Preview.Href }} + img.setAttribute("src", "{{ proxy .Preview.Href }}") + img.setAttribute("preview", "{{ proxy .Preview.Href }}") + {{ else }} + img.setAttribute("src", "{{ proxy (index .Attachment 0).Href }}") + img.setAttribute("preview", "{{ proxy (index .Attachment 0).Href }}") + {{ end }} media.appendChild(img) } |