Team:Cambridge/Photos
From 2010.igem.org
(Difference between revisions)
Line 16: | Line 16: | ||
//this loop runs through every item and creates HTML | //this loop runs through every item and creates HTML | ||
for (var i=0; i < rsp.photos.photo.length; i++) { | for (var i=0; i < rsp.photos.photo.length; i++) { | ||
+ | //for (var i=0; i < 10; i++) { | ||
photo = rsp.photos.photo[ i ]; | photo = rsp.photos.photo[ i ]; | ||
Line 23: | Line 24: | ||
".static.flickr.com/" + photo.server + "/" + | ".static.flickr.com/" + photo.server + "/" + | ||
photo.id + "_" + photo.secret + "_" + "t.jpg"; | photo.id + "_" + photo.secret + "_" + "t.jpg"; | ||
+ | |||
+ | b_url = "http://farm" + photo.farm + | ||
+ | ".static.flickr.com/" + photo.server + "/" + | ||
+ | photo.id + "_" + photo.secret + "_" + "z.jpg"; | ||
p_url = "http://www.flickr.com/photos/" + | p_url = "http://www.flickr.com/photos/" + | ||
photo.owner + "/" + photo.id; | photo.owner + "/" + photo.id; | ||
- | s += '<a href="' + | + | s += '<a class="lightbox" href="' + b_url + '">' + '<img alt="'+ |
photo.title + '"src="' + t_url + '"/>' + '</a>'; | photo.title + '"src="' + t_url + '"/>' + '</a>'; | ||
} | } | ||
Line 36: | Line 41: | ||
} | } | ||
</script> | </script> | ||
- | <script type="text/javascript" language="javascript" src="http://api.flickr.com/services/rest/?format=json&method=flickr.photos.search& | + | <script type="text/javascript" language="javascript" src="http://api.flickr.com/services/rest/?format=json&method=flickr.photos.search&user_id=52129837@N08&api_key=52566611a5be16fbbbe57f3dbe4f1fef&count=5"></script> |
</html> | </html> | ||
{{:Team:Cambridge/Templates/footerMinimal}} | {{:Team:Cambridge/Templates/footerMinimal}} |
Revision as of 00:02, 18 August 2010
Photo Gallery