Populating array with new items

This commit is contained in:
Alan Grainger
2025-01-09 21:16:16 +08:00
parent b9d6c53499
commit 695cd64c94
2 changed files with 66 additions and 48 deletions
+2 -2
View File
@@ -32,8 +32,8 @@
<script src="/share/static/lg/lg-video.min.js"></script>
<script src="/share/static/lg/lg-zoom.min.js"></script>
<script type="text/javascript">
initLightGallery(<%- JSON.stringify({lgConfig, items, openItem}) %>) // initLightGallery imported from web.js
<% if (false && openItem) { %>
lgallery.init(<%- JSON.stringify({lgConfig, items, openItem}) %>) // initLightGallery imported from web.js
<% if (false && openItem) { %>
const openItem = <%- openItem %>
const thumbs = document.querySelectorAll('#lightgallery a')
if (thumbs.length >= openItem) {