闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.5 KiB

  1. .status.light
  2. .status__header
  3. .status__meta
  4. = link_to time_ago_in_words(status.created_at), TagManager.instance.url_for(status), class: 'status__relative-time', title: l(status.created_at), target: @external_links ? '_blank' : nil, rel: 'noopener'
  5. = link_to TagManager.instance.url_for(status.account), class: 'status__display-name', target: @external_links ? '_blank' : nil, rel: 'noopener' do
  6. .status__avatar
  7. %div
  8. = image_tag status.account.avatar(:original), width: 48, height: 48, alt: ''
  9. %span.display-name
  10. %strong= display_name(status.account)
  11. %span= acct(status.account)
  12. .status__content= Formatter.instance.format(status)
  13. - unless status.media_attachments.empty?
  14. .status__attachments
  15. - if status.sensitive?
  16. = render partial: 'stream_entries/content_spoiler'
  17. - if status.media_attachments.first.video?
  18. .video-item
  19. = link_to (status.media_attachments.first.remote_url.blank? ? status.media_attachments.first.file.url(:original) : status.media_attachments.first.remote_url), style: "background-image: url(#{status.media_attachments.first.file.url(:small)})", target: '_blank', rel: 'noopener' do
  20. .video-item__play
  21. = fa_icon('play')
  22. - else
  23. - status.media_attachments.each do |media|
  24. .media-item
  25. = link_to '', (media.remote_url.blank? ? media.file.url(:original) : media.remote_url), style: "background-image: url(#{media.file.url(:original)})", target: '_blank', rel: 'noopener'