Display just the latest tumblr photo post instead of all posts

This commit is contained in:
Sahat Yalkabov
2013-12-08 01:02:33 -05:00
parent ced190e0af
commit ba75d67688
2 changed files with 5 additions and 5 deletions

View File

@ -90,7 +90,7 @@ exports.getTumblr = function(req, res) {
res.render('api/tumblr', {
title: 'Tumblr API',
blog: data.blog,
photos: _.flatten(_.pluck(data.posts, 'photos')),
photoset: data.posts[0].photos,
user: req.user
});
});

View File

@ -17,11 +17,11 @@ block content
| API Endpoints
h3.text-primary #{blog.name}'s blog
strong Blog Stats
h4 Blog Stats
p
.btn.btn-xs.btn-primary-outline
i.fa.fa-file-text-o
| #{blog.posts} posts
for photo in photos
img(src='#{photo.alt_sizes.slice(-3)[0].url}')
h4 Latest Photo Post
for photo in photoset
img.item(src='#{photo.original_size.url}')