1
0
Fork 0
mirror of https://github.com/alangrainger/immich-public-proxy.git synced 2024-12-29 12:21:57 +00:00
immich-public-proxy/app/views/gallery.ejs

43 lines
1.4 KiB
Text
Raw Normal View History

2024-10-28 19:47:14 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
2024-10-29 09:49:54 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
2024-11-01 13:19:15 +00:00
<title><%- title || 'Gallery' %></title>
2024-10-28 19:47:14 +00:00
<link type="text/css" rel="stylesheet" href="/style.css"/>
<link type="text/css" rel="stylesheet" href="/lightgallery-bundle.min.css"/>
</head>
<body>
<div id="lightgallery">
2024-10-29 09:29:14 +00:00
<% items.forEach(item => {
if (item.video) { %>
<a data-video='<%- item.video %>'>
<img alt="" src="<%- item.thumbnailUrl %>"/>
<div class="play-icon"></div>
2024-10-28 19:47:14 +00:00
</a>
2024-10-29 09:29:14 +00:00
<% } else { %>
<a href="<%- item.previewUrl %>"<% if (item.downloadUrl) { %>
data-download-url="<%- item.downloadUrl %>"<% } %>>
2024-10-29 09:29:14 +00:00
<img alt="" src="<%- item.thumbnailUrl %>"/>
</a>
<% }
}) %>
2024-10-28 19:47:14 +00:00
</div>
2024-11-01 10:58:27 +00:00
<script src="/web.js"></script>
2024-10-28 19:47:14 +00:00
<script src="/lightgallery.min.js"></script>
2024-10-29 09:49:54 +00:00
<script src="/lg-fullscreen.min.js"></script>
2024-10-28 19:47:14 +00:00
<script src="/lg-thumbnail.min.js"></script>
2024-10-29 09:29:14 +00:00
<script src="/lg-video.min.js"></script>
2024-10-28 19:47:14 +00:00
<script src="/lg-zoom.min.js"></script>
<script type="text/javascript">
2024-11-01 14:36:53 +00:00
initLightGallery(<%- JSON.stringify(lgConfig) %>) // initLightGallery imported from web.js
2024-10-29 09:29:14 +00:00
<% if (openItem) { %>
const openItem = <%- openItem %>
const thumbs = document.querySelectorAll('#lightgallery a')
if (thumbs.length >= openItem) {
thumbs[openItem - 1].click()
}
<% } %>
2024-10-28 19:47:14 +00:00
</script>
</body>
</html>