hexo-theme-amane/layout/plugin/gallery.ejs

21 lines
845 B
Plaintext
Raw Normal View History

2018-10-16 05:28:42 +00:00
<% if (plugin !== false) { %>
<% if (head) { %>
<%- css(cdn('lightgallery', '1.6.8', 'css/lightgallery.min.css')) %>
<%- css(cdn('justifiedGallery', '3.7.0', 'css/justifiedGallery.min.css')) %>
<% } else { %>
<%- js(cdn('lightgallery', '1.6.8', 'js/lightgallery-all.min.js')) %>
<%- js(cdn('justifiedGallery', '3.7.0', 'js/jquery.justifiedGallery.min.js')) %>
<script>
(function ($) {
$(document).ready(function () {
if (typeof($.fn.lightGallery) === 'function') {
$('.article').lightGallery({ selector: '.gallery-item' });
}
if (typeof($.fn.justifiedGallery) === 'function') {
$('.justified-gallery').justifiedGallery();
}
});
})(jQuery);
</script>
<% } %>
<% } %>