yufan.me/themes/spectre/layout/_pages/gallery.ejs

55 lines
1.9 KiB
Plaintext
Raw Normal View History

2024-06-14 02:15:18 +08:00
<link rel="stylesheet" href="<%= theme.static_resource_prefix %>/styles/gallery.min.css">
<body>
<!-- Wrapper -->
<div id="wrapper">
<!-- Header -->
<header id="header">
<h1>
<a href="<%= config.root %>"><strong><%- config.title %></strong></a> - <%= page.title %>
</h1>
<nav>
<ul>
<li>
<a href="#footer" class="icon fa-info-circle">
©&nbsp;<%- config.author %>
</a>
</li>
</ul>
</nav>
</header>
<!-- Main -->
<div id="main">
<% if (site.data.gallery) { %>
<% for (var i in site.data.gallery) { %>
<article class="thumb">
<a href="<%= site.data.gallery[i].full_link %>" class="image lazy" data-original="<%= site.data.gallery[i].thumb_link %>"><img class="lazy" data-original="<%= site.data.gallery[i].thumb_link %>" alt="<%= i %>" /></a>
<h2><%= i %></h2>
<p><%= site.data.gallery[i].descr %></p>
</article>
<% } %>
<% } %>
</div>
</div>
<!-- Scripts -->
<script src="<%= theme.static_resource_prefix %>/scripts/jquery.min.js"></script>
<script src="<%= theme.static_resource_prefix %>/scripts/jquery.lazyload.min.js"></script>
<script src="<%= theme.static_resource_prefix %>/scripts/gallery.min.js"></script>
<script>
queue.offer(function(){
$('.lazy').lazyload({
effect: 'fadeIn',
event: 'scrollstop'
});
})
<!-- Start Queue -->
$(document).ready(function(){
setInterval(function(){
queue.execNext();
},200);
});
</script>
</body>