about summary refs log tree commit diff
path: root/app/views/stream_entries/_media.html.haml
blob: 779f02c8d9166be02264f565daab4f8d7c17f1e1 (plain) (blame)
1
2
3
4
.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 }/