jekyll-google-photos 1.3 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +17 -15
- data/_posts/2018-02-22-welcome-to-jekyll.markdown +3 -0
- data/lib/jekyll-google-photos/tag.rb +18 -271
- data/lib/jekyll-google-photos/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0371042a91560d6dbe2c61d29e868ded3bd9e6a4
|
4
|
+
data.tar.gz: 19f8d37ccdcb3b4ce88758aad37fa182e4587cfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d14b8ebfd7b27b2a3e9c76ccdedd84f8c6da49742528a400c15ecc39f36049ba832fe2cc44265ebfd2f75f6ddab40db5c909586718d65c06f01f5359e55cb863
|
7
|
+
data.tar.gz: 99eede27c5698934c43edcdab26c630d5af019e082e7e9b5a3c71a9af133efb20cc4af14d8594bc6056bb2fdb4b98874cf59832e202f1a5d3c00cba6e6a6e83c
|
data/Gemfile.lock
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
addressable (2.
|
5
|
-
public_suffix (>= 2.0.2, <
|
4
|
+
addressable (2.6.0)
|
5
|
+
public_suffix (>= 2.0.2, < 4.0)
|
6
6
|
colorator (1.1.0)
|
7
|
-
concurrent-ruby (1.1.
|
7
|
+
concurrent-ruby (1.1.5)
|
8
8
|
em-websocket (0.5.1)
|
9
9
|
eventmachine (>= 0.12.9)
|
10
10
|
http_parser.rb (~> 0.6.0)
|
11
11
|
eventmachine (1.2.7)
|
12
|
-
ffi (1.
|
12
|
+
ffi (1.11.1)
|
13
13
|
forwardable-extended (2.6.0)
|
14
14
|
http_parser.rb (0.6.0)
|
15
15
|
i18n (0.9.5)
|
@@ -27,7 +27,7 @@ GEM
|
|
27
27
|
pathutil (~> 0.9)
|
28
28
|
rouge (>= 1.7, < 4)
|
29
29
|
safe_yaml (~> 1.0)
|
30
|
-
jekyll-feed (0.
|
30
|
+
jekyll-feed (0.12.1)
|
31
31
|
jekyll (>= 3.7, < 5.0)
|
32
32
|
jekyll-sass-converter (1.5.2)
|
33
33
|
sass (~> 3.4)
|
@@ -37,24 +37,26 @@ GEM
|
|
37
37
|
listen (~> 3.0)
|
38
38
|
kramdown (1.17.0)
|
39
39
|
liquid (4.0.3)
|
40
|
-
listen (3.
|
41
|
-
rb-fsevent (~> 0.
|
42
|
-
rb-inotify (~> 0.9, >= 0.9.
|
40
|
+
listen (3.1.5)
|
41
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
42
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
43
|
+
ruby_dep (~> 1.2)
|
43
44
|
mercenary (0.3.6)
|
44
45
|
mini_portile2 (2.4.0)
|
45
|
-
minima (2.5.
|
46
|
-
jekyll (
|
46
|
+
minima (2.5.0)
|
47
|
+
jekyll (~> 3.5)
|
47
48
|
jekyll-feed (~> 0.9)
|
48
49
|
jekyll-seo-tag (~> 2.1)
|
49
|
-
nokogiri (1.10.
|
50
|
+
nokogiri (1.10.8)
|
50
51
|
mini_portile2 (~> 2.4.0)
|
51
52
|
pathutil (0.16.2)
|
52
53
|
forwardable-extended (~> 2.6)
|
53
|
-
public_suffix (
|
54
|
+
public_suffix (3.1.0)
|
54
55
|
rb-fsevent (0.10.3)
|
55
|
-
rb-inotify (0.10.
|
56
|
+
rb-inotify (0.10.0)
|
56
57
|
ffi (~> 1.0)
|
57
|
-
rouge (3.
|
58
|
+
rouge (3.3.0)
|
59
|
+
ruby_dep (1.5.0)
|
58
60
|
safe_yaml (1.0.5)
|
59
61
|
sass (3.7.4)
|
60
62
|
sass-listen (~> 4.0.0)
|
@@ -73,4 +75,4 @@ DEPENDENCIES
|
|
73
75
|
tzinfo-data
|
74
76
|
|
75
77
|
BUNDLED WITH
|
76
|
-
2.0.
|
78
|
+
2.0.1
|
@@ -3,6 +3,9 @@ layout: post
|
|
3
3
|
title: "Welcome to Jekyll!"
|
4
4
|
date: 2018-02-22 18:29:32 +0000
|
5
5
|
categories: jekyll update
|
6
|
+
gallery_urls:
|
7
|
+
- https://photos.app.goo.gl/bhWukds8QVodFU246
|
8
|
+
- https://photos.app.goo.gl/bhWukds8QVodFU246
|
6
9
|
---
|
7
10
|
|
8
11
|
{% google_photos https://photos.app.goo.gl/bhWukds8QVodFU246 800 %}
|
@@ -2,13 +2,14 @@ require "jekyll"
|
|
2
2
|
require 'open-uri'
|
3
3
|
require 'nokogiri'
|
4
4
|
require 'net/http'
|
5
|
+
require_relative 'css'
|
5
6
|
|
6
7
|
module JekyllGooglePhotos
|
7
8
|
class Tag < Liquid::Tag
|
8
9
|
def initialize(tagName, args, tokens)
|
9
10
|
super
|
10
11
|
args = args.split(" ")
|
11
|
-
@
|
12
|
+
@albumUrls = args[0]
|
12
13
|
@maxWidth = args[1]
|
13
14
|
end
|
14
15
|
|
@@ -27,278 +28,14 @@ module JekyllGooglePhotos
|
|
27
28
|
end
|
28
29
|
|
29
30
|
def flexbinCSS()
|
30
|
-
elem =
|
31
|
-
.flexbin {
|
32
|
-
display: flex;
|
33
|
-
overflow: hidden;
|
34
|
-
flex-wrap: wrap;
|
35
|
-
margin: -2.5px;
|
36
|
-
}
|
37
|
-
.flexbin:after {
|
38
|
-
content: "";
|
39
|
-
flex-grow: 999999999;
|
40
|
-
min-width: 300px;
|
41
|
-
height: 0;
|
42
|
-
}
|
43
|
-
.flexbin > * {
|
44
|
-
position: relative;
|
45
|
-
display: block;
|
46
|
-
height: 300px;
|
47
|
-
margin: 2.5px;
|
48
|
-
flex-grow: 1;
|
49
|
-
}
|
50
|
-
.flexbin > * > img {
|
51
|
-
height: 300px;
|
52
|
-
object-fit: cover;
|
53
|
-
max-width: 100%;
|
54
|
-
min-width: 100%;
|
55
|
-
vertical-align: bottom;
|
56
|
-
}
|
57
|
-
.flexbin.flexbin-margin {
|
58
|
-
margin: 2.5px;
|
59
|
-
}
|
60
|
-
@media (max-width: 300px) {
|
61
|
-
.flexbin {
|
62
|
-
display: flex;
|
63
|
-
overflow: hidden;
|
64
|
-
flex-wrap: wrap;
|
65
|
-
margin: -2.5px;
|
66
|
-
}
|
67
|
-
.flexbin:after {
|
68
|
-
content: "";
|
69
|
-
flex-grow: 999999999;
|
70
|
-
min-width: 75px;
|
71
|
-
height: 0;
|
72
|
-
}
|
73
|
-
.flexbin > * {
|
74
|
-
position: relative;
|
75
|
-
display: block;
|
76
|
-
height: 75px;
|
77
|
-
margin: 2.5px;
|
78
|
-
flex-grow: 1;
|
79
|
-
}
|
80
|
-
.flexbin > * > img {
|
81
|
-
height: 75px;
|
82
|
-
object-fit: cover;
|
83
|
-
max-width: 100%;
|
84
|
-
min-width: 100%;
|
85
|
-
vertical-align: bottom;
|
86
|
-
}
|
87
|
-
.flexbin.flexbin-margin {
|
88
|
-
margin: 2.5px;
|
89
|
-
}
|
90
|
-
}
|
91
|
-
@media (min-width: 300px) and (max-width: 450px) {
|
92
|
-
.flexbin {
|
93
|
-
display: flex;
|
94
|
-
overflow: hidden;
|
95
|
-
flex-wrap: wrap;
|
96
|
-
margin: -2.5px;
|
97
|
-
}
|
98
|
-
.flexbin:after {
|
99
|
-
content: "";
|
100
|
-
flex-grow: 999999999;
|
101
|
-
min-width: 112px;
|
102
|
-
height: 0;
|
103
|
-
}
|
104
|
-
.flexbin > * {
|
105
|
-
position: relative;
|
106
|
-
display: block;
|
107
|
-
height: 112px;
|
108
|
-
margin: 2.5px;
|
109
|
-
flex-grow: 1;
|
110
|
-
}
|
111
|
-
.flexbin > * > img {
|
112
|
-
height: 112px;
|
113
|
-
object-fit: cover;
|
114
|
-
max-width: 100%;
|
115
|
-
min-width: 100%;
|
116
|
-
vertical-align: bottom;
|
117
|
-
}
|
118
|
-
.flexbin.flexbin-margin {
|
119
|
-
margin: 2.5px;
|
120
|
-
}
|
121
|
-
}
|
122
|
-
@media (min-width: 450px) and (max-width: 600px) {
|
123
|
-
.flexbin {
|
124
|
-
display: flex;
|
125
|
-
overflow: hidden;
|
126
|
-
flex-wrap: wrap;
|
127
|
-
margin: -2.5px;
|
128
|
-
}
|
129
|
-
.flexbin:after {
|
130
|
-
content: "";
|
131
|
-
flex-grow: 999999999;
|
132
|
-
min-width: 150px;
|
133
|
-
height: 0;
|
134
|
-
}
|
135
|
-
.flexbin > * {
|
136
|
-
position: relative;
|
137
|
-
display: block;
|
138
|
-
height: 150px;
|
139
|
-
margin: 2.5px;
|
140
|
-
flex-grow: 1;
|
141
|
-
}
|
142
|
-
.flexbin > * > img {
|
143
|
-
height: 150px;
|
144
|
-
object-fit: cover;
|
145
|
-
max-width: 100%;
|
146
|
-
min-width: 100%;
|
147
|
-
vertical-align: bottom;
|
148
|
-
}
|
149
|
-
.flexbin.flexbin-margin {
|
150
|
-
margin: 2.5px;
|
151
|
-
}
|
152
|
-
}
|
153
|
-
@media (min-width: 600px) and (max-width: 750px) {
|
154
|
-
.flexbin {
|
155
|
-
display: flex;
|
156
|
-
overflow: hidden;
|
157
|
-
flex-wrap: wrap;
|
158
|
-
margin: -2.5px;
|
159
|
-
}
|
160
|
-
.flexbin:after {
|
161
|
-
content: "";
|
162
|
-
flex-grow: 999999999;
|
163
|
-
min-width: 175px;
|
164
|
-
height: 0;
|
165
|
-
}
|
166
|
-
.flexbin > * {
|
167
|
-
position: relative;
|
168
|
-
display: block;
|
169
|
-
height: 175px;
|
170
|
-
margin: 2.5px;
|
171
|
-
flex-grow: 1;
|
172
|
-
}
|
173
|
-
.flexbin > * > img {
|
174
|
-
height: 175px;
|
175
|
-
object-fit: cover;
|
176
|
-
max-width: 100%;
|
177
|
-
min-width: 100%;
|
178
|
-
vertical-align: bottom;
|
179
|
-
}
|
180
|
-
.flexbin.flexbin-margin {
|
181
|
-
margin: 2.5px;
|
182
|
-
}
|
183
|
-
}
|
184
|
-
@media (min-width: 750px) and (max-width: 900px) {
|
185
|
-
.flexbin {
|
186
|
-
display: flex;
|
187
|
-
overflow: hidden;
|
188
|
-
flex-wrap: wrap;
|
189
|
-
margin: -2.5px;
|
190
|
-
}
|
191
|
-
.flexbin:after {
|
192
|
-
content: "";
|
193
|
-
flex-grow: 999999999;
|
194
|
-
min-width: 175px;
|
195
|
-
height: 0;
|
196
|
-
}
|
197
|
-
.flexbin > * {
|
198
|
-
position: relative;
|
199
|
-
display: block;
|
200
|
-
height: 175px;
|
201
|
-
margin: 2.5px;
|
202
|
-
flex-grow: 1;
|
203
|
-
}
|
204
|
-
.flexbin > * > img {
|
205
|
-
height: 175px;
|
206
|
-
object-fit: cover;
|
207
|
-
max-width: 100%;
|
208
|
-
min-width: 100%;
|
209
|
-
vertical-align: bottom;
|
210
|
-
}
|
211
|
-
.flexbin.flexbin-margin {
|
212
|
-
margin: 2.5px;
|
213
|
-
}
|
214
|
-
}
|
215
|
-
@media (min-width: 900px) and (max-width: 1050px) {
|
216
|
-
.flexbin {
|
217
|
-
display: flex;
|
218
|
-
overflow: hidden;
|
219
|
-
flex-wrap: wrap;
|
220
|
-
margin: -2.5px;
|
221
|
-
}
|
222
|
-
.flexbin:after {
|
223
|
-
content: "";
|
224
|
-
flex-grow: 999999999;
|
225
|
-
min-width: 175px;
|
226
|
-
height: 0;
|
227
|
-
}
|
228
|
-
.flexbin > * {
|
229
|
-
position: relative;
|
230
|
-
display: block;
|
231
|
-
height: 175px;
|
232
|
-
margin: 2.5px;
|
233
|
-
flex-grow: 1;
|
234
|
-
}
|
235
|
-
.flexbin > * > img {
|
236
|
-
height: 175px;
|
237
|
-
object-fit: cover;
|
238
|
-
max-width: 100%;
|
239
|
-
min-width: 100%;
|
240
|
-
vertical-align: bottom;
|
241
|
-
}
|
242
|
-
.flexbin.flexbin-margin {
|
243
|
-
margin: 2.5px;
|
244
|
-
}
|
245
|
-
}
|
246
|
-
@media (min-width: 1050px) {
|
247
|
-
.flexbin {
|
248
|
-
display: flex;
|
249
|
-
overflow: hidden;
|
250
|
-
flex-wrap: wrap;
|
251
|
-
margin: -2.5px;
|
252
|
-
}
|
253
|
-
.flexbin:after {
|
254
|
-
content: "";
|
255
|
-
flex-grow: 999999999;
|
256
|
-
min-width: 180px;
|
257
|
-
height: 0;
|
258
|
-
}
|
259
|
-
.flexbin > * {
|
260
|
-
position: relative;
|
261
|
-
display: block;
|
262
|
-
height: 180px;
|
263
|
-
margin: 2.5px;
|
264
|
-
flex-grow: 1;
|
265
|
-
}
|
266
|
-
.flexbin > * > img {
|
267
|
-
height: 180px;
|
268
|
-
object-fit: cover;
|
269
|
-
max-width: 100%;
|
270
|
-
min-width: 100%;
|
271
|
-
vertical-align: bottom;
|
272
|
-
}
|
273
|
-
.flexbin.flexbin-margin {
|
274
|
-
margin: 2.5px;
|
275
|
-
}
|
276
|
-
}
|
277
|
-
.stage{
|
278
|
-
position:absolute;
|
279
|
-
width:100%;
|
280
|
-
height:100%;
|
281
|
-
background-color: black;
|
282
|
-
top:0;
|
283
|
-
left:0;
|
284
|
-
}
|
285
|
-
.stage img {
|
286
|
-
position:absolute;
|
287
|
-
left:0; right:0;
|
288
|
-
top:0; bottom:0;
|
289
|
-
margin:auto;
|
290
|
-
max-width:100%;
|
291
|
-
max-height:100%;
|
292
|
-
overflow:auto;
|
293
|
-
}
|
294
|
-
}
|
31
|
+
elem = JekyllGooglePhotos::FlexbinCSS()
|
295
32
|
return elem
|
296
33
|
end
|
297
34
|
|
298
35
|
def URLsInJSON()
|
299
36
|
sp = "googlePhotos.urls = ["
|
300
37
|
for x in @imgLinks
|
301
|
-
sp += "\"#{x
|
38
|
+
sp += "\"#{x}\","
|
302
39
|
end
|
303
40
|
sp += "];"
|
304
41
|
return sp
|
@@ -322,7 +59,7 @@ module JekyllGooglePhotos
|
|
322
59
|
sp = %Q{<div class="flexbin">}
|
323
60
|
idx = 0
|
324
61
|
for x in @imgLinks
|
325
|
-
link = x
|
62
|
+
link = x + "=w#{@maxWidth}"
|
326
63
|
sp += %Q{
|
327
64
|
<div onclick="showSlides(#{idx});" class="slideImgs">
|
328
65
|
<img src="#{link}" />
|
@@ -335,10 +72,20 @@ module JekyllGooglePhotos
|
|
335
72
|
end
|
336
73
|
|
337
74
|
def render(context)
|
338
|
-
|
339
|
-
|
75
|
+
@imgLinks = []
|
76
|
+
if @albumUrls[/https?:\/\/[\S]+/]
|
77
|
+
albumUrls = [].push(@albumUrls)
|
340
78
|
else
|
341
|
-
|
79
|
+
albumUrls = context[@albumUrls.strip]
|
80
|
+
if not albumUrls.instance_of? Array
|
81
|
+
albumUrls = [].push(context[@albumUrls.strip])
|
82
|
+
end
|
83
|
+
end
|
84
|
+
for albumUrl in albumUrls
|
85
|
+
imageLinks = getImageLinks(albumUrl)
|
86
|
+
for link in imageLinks
|
87
|
+
@imgLinks.push(link[1][0])
|
88
|
+
end
|
342
89
|
end
|
343
90
|
createDOM()
|
344
91
|
end
|