-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
57 lines (56 loc) · 1.76 KB
/
index.html
File metadata and controls
57 lines (56 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="icons.css">
<link rel="stylesheet" href="lightbox.css">
<style>
/* Flickr Thumbnails */
#flickr__thumbnails {
line-height: 0;
}
#flickr__thumbnails img {
width: 14.28571428571429%;
opacity: 1;
-webkit-transition: opacity .5s ease;
-moz-transition: opacity .5s ease;
-ms-transition: opacity .5s ease;
transition: opacity .5s ease;
}
#flickr__thumbnails img:hover {
cursor: pointer;
opacity: .5;
}
</style>
</head>
<body>
<div id="flickr__thumbnails"></div>
<script src="lightbox.js"></script>
<script>
window.jsonFlickrApi = function(responseObj){
// Create a new Lightbox passing the encessary options.
new Lightbox({
// `imageCache` should an array containing all photos.
// imageCache: [responseObj.photoset.photo[0]], // single image
imageCache: responseObj.photoset.photo, // multiple images
// `thumbnails` is the id of the thumbnails container.
thumbnails: 'flickr__thumbnails',
// `imageUrl` is a function that returns the url for the requested image.
imageUrl: function(photoObj, sizeStr) {
// photo object: farm, id, isfamily, isfriend, isprimary, ispublic, secret, server, title
// photo url: https://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}_[mstzb].jpg
return [
'https://farm', photoObj.farm,
'.staticflickr.com/', photoObj.server,
'/', photoObj.id,
'_', photoObj.secret,
'_', sizeStr === 'thumbnail' ? 'm' : 'b',
'.jpg'
].join('');
}
});
}
</script>
<script src="https://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key=05d27604f0908b118bf98f67c6965020&photoset_id=72157626579923453&format=json"></script>
</body>
</html>