summaryrefslogtreecommitdiffci
diff options
from:
to:
context:
space:
mode:
-rw-r--r--internal/glightbox/html_renderer.go13
-rw-r--r--static/input.css3
-rw-r--r--views/pages/blog-page.html5
3 files changed, 11 insertions, 10 deletions
diff --git a/internal/glightbox/html_renderer.go b/internal/glightbox/html_renderer.go
index 9077cc4..aad7984 100644
--- a/internal/glightbox/html_renderer.go
+++ b/internal/glightbox/html_renderer.go
@@ -110,8 +110,8 @@ func (r *GLightboxHTMLRenderer) renderGLightbox(w util.BufWriter, source []byte,
anchorlessCaptionHTML := r.anchorMatchRe.ReplaceAll(captionHTML, []byte("<span class=\"linklike\" $1 $3>$4</span>"))
elements = append(elements, fmt.Sprintf(`
- <a href="https://f003.backblazeb2.com/file/sayana-photos/full/%s" class="glightbox-%s grid-item %s grid-item-%s p-1"
- data-gallery="gallery-%s" data-title="%s" %s>
+ <a href="https://f003.backblazeb2.com/file/sayana-photos/full/%s" class="glightbox grid-item %s grid-item-%s p-1"
+ data-gallery="gallery" data-title="%s" %s>
<picture>
<source media="(width < 800px)" srcset="https://f003.backblazeb2.com/file/sayana-photos/webp-320p/%s.webp" />
<source media="(width < 2400px)" srcset="https://f003.backblazeb2.com/file/sayana-photos/webp-560p/%s.webp" />
@@ -122,7 +122,7 @@ func (r *GLightboxHTMLRenderer) renderGLightbox(w util.BufWriter, source []byte,
</picture>
<span class="grid-tooltip-text"><p>%s</p></span>
<span class="grid-item-index">%d</span>
- </a>`, img.URL, galleryID, strings.Join(tagClassList, " "), galleryID, galleryID, dayDate.Format("2006-01-02 15:04:05 -07:00"), dataDescriptionAttribute, imageUrlWithoutExt, imageUrlWithoutExt, imageUrlWithoutExt, imageUrlWithoutExt, imageUrlWithoutExt, imageUrlWithoutExt, anchorlessCaptionHTML, i+1))
+ </a>`, img.URL, strings.Join(tagClassList, " "), galleryID, dayDate.Format("2006-01-02 15:04:05 -07:00"), dataDescriptionAttribute, imageUrlWithoutExt, imageUrlWithoutExt, imageUrlWithoutExt, imageUrlWithoutExt, imageUrlWithoutExt, imageUrlWithoutExt, anchorlessCaptionHTML, i+1))
if glightboxDescId != "" {
elements = append(elements, fmt.Sprintf(`
@@ -144,11 +144,6 @@ func (r *GLightboxHTMLRenderer) renderGLightbox(w util.BufWriter, source []byte,
w.WriteString(fmt.Sprintf(`
<script>
- var lightbox_%s = GLightbox({
- selector: '.glightbox-%s',
- moreLength: 0
- });
-
var msnry_%s = new Masonry('.masonry-grid-%s', {
itemSelector: '.grid-item-%s',
columnWidth: '.grid-sizer-%s',
@@ -170,7 +165,7 @@ func (r *GLightboxHTMLRenderer) renderGLightbox(w util.BufWriter, source []byte,
initMasonryLayout_%s = null;
imgLoad_%s = null;
});
-</script>`, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID))
+</script>`, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID, galleryID))
}
return ast.WalkContinue, nil
diff --git a/static/input.css b/static/input.css
index 49a5890..c308796 100644
--- a/static/input.css
+++ b/static/input.css
@@ -377,7 +377,7 @@ a:hover, .linklike:hover {
margin-top: 0.25rem;
border-radius: 0.5rem;
position: absolute;
- z-index: 801;
+ z-index: 1001;
}
.grid-tooltip:hover .grid-tooltip-text {
@@ -495,6 +495,7 @@ a:hover, .linklike:hover {
.gslide-description {
flex-grow: 0;
flex-shrink: 1;
+ flex-basis: 0;
}
.map-container .leaflet-container {
diff --git a/views/pages/blog-page.html b/views/pages/blog-page.html
index c9c9e91..77164fa 100644
--- a/views/pages/blog-page.html
+++ b/views/pages/blog-page.html
@@ -46,6 +46,11 @@
{{ .MapLocationY }},
{{ .MapLocationAreaMeters }}
), 1000);
+
+ var lightbox = GLightbox({
+ selector: '.glightbox',
+ moreLength: 0
+ });
</script>
{{- end }}
</div>