mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-14 19:05:27 +00:00
caf5b8e975
before. In the API, attachments now can be either image, video or gifv. Gifv is to be treated like images in terms of behaviour, but are videos by file type.
5 lines
380 B
Plaintext
5 lines
380 B
Plaintext
.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 }/
|