Diffstat (limited to 'internal/lightgallery/html_renderer.go')
| -rw-r--r-- | internal/lightgallery/html_renderer.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/lightgallery/html_renderer.go b/internal/lightgallery/html_renderer.go index 8e184e0..21bd049 100644 --- a/internal/lightgallery/html_renderer.go +++ b/internal/lightgallery/html_renderer.go @@ -60,8 +60,7 @@ func (r *LightGalleryHTMLRenderer) renderLightGallery(w util.BufWriter, source [ for _, img := range gallery.Images { imageUrlSegments := strings.Split(img.URL, ".") imageUrlWithoutExt := strings.Join(imageUrlSegments[:len(imageUrlSegments)-1], ".") - imageUrlParts := strings.Split(imageUrlWithoutExt, "/") - imageNameParts := strings.Split(imageUrlParts[len(imageUrlParts)-1], "-") + imageNameParts := strings.Split(imageUrlWithoutExt, "-") var captionBuf bytes.Buffer captionHTML := img.Caption @@ -127,7 +126,7 @@ document.addEventListener('htmx:afterRequest', (e) => { if (e.detail.target.id == 'general-page-body') { createLightGallery%s(); } -}, {once: true}); +}); </script>`, galleryID, galleryID, strings.Join(dynamicElements, ","), galleryID, galleryID)) } |