WIP
This commit is contained in:
+3
-24
@@ -24,28 +24,7 @@
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<div id="lightgallery">
|
||||
<% items.forEach(item => {
|
||||
if (item.video) { %>
|
||||
<a data-video='<%- item.video %>'
|
||||
<% if (item.downloadUrl) { %>
|
||||
data-download-url="<%- item.downloadUrl %>"
|
||||
<% } %>
|
||||
>
|
||||
<img alt="" src="<%- item.thumbnailUrl %>"/>
|
||||
<div class="play-icon"></div>
|
||||
</a>
|
||||
<% } else { %>
|
||||
<a href="<%- item.previewUrl %>"
|
||||
<% if (item.downloadUrl) { %>
|
||||
data-download-url="<%- item.downloadUrl %>"
|
||||
<% } %>
|
||||
>
|
||||
<img alt="" src="<%- item.thumbnailUrl %>"/>
|
||||
</a>
|
||||
<% }
|
||||
}) %>
|
||||
</div>
|
||||
<div id="lightgallery"></div>
|
||||
<script src="/share/static/web.js"></script>
|
||||
<script src="/share/static/lg/lightgallery.min.js"></script>
|
||||
<script src="/share/static/lg/lg-fullscreen.min.js"></script>
|
||||
@@ -53,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) %>) // initLightGallery imported from web.js
|
||||
<% if (openItem) { %>
|
||||
initLightGallery(<%- 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) {
|
||||
|
||||
Reference in New Issue
Block a user