servel 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/js/gallery.js +12 -8
- 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: 8f15c64ad7143343fa43beea82a7c09813ffda5d38c64cf3933fe5033bb78270
|
4
|
+
data.tar.gz: 4a37029622423e52a260f26b3dd71a2ac0943e605370364a85e206fd644f6951
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bea3930d3199941d249401dfae0f25a27dc03cf43dd39af5914d2ae7ef9af64ce49c73b47099758611e076f96396f30564404451b9f8f58a78fbfaf34b2f2622
|
7
|
+
data.tar.gz: 0d3f892f937a3046e75a8a61fad8678252a88e7f657ef84da82ee7f46d852492368cc42aa17cda7ac869236a4ae3ae12200f6b48dd8a35c8648afd9460b02b52
|
data/app/js/gallery.js
CHANGED
@@ -4,6 +4,8 @@ var Gallery = (function() {
|
|
4
4
|
var LAYOUT_MODES = ["fit-both", "fit-width", "clamp-width"];
|
5
5
|
|
6
6
|
var $gallery;
|
7
|
+
var $video;
|
8
|
+
var $audio;
|
7
9
|
var currentIndex;
|
8
10
|
var layoutModeIndex = 0;
|
9
11
|
|
@@ -20,9 +22,10 @@ var Gallery = (function() {
|
|
20
22
|
|
21
23
|
function clearContent() {
|
22
24
|
$gallery.classList.remove("image", "video", "audio", "text");
|
23
|
-
$
|
24
|
-
$
|
25
|
-
$
|
25
|
+
$video.removeAttribute('src');
|
26
|
+
$video.pause();
|
27
|
+
$audio.removeAttribute('src');
|
28
|
+
$audio.pause();
|
26
29
|
$("#text-content").innerHTML = "";
|
27
30
|
}
|
28
31
|
|
@@ -98,7 +101,6 @@ var Gallery = (function() {
|
|
98
101
|
}
|
99
102
|
|
100
103
|
function playPauseVideo() {
|
101
|
-
var $video = $("#video");
|
102
104
|
if ($video.paused || $video.ended) $video.play();
|
103
105
|
else $video.pause();
|
104
106
|
}
|
@@ -162,10 +164,10 @@ var Gallery = (function() {
|
|
162
164
|
|
163
165
|
$("#image").style.maxWidth = maxWidth;
|
164
166
|
$("#image").style.maxHeight = maxHeight;
|
165
|
-
$
|
166
|
-
$
|
167
|
-
$
|
168
|
-
$
|
167
|
+
$video.style.maxWidth = maxWidth;
|
168
|
+
$video.style.maxHeight = maxHeight;
|
169
|
+
$audio.style.maxWidth = maxWidth;
|
170
|
+
$audio.style.maxHeight = maxHeight;
|
169
171
|
}
|
170
172
|
|
171
173
|
function initLayout() {
|
@@ -180,6 +182,8 @@ var Gallery = (function() {
|
|
180
182
|
|
181
183
|
function init() {
|
182
184
|
$gallery = $("#gallery");
|
185
|
+
$video = $("#video");
|
186
|
+
$audio = $("#audio");
|
183
187
|
|
184
188
|
onEntriesUpdate();
|
185
189
|
|
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.28.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-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|