Mercurial > rsstweet
comparison app/views/tweets/_tweet.html.erb @ 154:3943833e973c
Now with video support wooow
author | nanaya <me@nanaya.pro> |
---|---|
date | Sat, 28 Jul 2018 02:01:00 +0900 |
parents | 950849c40d42 |
children | 522d832d8a8c |
comparison
equal
deleted
inserted
replaced
153:cd76c83d6d24 | 154:3943833e973c |
---|---|
34 <% tweet.media.each_with_index do |media, i| %> | 34 <% tweet.media.each_with_index do |media, i| %> |
35 <% if media.is_a? Twitter::Media::Photo %> | 35 <% if media.is_a? Twitter::Media::Photo %> |
36 <%= link_to "#{media.media_url_https}:orig" do %> | 36 <%= link_to "#{media.media_url_https}:orig" do %> |
37 <%= image_tag "#{media.media_url_https}:small", :alt => "attachment #{i + 1}" -%> | 37 <%= image_tag "#{media.media_url_https}:small", :alt => "attachment #{i + 1}" -%> |
38 <% end %> | 38 <% end %> |
39 <% elsif media.is_a? Twitter::Media::Video %> | |
40 <%= video_tag media.video_info.variants.map(&:url), width: '100%' %> | |
39 <% end %> | 41 <% end %> |
40 <% end %> | 42 <% end %> |
41 </p> | 43 </p> |
42 | 44 |
43 <% if tweet.quoted_status.present? %> | 45 <% if tweet.quoted_status.present? %> |