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