Mercurial > rsstweet
diff app/views/tweets/_tweet.html.erb @ 62:9ab79a764434
Sweet tweet media viewer (image only for now)
author | nanaya <me@myconan.net> |
---|---|
date | Tue, 01 Dec 2015 01:08:37 +0900 |
parents | |
children | a20bbd1e2dc1 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/views/tweets/_tweet.html.erb Tue Dec 01 01:08:37 2015 +0900 @@ -0,0 +1,17 @@ +<%= auto_link(tweet.text).html_safe %> + +<p> + <% tweet.media.each do |media| %> + <% if media.is_a? Twitter::Media::Photo %> + <%= link_to "#{media.media_url_https}:orig" do %> + <%= image_tag "#{media.media_url_https}:small" -%> + <% end %> + <% end %> + <% end %> +</p> + +<% if tweet.quoted_status.present? %> + <blockquote> + <%= render "tweet", :tweet => tweet.quoted_status %> + </blockquote> +<% end %>