Skip to content

Instantly share code, notes, and snippets.

@nanchu
Created August 31, 2012 09:18
Show Gist options
  • Save nanchu/3550672 to your computer and use it in GitHub Desktop.
Save nanchu/3550672 to your computer and use it in GitHub Desktop.
Tumblr Feed Blog View in Haml/Ruby
.blogContent
- @posts.each do |post|
- if post['photo_url']
- fotourl = post['photo_url'].first['__content__']
= fotourl
%div{:class=> "type", :id=> post['type']}
%div{:id=> 'url'}
= raw post['url']
%div{:id=> 'date'}
= raw post['date']
%div{:id=> 'photo_caption'}
= raw post['photo_caption']
- if fotourl
%div{:id=> 'photo_url'}
%img{:src => fotourl}
%div{:id=> 'regular_title'}
= raw post['regular_title']
%div{:id=> 'regular_body'}
= raw post['regular_body']
%div{:id=> 'tag'}
= raw post['tag']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment