Change sizing of community attachments

This commit is contained in:
syeopite 2021-07-25 06:08:13 -07:00
parent ec0ddcd19d
commit 0137a43722
No known key found for this signature in database
GPG key ID: 6FA616E5A5294A82

View file

@ -81,16 +81,14 @@
<% # Handles attachments: %>
<% attachment = thread.attachment %>
<% if attachment.is_a? YouTubeStructs::VideoRenderer %>
<div class="pure-u-1 pure-u-md-1-2">
<div style="position:relative;width:100%;height:0;padding-bottom:56.25%;margin-bottom:5px">
<iframe id='ivplayer' style='position:absolute;width:100%;height:100%;left:0;top:0' src='/embed/<%=attachment.id%>?autoplay=0' style='border:none;'></iframe>
</div>
<div style="position:relative;width:100%;height:0;padding-bottom:56.25%;margin-bottom:5px">
<iframe id='ivplayer' style='position:absolute;width:100%;height:100%;left:0;top:0' src='/embed/<%=attachment.id%>?autoplay=0' style='border:none;'></iframe>
</div>
<% elsif attachment.is_a? YouTubeStructs::PlaylistRenderer %>
<% elsif attachment.is_a? YouTubeStructs::CommunityPoll %>
<% elsif attachment.nil? %>
<% else %>
<img src="/ggpht<%= URI.parse(attachment).request_target%>"/>
<img style="width: 90%" src="/ggpht<%= URI.parse(attachment).request_target%>"/>
<% end %>
<p id="likes"><i class="icon ion-ios-thumbs-up" style="margin-right: 5px;"></i><%= thread.likes %></p>