|
|
|
@ -136,25 +136,25 @@ features:
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// dynamically load sites using Isotope from Ember app |
|
|
|
|
$.getJSON('http://api.emberapp.com/users/view/' + |
|
|
|
|
'desandro/collections/view/isotope.json?callback=?') |
|
|
|
|
$.getJSON('http://zootool.com/api/users/items/?username=desandro' + |
|
|
|
|
'&apikey=8b604e5d4841c2cd976241dd90d319d7' + |
|
|
|
|
'&tag=bestofisotope&callback=?') |
|
|
|
|
.error( ajaxError ) |
|
|
|
|
.success(function( data ){ |
|
|
|
|
|
|
|
|
|
// proceed only if we have images |
|
|
|
|
if ( !data.response || !data.response.images ) { |
|
|
|
|
|
|
|
|
|
// proceed only if we have items |
|
|
|
|
if ( !data || !data.length ) { |
|
|
|
|
ajaxError(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var images = data.response.images, |
|
|
|
|
items = [], |
|
|
|
|
var items = [], |
|
|
|
|
item, image; |
|
|
|
|
|
|
|
|
|
for ( var i=0, len = images.length; i < len; i++ ) { |
|
|
|
|
image = images[i]; |
|
|
|
|
item = '<li><a href="' + image.url + '">' |
|
|
|
|
+ '<img src="' + image.file.src.replace('/m.', '/s.') + '" />' |
|
|
|
|
+ '<b>' + image.name + '</b>' |
|
|
|
|
|
|
|
|
|
for ( var i=0, len = data.length; i < len; i++ ) { |
|
|
|
|
datum = data[i]; |
|
|
|
|
item = '<li><a href="' + datum.url + '">' |
|
|
|
|
+ '<img src="' + datum.image.replace('/l.', '/m.') + '" />' |
|
|
|
|
+ '<b>' + datum.title + '</b>' |
|
|
|
|
+ '</a></li>'; |
|
|
|
|
items.push( item ); |
|
|
|
|
} |
|
|
|
|