Mercurial > rsstweet
changeset 64:a20bbd1e2dc1
Now with avatar and proper retweet styling and stuff
author | nanaya <me@myconan.net> |
---|---|
date | Tue, 01 Dec 2015 01:24:34 +0900 |
parents | 9e673e0fc04e |
children | eecb35eac2f3 |
files | app/views/tweets/_tweet.html.erb |
diffstat | 1 files changed, 29 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/app/views/tweets/_tweet.html.erb Tue Dec 01 01:24:08 2015 +0900 +++ b/app/views/tweets/_tweet.html.erb Tue Dec 01 01:24:34 2015 +0900 @@ -1,17 +1,34 @@ -<%= auto_link(tweet.text).html_safe %> +<% if tweet.retweeted_status.present? %> + <p> + <em>Retweeted:</em> + </p> -<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" -%> + <%= render "tweet", :tweet => tweet.retweeted_status %> +<% else%> + <p> + <%= link_to "https://twitter.com/#{tweet.user.screen_name}" do %> + <%= image_tag tweet.user.profile_image_url_https %> + <%= tweet.user.name -%> + <% end %> + + / + + <%= auto_link(tweet.text).html_safe %> + </p> + + <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 %> - <% end %> -</p> + </p> -<% if tweet.quoted_status.present? %> - <blockquote> - <%= render "tweet", :tweet => tweet.quoted_status %> - </blockquote> + <% if tweet.quoted_status.present? %> + <blockquote> + <%= render "tweet", :tweet => tweet.quoted_status %> + </blockquote> + <% end %> <% end %>