闭社主体 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.

46 lines
2.1 KiB

  1. .detailed-status.light
  2. = link_to TagManager.instance.url_for(status.account), class: 'detailed-status__display-name p-author h-card', target: @external_links ? '_blank' : nil, rel: 'noopener' do
  3. %div
  4. %div.avatar
  5. = image_tag status.account.avatar.url(:original), width: 48, height: 48, alt: '', class: 'u-photo'
  6. %span.display-name
  7. %strong.p-name.emojify= display_name(status.account)
  8. %span.p-nickname= acct(status.account)
  9. .status__content.e-content.p-name.emojify<
  10. - unless status.spoiler_text.blank?
  11. %p= status.spoiler_text
  12. = Formatter.instance.format(status)
  13. - unless status.media_attachments.empty?
  14. - if status.media_attachments.first.video?
  15. .video-player
  16. - if status.sensitive?
  17. = render partial: 'stream_entries/content_spoiler'
  18. %video{ src: status.media_attachments.first.file.url(:original), loop: true, class: 'u-video' }
  19. - else
  20. .detailed-status__attachments
  21. - if status.sensitive?
  22. = render partial: 'stream_entries/content_spoiler'
  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', class: "u-#{media.video? ? 'video' : 'photo'}"
  26. %div.detailed-status__meta
  27. %data.dt-published{ value: status.created_at.to_time.iso8601 }
  28. = link_to TagManager.instance.url_for(status), class: 'detailed-status__datetime u-url u-uid', target: @external_links ? '_blank' : nil, rel: 'noopener' do
  29. %span= l(status.created_at)
  30. ·
  31. - if status.application
  32. - if status.application.website.blank?
  33. %strong.detailed-status__application= status.application.name
  34. - else
  35. = link_to status.application.name, status.application.website, class: 'detailed-status__application', target: '_blank', rel: 'noopener'
  36. ·
  37. %span<
  38. = fa_icon('retweet')
  39. %span= status.reblogs.count
  40. ·
  41. %span<
  42. = fa_icon('star')
  43. %span= status.favourites.count