servel 0.26.0 → 0.27.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75f1adecf46ae4f4e27908dd3fbf9668bcd8f11bf984891dae8ee0c4c4ce4d86
4
- data.tar.gz: a60bafd99c0e34e664978a7972508b7f8808b04d3f6d59c70cf50bf640863278
3
+ metadata.gz: d22cac43dd4ee9dca7038c1151afbc0dae141be026bfb8d6286b870f2e8bc989
4
+ data.tar.gz: ac371123d5b054b040b146ed11e454bb46c434391aa0803814cc6ac0298459e3
5
5
  SHA512:
6
- metadata.gz: 4e517dbf1780afa748772644f336acef587e2b60ef25736936f2ac79673f363a4b97bfe59fed2eb559e14c6565ce8b24cd589a6e3c140f2d0002570e540846fd
7
- data.tar.gz: e78d33037f5aedd290eb798dfa80dbb0aa8886f8724da3ce3f7bc4d12e8b623b64480c57b0a79f81d2922488ded6ca4ef6cffad70d21bb14e90c9a8d0604eb2b
6
+ metadata.gz: 0c758e45f6ae02ea188e33fd98002d39cd8f7ae4699c06b829c76370bfeb5d070c1254fb6722fdf640baaf986e050009f8a7abae52ad33db17926f1cc18958bc
7
+ data.tar.gz: 0f8ebbbd2a3b10879425a536bd208fdb215ba2af3902864babac144e7cbe08937f9ce4a765182d924b52da501423d996e5cc1de8817afbba37606eecda38d61e
@@ -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: '#'}
@@ -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 = "about:none";
24
- $("#video").src = "about:none";
25
- $("#audio").src = "about:none";
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.preventDefault();
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) {
@@ -1,3 +1,3 @@
1
1
  module Servel
2
- VERSION = "0.26.0"
2
+ VERSION = "0.27.0"
3
3
  end
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.26.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-12 00:00:00.000000000 Z
11
+ date: 2018-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler