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

52 lines
2.3 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{ style: 'margin-bottom: 0' }<
  12. %span>= "#{status.spoiler_text} "
  13. %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
  14. %div{ style: "display: #{status.spoiler_text.blank? ? 'block' : 'none'}; direction: #{rtl?(status.content) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
  15. - unless status.media_attachments.empty?
  16. - if status.media_attachments.first.video?
  17. .video-player
  18. - if status.sensitive?
  19. = render partial: 'stream_entries/content_spoiler'
  20. %video{ src: status.media_attachments.first.file.url(:original), loop: true, class: 'u-video' }
  21. - else
  22. .detailed-status__attachments
  23. - if status.sensitive?
  24. = render partial: 'stream_entries/content_spoiler'
  25. .status__attachments__inner
  26. - status.media_attachments.each do |media|
  27. = render partial: 'stream_entries/media', locals: { media: media }
  28. %div.detailed-status__meta
  29. %data.dt-published{ value: status.created_at.to_time.iso8601 }
  30. = link_to TagManager.instance.url_for(status), class: 'detailed-status__datetime u-url u-uid', target: @external_links ? '_blank' : nil, rel: 'noopener' do
  31. %span= l(status.created_at)
  32. ·
  33. - if status.application
  34. - if status.application.website.blank?
  35. %strong.detailed-status__application= status.application.name
  36. - else
  37. = link_to status.application.name, status.application.website, class: 'detailed-status__application', target: '_blank', rel: 'noopener'
  38. ·
  39. %span<
  40. = fa_icon('retweet')
  41. %span= status.reblogs_count
  42. ·
  43. %span<
  44. = fa_icon('star')
  45. %span= status.favourites_count
  46. - if user_signed_in?
  47. ·
  48. = link_to t('statuses.open_in_web'), web_url("statuses/#{status.id}"), class: 'open-in-web-link'