This repository was archived by the owner on Aug 22, 2024. It is now read-only.
File tree 5 files changed +68
-32
lines changed
5 files changed +68
-32
lines changed Original file line number Diff line number Diff line change 4
4
5
5
@import ' skeleton.less' ;
6
6
7
+ @mobile-width : 550px ;
8
+
7
9
8
10
// Main Site CSS
9
11
78
80
}
79
81
80
82
// Restrict site width larger than mobile
81
- @media (min-width : 550 px ) {
83
+ @media (min-width : @mobile-width ) {
82
84
.main-header ,
83
85
.main-footer ,
84
86
.main-content-feed ,
103
105
.margin-lr ;
104
106
}
105
107
106
- @media (min-width : 550 px ) {
108
+ @media (min-width : @mobile-width ) {
107
109
.main-header-title ,
108
110
.main-header-description ,
109
111
.main-header-nav ,
141
143
.navigation-item ;
142
144
}
143
145
144
- @media (min-width : 550 px ) {
146
+ @media (min-width : @mobile-width ) {
145
147
.main-header-image {
146
148
height : 16rem ;
147
149
}
215
217
}
216
218
}
217
219
220
+ .page-title ,
221
+ .page-subtitle {
222
+ display : inline ;
223
+ }
224
+
225
+ .page-title {
226
+
227
+ }
228
+
229
+ .page-subtitle {
230
+ font-size : 80% ;
231
+ color : #666 ;
232
+ }
233
+
218
234
// Main footer
219
235
.main-footer {
220
236
.u-text-center ;
242
258
transition : opacity .2s ease ;
243
259
}
244
260
245
- @media (min-width : 550 px ) {
261
+ @media (min-width : @mobile-width ) {
246
262
#checkin_map {
247
263
height : 60rem ;
248
264
margin-top : 4rem ;
256
272
margin-left : -2rem ;
257
273
margin-right : -2rem ;
258
274
transition : opacity .2s ease ;
259
-
260
- display : flex ;
261
- flex-wrap : wrap ;
262
- justify-content : space-between ;
263
275
}
264
276
265
277
.instagram-post {
266
- width : calc (50% - 4rem );
267
- margin-right : 2rem ;
268
- margin-bottom : 2rem ;
269
- border-radius : .3rem ;
278
+
270
279
}
271
280
272
281
.instagram-link {
273
282
display : inline-block ;
274
- height : 100% ;
275
283
}
276
284
277
285
.instagram-image {
278
-
286
+ width : 100 vw ;
279
287
}
280
288
281
289
.instagram-caption {
289
297
290
298
}
291
299
292
-
293
- @media (min-width : 550px ) {
300
+ @media (min-width : @mobile-width ) {
294
301
#instagram_images {
295
- margin-top : 4rem ;
302
+ display : flex ;
303
+ flex-wrap : wrap ;
304
+ justify-content : space-between ;
305
+ }
306
+
307
+ .instagram-post {
308
+ width : calc (50% - 4rem );
309
+ margin-right : 2rem ;
310
+ margin-bottom : 2rem ;
296
311
}
297
312
}
Original file line number Diff line number Diff line change 105
105
var images_div = document . getElementById ( 'instagram_images' )
106
106
107
107
for ( var imageId in results ) {
108
- var imageItem = results [ imageId ]
109
- caption = imageItem . caption . replace ( / \S * # ( \S + ) / gi, '<a href="https://instagram.com/explore/tags/$1" class="instagram-tag">#$1</a>' )
110
-
111
- images_div . innerHTML += ' \
112
- <div class="instagram-post"> \
113
- <a href="' + imageItem . url + '" class="instagram-link"> \
114
- <img src="' + imageItem . image + '" class="instagram-image" /> \
115
- </a> \
116
- <div class="instagram-caption"> \
117
- ' + caption + ' \
118
- </div> \
119
- </div>'
108
+ var data = results [ imageId ]
109
+ caption = data . caption . replace ( / \S * # ( \S + ) / gi, '<a href="https://instagram.com/explore/tags/$1" class="instagram-tag">#$1</a>' )
110
+
111
+ if ( data . type === 'image' ) {
112
+ images_div . innerHTML += ' \
113
+ <div class="instagram-post"> \
114
+ <a href="' + data . url + '" class="instagram-link"> \
115
+ <img src="' + data . image + '" class="instagram-image" /> \
116
+ </a> \
117
+ <div class="instagram-caption"> \
118
+ ' + caption + ' \
119
+ </div> \
120
+ </div>'
121
+ }
122
+ // TODO: UNTESTED!
123
+ // else if (data.type === 'video') {
124
+ // images_div.innerHTML += ' \
125
+ // <div class="instagram-post"> \
126
+ // <video width="480" height="480" controls> \
127
+ // <source src="' + data.video + '" type="video/mp4"/> \
128
+ // </video> \
129
+ // <div class="instagram-caption"> \
130
+ // ' + caption + ' \
131
+ // </div> \
132
+ // </div>'
133
+ // }
120
134
}
121
135
122
136
images_div . style . opacity = '1.0'
Original file line number Diff line number Diff line change 3
3
---
4
4
5
5
< article class ="main-content-page ">
6
- < h2 >
6
+ < h2 class =" page-title " >
7
7
{{ page.title }}
8
8
</ h2 >
9
9
Original file line number Diff line number Diff line change 5
5
include_in_nav: false
6
6
---
7
7
8
+ < h5 class ="page-subtitle ">
9
+ Powered by < a href ="https://instagram.com/_vigti/ "> Instagram</ a >
10
+ </ h5 >
8
11
9
12
< div id ="instagram_images " style ="opacity:0; "> </ div >
Original file line number Diff line number Diff line change @@ -42,17 +42,21 @@ const buildJSON = (buildPath, callback) => {
42
42
for ( let item of response . data ) {
43
43
if ( item . type === 'image' ) {
44
44
imageItems [ item . id ] = {
45
+ type : item . type ,
45
46
url : item . link ,
46
47
image : item . images . standard_resolution . url ,
48
+ height : item . images . standard_resolution . height ,
49
+ width : item . images . standard_resolution . width ,
47
50
caption : item . caption . text ,
48
51
tags : item . tags ,
49
52
likes : item . likes . count ,
50
53
}
51
54
}
52
- else if ( item . type === 'image ' ) {
55
+ else if ( item . type === 'video ' ) {
53
56
imageItems [ item . id ] = {
57
+ type : item . type ,
54
58
url : item . link ,
55
- image : item . videos . standard_resolution . url ,
59
+ video : item . videos . standard_resolution . url ,
56
60
caption : item . caption . text ,
57
61
tags : item . tags ,
58
62
likes : item . likes . count ,
You can’t perform that action at this time.
0 commit comments