jekyll-theme-isabelline 0.1.23 → 0.1.27
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/_includes/gallery.html +58 -6
- data/_includes/image.html +1 -2
- data/_includes/post_index.html +2 -2
- data/_sass/_config.scss +2 -1
- data/_sass/_isabelline.scss +34 -4
- data/assets/js/gallery.js +79 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f970b12d01b718712a62d350a4f2e11b98ef80342af746052c95730e40514bd6
|
4
|
+
data.tar.gz: ea919d54dafea08f71509f9cb2803f5f0c03e02252ad893efb6d23cd4cf2b9cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 928e547b5ecb52d3dee916041083a21d74d0ea765c21553f0d6ef0db7599781ab6327149496be2c979336c4412d8b6f661199a3550b71044700daf95338a289b
|
7
|
+
data.tar.gz: c68cedfb5c1107e9b41744eacff7f65253b7ee681611e37840c2436b8dc3d2567600218c40d6e9823ad72ac489a1c8a8ee8dc352b7d84c779a3a6e71a7dd1c78
|
data/_includes/gallery.html
CHANGED
@@ -2,26 +2,78 @@
|
|
2
2
|
|
3
3
|
{% assign gallery_prefix = page.id | prepend: "/assets" | append: "/" | append: gallery_name %}
|
4
4
|
|
5
|
-
{% assign sorted_static_files = site.static_files | map: "path" | sort %}
|
6
5
|
|
7
|
-
{% assign valid_image_extensions = "jpg
|
6
|
+
{% assign valid_image_extensions = ".jpg,.jpeg,.png,.gif" | split: "," %}
|
7
|
+
{% assign valid_image_sizes = "-300,-700" | split: "," %}
|
8
|
+
|
9
|
+
{% assign sorted_static_files = site.static_files | map: "path" | sort | join: "|" | append: gallery_prefix | append: "/dummy-700.jpg" | split: "|" %}
|
10
|
+
|
11
|
+
{% assign img_sizes = "(max-width: 500px) 300px, 700px" %}
|
12
|
+
|
13
|
+
{% assign prev_same_image_path = "-" %}
|
8
14
|
|
9
15
|
<div class="gallery" id="gallery-{{ gallery_name }}">
|
10
16
|
{% assign image_index = 0 %}
|
11
17
|
{% assign gallery_nav = "" %}
|
18
|
+
{% assign image_srcset = "" %}
|
12
19
|
<div class="images">
|
13
20
|
{% for image_path in sorted_static_files %}
|
14
|
-
{% assign image_ext = image_path | split: "." | last %}
|
21
|
+
{% assign image_ext = image_path | split: "." | last | prepend: "." %}
|
15
22
|
{% if valid_image_extensions contains image_ext %}
|
23
|
+
|
16
24
|
{% if image_path contains gallery_prefix %}
|
17
|
-
|
18
|
-
|
25
|
+
|
26
|
+
{% assign same_image_path = "" %}
|
27
|
+
{% assign srcset = "" %}
|
28
|
+
|
29
|
+
{% for dash_size in valid_image_sizes %}
|
30
|
+
{% if image_path contains dash_size %}
|
31
|
+
{% assign same_image_path = image_path | split: dash_size | first %}
|
32
|
+
|
33
|
+
{% assign size = dash_size | remove: "-" %}
|
34
|
+
{% assign srcset = image_path | prepend: site.baseurl | append: " " | append: size | append: "w" %}
|
35
|
+
<!-- <li>srcset1={{ srcset }}</li> -->
|
36
|
+
{% endif %}
|
37
|
+
<!-- <li>srcset2={{ srcset }}</li> -->
|
38
|
+
{% endfor %}
|
39
|
+
|
40
|
+
|
41
|
+
{% if same_image_path == blank %}
|
42
|
+
{% assign src = image_path %}
|
43
|
+
{% endif %}
|
44
|
+
|
45
|
+
{% if srcset != blank %}
|
46
|
+
<!-- <li>srcset3={{ srcset }}</li> -->
|
47
|
+
<!-- <li>prev_same_image_path={{ prev_same_image_path }}</li> -->
|
48
|
+
<!-- <li>same_image_path={{ same_image_path }}</li> -->
|
49
|
+
{% if same_image_path == prev_same_image_path && true %}
|
50
|
+
{% if image_srcset != blank %}
|
51
|
+
{% assign image_srcset = image_srcset | append: "," %}
|
52
|
+
{% endif %}
|
53
|
+
{% assign image_srcset = image_srcset | append: srcset %}
|
54
|
+
{% else %}
|
55
|
+
{% if prev_same_image_path == "-" %}
|
56
|
+
{% assign prev_same_image_path = same_image_path %}
|
57
|
+
{% assign image_srcset = srcset %}
|
58
|
+
{% else %}
|
59
|
+
{% assign image_index = image_index | plus: 1 %}
|
60
|
+
<img id="{{ gallery_name}}-{{ image_index }}" srcset="{{ image_srcset }}" sizes="{{ img_sizes }}" src="{{ site.baseurl }}{{ src }}" />
|
61
|
+
{% assign prev_same_image_path = same_image_path %}
|
62
|
+
{% assign image_srcset = "" %}
|
63
|
+
|
64
|
+
{% endif %}
|
65
|
+
{% endif %}
|
66
|
+
{% endif %}
|
19
67
|
{% endif %}
|
20
68
|
{% endif %}
|
21
69
|
{% endfor %}
|
22
70
|
</div>
|
23
71
|
<nav>
|
24
|
-
|
72
|
+
<!-- <div class="preview">
|
73
|
+
<div class="vg"></div>
|
74
|
+
<div class="hg"></div>
|
75
|
+
</div>
|
76
|
+
--> <div class="play">
|
25
77
|
<input type="checkbox" checked="false" id="{{ gallery_name }}-play" />
|
26
78
|
<label for="{{ gallery_name }}-play"></label>
|
27
79
|
</div>
|
data/_includes/image.html
CHANGED
data/_includes/post_index.html
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
<ul class="index">
|
18
18
|
{% for post in pinned_posts %}
|
19
19
|
<li>
|
20
|
-
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
20
|
+
<a href="{{ post.url | relative_url }}">{{ post.title | markdownify | remove: '<p>' | remove: '</p>' }}</a>
|
21
21
|
<span class="posted">{{ post.date | date: "%b %-d, %Y" }}</span>
|
22
22
|
{% if jekyll.environment == "local" %}
|
23
23
|
{% if post.collection == 'private' %}
|
@@ -47,7 +47,7 @@
|
|
47
47
|
{% endif %}
|
48
48
|
|
49
49
|
<li>
|
50
|
-
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
|
50
|
+
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title | markdownify | remove: '<p>' | remove: '</p>' }}</a>
|
51
51
|
<span class="posted">{{ post.date | date: "%b %-d" }}</span>
|
52
52
|
{% if jekyll.environment == "local" %}
|
53
53
|
{% if post.collection == 'private' %}
|
data/_sass/_config.scss
CHANGED
@@ -44,7 +44,8 @@ $body-serif: "Noto Serif", "Bree Serif",$serif;
|
|
44
44
|
$header-color: darken($body-background-color,90%);
|
45
45
|
$header-link-color: darken($body-background-color,70%);
|
46
46
|
|
47
|
-
$image-caption-serif: "
|
47
|
+
$image-caption-serif: "Noto Serif", "Bree Serif",$serif;
|
48
|
+
// $image-caption-serif: "Fira Sans Extra Condensed", "Neucha", $sans-serif;
|
48
49
|
$image-caption-color: $body-color;
|
49
50
|
|
50
51
|
$main-link-color: darken($body-background-color,80%);
|
data/_sass/_isabelline.scss
CHANGED
@@ -255,6 +255,12 @@ main {
|
|
255
255
|
img.right { left: 100% !important; }
|
256
256
|
img.center { left: 0 !important; }
|
257
257
|
|
258
|
+
img.thumbnail {
|
259
|
+
margin: 10px;
|
260
|
+
float: left;
|
261
|
+
position: static;
|
262
|
+
}
|
263
|
+
|
258
264
|
img {
|
259
265
|
cursor: pointer;
|
260
266
|
border-radius: 6px;
|
@@ -269,7 +275,6 @@ main {
|
|
269
275
|
}
|
270
276
|
}
|
271
277
|
|
272
|
-
|
273
278
|
nav {
|
274
279
|
width: 100%;
|
275
280
|
text-align: center;
|
@@ -280,7 +285,8 @@ main {
|
|
280
285
|
width: 1rem;
|
281
286
|
height: 1rem;
|
282
287
|
border-radius: .5rem;
|
283
|
-
transition:
|
288
|
+
transition: 300ms ease;
|
289
|
+
will-change: background-color;
|
284
290
|
|
285
291
|
background-color: hsl($hue,10,80);
|
286
292
|
&.selected {
|
@@ -317,9 +323,33 @@ main {
|
|
317
323
|
}
|
318
324
|
}
|
319
325
|
}
|
320
|
-
}
|
321
|
-
|
322
326
|
|
327
|
+
.preview {
|
328
|
+
position: relative;
|
329
|
+
cursor: pointer;
|
330
|
+
float: right;
|
331
|
+
margin: .5rem;
|
332
|
+
width: 14px;
|
333
|
+
height: 14px;
|
334
|
+
background-color: hsl($hue,50,40);
|
335
|
+
.vg, .hg {
|
336
|
+
border: 1px solid $body-background-color;
|
337
|
+
position: absolute;
|
338
|
+
}
|
339
|
+
.vg {
|
340
|
+
top: -1px;
|
341
|
+
left:4px;
|
342
|
+
width: 4px;
|
343
|
+
height: 100%;
|
344
|
+
}
|
345
|
+
.hg {
|
346
|
+
left: -1px;
|
347
|
+
top:4px;
|
348
|
+
height: 4px;
|
349
|
+
width: 100%;
|
350
|
+
}
|
351
|
+
}
|
352
|
+
}
|
323
353
|
}
|
324
354
|
|
325
355
|
div.gallery + p {
|
data/assets/js/gallery.js
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
(function () {
|
2
|
+
|
2
3
|
// "hydrate" div.gallery with play/pause and nav behaviors
|
3
4
|
var process_gallery = function (g) {
|
4
5
|
var
|
5
6
|
// milliseconds to wait before switch to next slide
|
6
|
-
NEXT_SLIDE_TIMEOUT =
|
7
|
+
NEXT_SLIDE_TIMEOUT = 5000;
|
7
8
|
|
8
9
|
var
|
10
|
+
// will be resized to the height of currently selected image
|
9
11
|
images_container = g.querySelector('.images'),
|
10
12
|
|
11
13
|
// images in this gallery
|
@@ -14,6 +16,10 @@
|
|
14
16
|
// container for nav buttons
|
15
17
|
gallery_nav = g.querySelector('nav'),
|
16
18
|
|
19
|
+
// show all images
|
20
|
+
// computed below
|
21
|
+
preview_nav,
|
22
|
+
|
17
23
|
// clickable buttons, one per image
|
18
24
|
// computed below
|
19
25
|
navs = [],
|
@@ -26,7 +32,9 @@
|
|
26
32
|
play_checkbox,
|
27
33
|
|
28
34
|
// handle to setInterval
|
29
|
-
play_interval
|
35
|
+
play_interval,
|
36
|
+
|
37
|
+
play_suspended = false;
|
30
38
|
|
31
39
|
/*
|
32
40
|
+--------+--------+--------+
|
@@ -35,28 +43,84 @@
|
|
35
43
|
+--------+--------+--------+
|
36
44
|
*/
|
37
45
|
|
46
|
+
var suspended = function () {
|
47
|
+
return play_suspended || document.hidden || document.msHidden || document.webkitHidden;
|
48
|
+
}
|
49
|
+
|
38
50
|
var adjust_height = function (index) {
|
39
51
|
images_container.style.height = images[index].offsetHeight + 'px';
|
40
52
|
}
|
41
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
|
+
var show_preview = function () {
|
92
|
+
var thumb_size = (images_container.offsetWidth - 6*10) / 3;
|
93
|
+
for (var i=0; i<images.length; ++i) {
|
94
|
+
var image = images[i];
|
95
|
+
if (image.offsetHeight > image.offsetWidth) {
|
96
|
+
console.log('showing tall preview', thumb_size, image.offsetWidth, 'x', image.offsetHeight)
|
97
|
+
image.style.width = thumb_size + 'px';
|
98
|
+
} else {
|
99
|
+
console.log('showing wide preview', thumb_size, image.offsetWidth, 'x', image.offsetHeight)
|
100
|
+
image.style.height = thumb_size + 'px';
|
101
|
+
}
|
102
|
+
image.classList.add('thumbnail');
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
42
106
|
// show image at index
|
43
107
|
// update nav controls accordingly
|
44
108
|
var select_image = function (index) {
|
45
109
|
if (selected_index === index) return;
|
46
110
|
|
47
111
|
var slide = function () {
|
48
|
-
images[selected_index].removeEventListener('transitionend', slide);
|
49
|
-
|
50
112
|
images[selected_index].classList.remove('transition');
|
51
113
|
images[index].classList.remove('transition');
|
52
114
|
|
53
|
-
navs[index].classList.add('selected');
|
54
115
|
navs[selected_index].classList.remove('selected');
|
55
116
|
|
56
117
|
selected_index = index;
|
57
118
|
}
|
58
119
|
|
59
|
-
|
120
|
+
if (suspended()) return;
|
121
|
+
images[selected_index].addEventListener('transitionend', slide, {once: true});
|
122
|
+
|
123
|
+
navs[index].classList.add('selected');
|
60
124
|
|
61
125
|
if (index < selected_index) {
|
62
126
|
setTimeout(function () {
|
@@ -97,6 +161,7 @@
|
|
97
161
|
|
98
162
|
// show next image
|
99
163
|
var next_image = function () {
|
164
|
+
if (suspended()) return;
|
100
165
|
if (selected_index >= images.length-1) {
|
101
166
|
select_image(0);
|
102
167
|
} else {
|
@@ -139,6 +204,14 @@
|
|
139
204
|
play_checkbox = g.querySelector('.play input[type=checkbox]');
|
140
205
|
play_checkbox.addEventListener('change', toggle_play);
|
141
206
|
|
207
|
+
// g.querySelector('.preview').addEventListener('click', function () {
|
208
|
+
// show_preview();
|
209
|
+
// });
|
210
|
+
|
211
|
+
window.addEventListener('resize', function () {
|
212
|
+
adjust_height(selected_index);
|
213
|
+
});
|
214
|
+
|
142
215
|
// resize image container when initial image loads
|
143
216
|
if (images[selected_index].complete) {
|
144
217
|
adjust_height(selected_index);
|
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.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rouslan Zenetl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0'
|
143
143
|
requirements: []
|
144
|
-
rubygems_version: 3.
|
144
|
+
rubygems_version: 3.2.2
|
145
145
|
signing_key:
|
146
146
|
specification_version: 4
|
147
147
|
summary: Simple clean mobile-friendly theme for long form note taking. Works for blogging
|