1
0
mirror of https://github.com/mastodon/mastodon synced 2024-12-21 10:08:13 +09:00
mastodon/app/views/stream_entries/_media.html.haml

5 lines
380 B
Plaintext
Raw Normal View History

.media-item
= link_to media.remote_url.blank? ? media.file.url(:original) : media.remote_url, style: media.image? ? "background-image: url(#{media.file.url(:original)})" : '', target: '_blank', rel: 'noopener', class: "u-#{media.video? || media.gifv? ? 'video' : 'photo'}" do
- unless media.image?
%video{ src: media.file.url(:original), autoplay: true, loop: true }/