-
Notifications
You must be signed in to change notification settings - Fork 17
/
album.hbs
96 lines (84 loc) · 3.03 KB
/
album.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>{{gallery.title}} - {{album.title}}</title>
<link rel="stylesheet" href="{{relative 'public/lightgallery/css/lightgallery.css'}}" />
<link rel="stylesheet" href="{{relative 'public/lightslider/css/lightslider.min.css'}}" />
<link rel="stylesheet" href="{{relative 'public/videojs/video-js.min.css'}}" />
<link rel="stylesheet" href="{{relative 'public/lightgallery/css/lg-exif.min.css'}}" />
<link rel="stylesheet" href="{{relative 'public/core.css'}}" />
<link rel="stylesheet" href="{{relative 'public/theme.css'}}" />
<link rel="stylesheet" href="{{relative 'public/justifiedgallery/justifiedGallery.min.css'}}" />
</head>
<body>
{{> content}}
{{> video-loader}}
<!-- jQuery -->
<script src="{{relative 'public/jquery.min.js'}}"></script>
<!-- VideoJS -->
<script src="{{relative 'public/videojs/video.min.js'}}"></script>
<!-- LightGallery -->
<script src="{{relative 'public/lightgallery/js/lightgallery-all.min.js'}}"></script>
<script src="{{relative 'public/lightgallery/js/lg-exif.min.js'}}"></script>
<!-- LightSlider + Justified Gallery -->
<script src="{{relative 'public/lightslider/js/lightslider.min.js'}}"></script>
<script src="{{relative 'public/justifiedgallery/jquery.justifiedGallery.min.js'}}"></script>
<script>
$(document).ready(function() {
$("#media").lightGallery({
thumbWidth: 80,
controls: true,
loop : false,
download: true,
counter: true,
videojs: true,
fullScreen: true,
zoom: true,
exThumbImage: 'data-exthumbimage'
});
// Init justified gallery for albums
$("#albums").justifiedGallery({
{{!-- selector: '.albumList', --}}
margins: 10,
rowHeight: 300,
maxRowHeight: 325,
});
// Init justified gallery for photos
$("#media").justifiedGallery({
selector: '.albumList',
waitThumbnailsLoad: false,
margins: 10,
rowHeight: 250,
maxRowHeight: 275,
});
});
</script>
{{#if album.home}}
<script id="slider-js" data-interval="{{@root.settings.sliderInterval}}">
$(document).ready(function () {
let waitTime = 1000;
try {
waitTime = parseInt($("#slider-js").data("interval"));
} catch (e) {
console.error("Invalid speed value for slider: " + waitTime + "\n" + e);
}
$("#lightSlider").lightSlider({
auto: true,
loop: true,
item: 1,
gallery: true,
pause: waitTime,
onSliderLoad: (el) => {
el.lightGallery({
selector: "#lightSlider li"
})
}
});
});
</script>
{{/if}}
{{> analytics}}
</body>
</html>