diff options
author | Sylvia <sylvie@gmail.com> | 2021-09-12 00:24:39 +0300 |
---|---|---|
committer | Karl <kc0bfv@gmail.com> | 2021-11-12 01:40:15 +0300 |
commit | 8e85d3255557caa1e8cd06b8599876c49bdf3441 (patch) | |
tree | 253bf6c69931ffa9aa8e2898fcca5720e0ed71c8 | |
parent | 221e1ebe87cd4408d1d216cc2d8fa4d9c748adb1 (diff) |
use filename hash, not index, to reference images in detail view
-rw-r--r-- | layouts/partials/sect_and_img_content.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/partials/sect_and_img_content.html b/layouts/partials/sect_and_img_content.html index 73b54d8..5551b2b 100644 --- a/layouts/partials/sect_and_img_content.html +++ b/layouts/partials/sect_and_img_content.html @@ -140,7 +140,7 @@ {{- $column := $.Scratch.Get $st_name }} <div class="flexcol"> {{- range $column }} - + {{- $filename := path.Base .image.Name }} <article class="thumb"> {{- if (eq .type "sect") }} <a href="{{ .link }}" class="link" tabindex="0"><img src="{{ .thumb.RelPermalink }}" alt="{{ .title }}" /></a> @@ -149,9 +149,9 @@ <a class="gallery-item" phototitle="{{ .phototitle }}" description="{{ .description }}" gallery_index="{{ .index }}" - id="image_number_{{ .index }}" + id="{{ md5 $filename }}" downloadable="{{ cond $downloadable "true" "false" }}" - orig_name="{{ path.Base .image.Name }}" + orig_name="{{ $filename }}" href="{{ .full.RelPermalink }}"> <img src="{{ .thumb.RelPermalink }}" {{ with .alt }} alt="{{ . }}"{{ end }}> |