initial commit

This commit is contained in:
Josh Johnson 2016-02-19 23:35:42 -05:00
commit f92932b947
44 changed files with 851 additions and 0 deletions

27
static/js/weblog.js Normal file
View file

@ -0,0 +1,27 @@
var iweblog = {};
iweblog.application = function() {
// @sumamary: format flickr results for display
function _display_images(data, count) {
var htmlString = "", cnt = 0;
$.each(data.items, function(i,item){
if (cnt == count) return;
var image = item.media.m;
var smallImage = image.replace("_m.jpg", "_s.jpg");
var largeImage = image.replace("_m.jpg", ".jpg");
htmlString += "<a class=\"photo-item\" href=\"" + largeImage + "\">";
htmlString += "<img src=\"" + smallImage + "\" />";
htmlString += "</a>";
cnt++;
});
$('#photos').html(htmlString);
$('#photos').lightGallery();
}
return {
displayImages: function(data, count) { _display_images(data, count); }
}
}();