jekyll-theme-isabelline 0.1.22 → 0.1.23
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/README.md +1 -1
- data/_includes/gallery.html +2 -2
- data/_sass/_isabelline.scss +24 -5
- data/assets/js/gallery.js +77 -10
- metadata +3 -6
- data/build/Dockerfile +0 -17
- data/build/Dockerfile-serve +0 -8
- data/build/docker-entrypoint.sh +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54f8c8361f0dbdec8be508ff7a42a84c080888817d17bd50522a11d94291391c
|
4
|
+
data.tar.gz: a3568115fb01e50122908ca1928c7510a14fa5cade8c0aee347dfb28220772ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 646ec113bc9e246c17ed30c6ebfa42039ca32da83e4a64ef6c4c705ea2c84e2e23ec1e7d5879f136e78d258bd226bad26601cd2194c492f2b2f1288b7dca792d
|
7
|
+
data.tar.gz: b545cc2d12f0faa42e24efee3dc0d86f1fbf2a480222f437df3c95ac3139ee1d03b4ee20b169fcc3eb337585b89d90a2d224df909db06a6b56d345503aee1bf1
|
data/README.md
CHANGED
data/_includes/gallery.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
{% assign sorted_static_files = site.static_files | map: "path" | sort %}
|
6
6
|
|
7
|
-
{% assign
|
7
|
+
{% assign valid_image_extensions = "jpg,jpeg,png,gif" | split: "," %}
|
8
8
|
|
9
9
|
<div class="gallery" id="gallery-{{ gallery_name }}">
|
10
10
|
{% assign image_index = 0 %}
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<div class="images">
|
13
13
|
{% for image_path in sorted_static_files %}
|
14
14
|
{% assign image_ext = image_path | split: "." | last %}
|
15
|
-
{% if
|
15
|
+
{% if valid_image_extensions contains image_ext %}
|
16
16
|
{% if image_path contains gallery_prefix %}
|
17
17
|
{% assign image_index = image_index | plus: 1 %}
|
18
18
|
<img id="{{ gallery_name }}-{{ image_index }}" src="{{ site.baseurl }}{{ image_path }}" />
|
data/_sass/_isabelline.scss
CHANGED
@@ -235,20 +235,37 @@ main {
|
|
235
235
|
width: 100%;
|
236
236
|
|
237
237
|
// height: 200px;
|
238
|
-
float: left;
|
238
|
+
// float: left;
|
239
239
|
}
|
240
240
|
|
241
241
|
div.images {
|
242
|
+
position: relative;
|
243
|
+
height: 500px;
|
244
|
+
overflow: hidden;
|
245
|
+
|
246
|
+
will-change: height;
|
247
|
+
transition: 300ms ease;
|
248
|
+
|
249
|
+
img.transition {
|
250
|
+
will-change: left;
|
251
|
+
transition: 300ms ease;
|
252
|
+
}
|
253
|
+
|
254
|
+
img.left { left: -100% !important; }
|
255
|
+
img.right { left: 100% !important; }
|
256
|
+
img.center { left: 0 !important; }
|
257
|
+
|
242
258
|
img {
|
243
259
|
cursor: pointer;
|
244
260
|
border-radius: 6px;
|
245
|
-
|
246
|
-
|
247
|
-
|
261
|
+
|
262
|
+
position: absolute;
|
263
|
+
top: 0;
|
264
|
+
left: 100%;
|
248
265
|
}
|
249
266
|
|
250
267
|
img:first-child {
|
251
|
-
|
268
|
+
left: 0;
|
252
269
|
}
|
253
270
|
}
|
254
271
|
|
@@ -271,6 +288,8 @@ main {
|
|
271
288
|
}
|
272
289
|
}
|
273
290
|
|
291
|
+
// slightly modified version of
|
292
|
+
// https://css-tricks.com/making-pure-css-playpause-button/
|
274
293
|
.play {
|
275
294
|
float: left;
|
276
295
|
|
data/assets/js/gallery.js
CHANGED
@@ -3,9 +3,11 @@
|
|
3
3
|
var process_gallery = function (g) {
|
4
4
|
var
|
5
5
|
// milliseconds to wait before switch to next slide
|
6
|
-
NEXT_SLIDE_TIMEOUT =
|
6
|
+
NEXT_SLIDE_TIMEOUT = 3000;
|
7
7
|
|
8
8
|
var
|
9
|
+
images_container = g.querySelector('.images'),
|
10
|
+
|
9
11
|
// images in this gallery
|
10
12
|
images = g.querySelectorAll('.images img'),
|
11
13
|
|
@@ -26,17 +28,71 @@
|
|
26
28
|
// handle to setInterval
|
27
29
|
play_interval;
|
28
30
|
|
31
|
+
/*
|
32
|
+
+--------+--------+--------+
|
33
|
+
| image1 | image2 | image3 |
|
34
|
+
| |selected| |
|
35
|
+
+--------+--------+--------+
|
36
|
+
*/
|
37
|
+
|
38
|
+
var adjust_height = function (index) {
|
39
|
+
images_container.style.height = images[index].offsetHeight + 'px';
|
40
|
+
}
|
41
|
+
|
29
42
|
// show image at index
|
30
43
|
// update nav controls accordingly
|
31
44
|
var select_image = function (index) {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
45
|
+
if (selected_index === index) return;
|
46
|
+
|
47
|
+
var slide = function () {
|
48
|
+
images[selected_index].removeEventListener('transitionend', slide);
|
49
|
+
|
50
|
+
images[selected_index].classList.remove('transition');
|
51
|
+
images[index].classList.remove('transition');
|
52
|
+
|
37
53
|
navs[index].classList.add('selected');
|
54
|
+
navs[selected_index].classList.remove('selected');
|
55
|
+
|
38
56
|
selected_index = index;
|
39
57
|
}
|
58
|
+
|
59
|
+
images[selected_index].addEventListener('transitionend', slide);
|
60
|
+
|
61
|
+
if (index < selected_index) {
|
62
|
+
setTimeout(function () {
|
63
|
+
images[index].classList.remove('right');
|
64
|
+
images[index].classList.add('left');
|
65
|
+
|
66
|
+
adjust_height(index);
|
67
|
+
|
68
|
+
setTimeout(function () {
|
69
|
+
images[index].classList.add('transition');
|
70
|
+
images[selected_index].classList.add('transition');
|
71
|
+
images[index].classList.remove('left');
|
72
|
+
images[index].classList.add('center');
|
73
|
+
images[selected_index].classList.add('right');
|
74
|
+
images[selected_index].classList.remove('center');
|
75
|
+
},1)
|
76
|
+
},1)
|
77
|
+
|
78
|
+
} else {
|
79
|
+
setTimeout(function () {
|
80
|
+
images[index].classList.remove('left');
|
81
|
+
images[index].classList.add('right');
|
82
|
+
|
83
|
+
adjust_height(index);
|
84
|
+
|
85
|
+
setTimeout(function () {
|
86
|
+
images[index].classList.add('transition');
|
87
|
+
images[selected_index].classList.add('transition');
|
88
|
+
images[index].classList.remove('right');
|
89
|
+
images[index].classList.add('center');
|
90
|
+
images[selected_index].classList.add('left');
|
91
|
+
images[selected_index].classList.remove('center');
|
92
|
+
},1);
|
93
|
+
},1);
|
94
|
+
|
95
|
+
}
|
40
96
|
}
|
41
97
|
|
42
98
|
// show next image
|
@@ -63,26 +119,37 @@
|
|
63
119
|
}
|
64
120
|
}
|
65
121
|
|
122
|
+
// build nav bullets
|
66
123
|
var navHtml = '';
|
67
|
-
|
68
124
|
for (var i=0; i<images.length; ++i) {
|
69
125
|
var image = images[i]
|
70
126
|
image.addEventListener('click', next_image)
|
71
127
|
navHtml += '<i class="' + (i===0? 'selected' : '') + '" data-target="' + image.id + '"></i>'
|
72
128
|
}
|
73
|
-
|
74
129
|
gallery_nav.innerHTML += navHtml;
|
75
130
|
|
131
|
+
// attach nav bullet listeners
|
76
132
|
navs = gallery_nav.querySelectorAll('i');
|
77
|
-
|
78
133
|
for (var i=0; i<navs.length; ++i) {
|
79
134
|
var nav = navs[i];
|
80
135
|
nav.addEventListener('click', nav_to_image)
|
81
136
|
}
|
82
137
|
|
138
|
+
// play button
|
83
139
|
play_checkbox = g.querySelector('.play input[type=checkbox]');
|
84
|
-
|
85
140
|
play_checkbox.addEventListener('change', toggle_play);
|
141
|
+
|
142
|
+
// resize image container when initial image loads
|
143
|
+
if (images[selected_index].complete) {
|
144
|
+
adjust_height(selected_index);
|
145
|
+
} else {
|
146
|
+
images[selected_index].addEventListener('load', function () {
|
147
|
+
adjust_height(selected_index);
|
148
|
+
});
|
149
|
+
images[selected_index].addEventListener('error', function() {
|
150
|
+
console.warn('error loading image', arguments, images[selected_index].src, images[selected_index])
|
151
|
+
});
|
152
|
+
}
|
86
153
|
}
|
87
154
|
|
88
155
|
var galleries = document.getElementsByClassName('gallery');
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-isabelline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rouslan Zenetl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -120,11 +120,8 @@ files:
|
|
120
120
|
- assets/js/gallery.js
|
121
121
|
- assets/js/slides.js
|
122
122
|
- assets/js/snackbar.js
|
123
|
-
- build/Dockerfile
|
124
|
-
- build/Dockerfile-serve
|
125
|
-
- build/docker-entrypoint.sh
|
126
123
|
- index.html
|
127
|
-
homepage: https://
|
124
|
+
homepage: https://git.rzen.dev/rzen/jekyll-theme-isabelline
|
128
125
|
licenses:
|
129
126
|
- MIT
|
130
127
|
metadata:
|
data/build/Dockerfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# borrowed from https://github.com/BretFisher/jekyll-serve
|
2
|
-
|
3
|
-
FROM ruby:2.7-alpine
|
4
|
-
|
5
|
-
RUN apk add --no-cache build-base gcc bash cmake git
|
6
|
-
RUN apk add --no-cache imagemagick
|
7
|
-
|
8
|
-
# install both bundler 1.x and 2.x
|
9
|
-
RUN gem install bundler -v "~>1.0" && gem install bundler jekyll
|
10
|
-
|
11
|
-
EXPOSE 4000
|
12
|
-
|
13
|
-
WORKDIR /site
|
14
|
-
|
15
|
-
ENTRYPOINT [ "jekyll" ]
|
16
|
-
|
17
|
-
CMD [ "--help" ]
|
data/build/Dockerfile-serve
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
FROM docker.rzen.dev/jekyll:latest
|
2
|
-
|
3
|
-
COPY docker-entrypoint.sh /usr/local/bin/
|
4
|
-
|
5
|
-
# on every container start, check if Gemfile exists and warn if it's missing
|
6
|
-
ENTRYPOINT [ "docker-entrypoint.sh" ]
|
7
|
-
|
8
|
-
CMD [ "bundle", "exec", "jekyll", "serve", "--force_polling", "-H", "0.0.0.0", "-P", "4000" ]
|
data/build/docker-entrypoint.sh
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
set -e
|
3
|
-
|
4
|
-
if [ ! -f Gemfile ]; then
|
5
|
-
echo "NOTE: hmm, I don't see a Gemfile so I don't think there's a jekyll site here"
|
6
|
-
echo "Either you didn't mount a volume, or you mounted it incorrectly."
|
7
|
-
echo "Be sure you're in your jekyll site root and use something like this to launch"
|
8
|
-
echo ""
|
9
|
-
echo "docker run -p 80:4000 -v \$(pwd):/site bretfisher/jekyll-serve"
|
10
|
-
echo ""
|
11
|
-
echo "NOTE: To create a new site, you can use the sister image bretfisher/jekyll like:"
|
12
|
-
echo ""
|
13
|
-
echo "docker run -v \$(pwd):/site bretfisher/jekyll new ."
|
14
|
-
exit 1
|
15
|
-
fi
|
16
|
-
|
17
|
-
bundle install --retry 5 --jobs 20
|
18
|
-
|
19
|
-
exec "$@"
|