servel 0.26.0 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/_gallery.haml +4 -4
- data/app/js/gallery.js +14 -4
- data/lib/servel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d22cac43dd4ee9dca7038c1151afbc0dae141be026bfb8d6286b870f2e8bc989
|
4
|
+
data.tar.gz: ac371123d5b054b040b146ed11e454bb46c434391aa0803814cc6ac0298459e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c758e45f6ae02ea188e33fd98002d39cd8f7ae4699c06b829c76370bfeb5d070c1254fb6722fdf640baaf986e050009f8a7abae52ad33db17926f1cc18958bc
|
7
|
+
data.tar.gz: 0f8ebbbd2a3b10879425a536bd208fdb215ba2af3902864babac144e7cbe08937f9ce4a765182d924b52da501423d996e5cc1de8817afbba37606eecda38d61e
|
data/app/_gallery.haml
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
#controls
|
2
|
-
#page-back.paginator ◀
|
3
|
-
#page-back-10.paginator ◀◀
|
4
|
-
#layout-mode.paginator ⤡
|
5
2
|
#page-jump-listing.paginator 🔗 Listing
|
3
|
+
#layout-mode.paginator ⤡
|
4
|
+
#page-back-10.paginator ◀◀
|
6
5
|
#page-next-10.paginator ▶▶
|
6
|
+
#page-back.paginator ◀
|
7
7
|
#page-next.paginator ▶
|
8
8
|
#content
|
9
9
|
%img#image
|
10
|
-
%video#video{controls: true}
|
10
|
+
%video#video{controls: false, loop: true}
|
11
11
|
%audio#audio{controls: true}
|
12
12
|
#text
|
13
13
|
%a#text-anchor{href: '#'}
|
data/app/js/gallery.js
CHANGED
@@ -20,9 +20,9 @@ var Gallery = (function() {
|
|
20
20
|
|
21
21
|
function clearContent() {
|
22
22
|
$gallery.classList.remove("image", "video", "audio", "text");
|
23
|
-
$("#image").src
|
24
|
-
$("#video").src
|
25
|
-
$("#audio").src
|
23
|
+
$("#image").removeAttribute('src');
|
24
|
+
$("#video").removeAttribute('src');
|
25
|
+
$("#audio").removeAttribute('src');
|
26
26
|
$("#text-content").innerHTML = "";
|
27
27
|
}
|
28
28
|
|
@@ -97,6 +97,12 @@ var Gallery = (function() {
|
|
97
97
|
if(layoutModeIndex >= LAYOUT_MODES.length) layoutModeIndex = 0;
|
98
98
|
}
|
99
99
|
|
100
|
+
function playPauseVideo() {
|
101
|
+
var $video = $("#video");
|
102
|
+
if ($video.paused || $video.ended) $video.play();
|
103
|
+
else $video.pause();
|
104
|
+
}
|
105
|
+
|
100
106
|
function initEvents() {
|
101
107
|
document.body.addEventListener("click", function(e) {
|
102
108
|
if(!e.target) return;
|
@@ -118,7 +124,7 @@ var Gallery = (function() {
|
|
118
124
|
fastForward();
|
119
125
|
}
|
120
126
|
else if(e.target.matches("#page-jump-listing")) {
|
121
|
-
e.
|
127
|
+
e.stopPropagation();
|
122
128
|
Index.jumpListing();
|
123
129
|
}
|
124
130
|
else if(e.target.closest("#layout-mode")) {
|
@@ -126,6 +132,10 @@ var Gallery = (function() {
|
|
126
132
|
switchLayoutMode();
|
127
133
|
layout();
|
128
134
|
}
|
135
|
+
else if(e.target.matches("#video")) {
|
136
|
+
e.stopPropagation();
|
137
|
+
playPauseVideo();
|
138
|
+
}
|
129
139
|
});
|
130
140
|
|
131
141
|
window.addEventListener("keydown", function(e) {
|
data/lib/servel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: servel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.27.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brenton "B-Train" Fletcher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|