JSFiddle - React, Tailwind, and code Playground
by Chase Wilson
HTML
<script src="http://api.flickr.com/services/feeds/photos_public.gne?format=json&tags=oakley"></script>
<!-- See: https://gist.github.com/954929 -->
<script src="http://gist.github.com/raw/954929/viewport.js"></script>
<script src="http://gist.github.com/raw/954929/thumbnails.js"></script>
JavaScript
// images:
// {
// 'thumb':'http://path/to/thumbnail.jpg',
// 'medium': 'http://path/to/medium/image.jpg'
// }
// Build a simple image gallery
var images = [];
function jsonFlickrFeed(feed){
var count = feed.items.length;
while(count--){
var leImage = feed.items[count].media.m;
images.push({
"thumb":leImage.replace(/_m.jpg/,'_s.jpg'),
"medium":leImage.replace(/_m.jpg/,'.jpg')
});
}
}