diff --git a/layouts/home.html b/layouts/home.html
index 7039396..81dd00f 100644
--- a/layouts/home.html
+++ b/layouts/home.html
@@ -9,8 +9,10 @@
-
+
+
+
@@ -46,11 +48,7 @@
- <% (1..20).each do |i| %>
- - ">
-
-
- <% end %>
+
<%= render '_footer' %>
diff --git a/output/js/home.js b/output/js/home.js
index 33b48c2..6d4870e 100644
--- a/output/js/home.js
+++ b/output/js/home.js
@@ -1,22 +1,26 @@
jQuery(function () {
+ function render_image(o) {
+ return '\n\
+ \n\
+ ';
+ };
+
function populate_flickr(data, text_status) {
var ul = $("ul", "#flickr");
// ul.empty();
- jQuery.each(data.photos.photo, function(i, photo) {
- var li = $("");
- var a = $("");
- a.attr("href", photo.url_m);
- a.attr("rel", "prettyPhoto[flickr]");
- var img = $("");
- img.attr('src', photo.url_sq);
- img.attr('alt', photo.title);
- a.append(img)
- li.append(a);
+ jQuery.each($('photo', data), function(i, obj) {
+ var photo = $(obj);
+ var image = {
+ href: photo.attr('url_m'),
+ rel: "prettyPhoto[flickr]",
+ };
+ var li = $(render_image(image));
+ $('a', li).css({backgroundPosition: (i + 1) * -75 + "px -75px"});
ul.append(li);
});
$("a[rel^='prettyPhoto']").prettyPhoto({theme: "facebook"});
};
// Populate Flickr
- //jQuery.getJSON("http://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key=aa003631cc50bd47f27f242d30bcd22f&user_id=40215689%40N00&format=json&per_page=20&extras=url_sq,url_m&jsoncallback=?", populate_flickr);
+ jQuery.get("/photos.xml", {dataType: 'xml'}, populate_flickr);
});
diff --git a/templates/image.html b/templates/image.html
new file mode 100644
index 0000000..bc0040d
--- /dev/null
+++ b/templates/image.html
@@ -0,0 +1,3 @@
+
+
+