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

40 lines
1.7 KiB

  1. - include_threads ||= false
  2. - is_predecessor ||= false
  3. - is_successor ||= false
  4. - centered = include_threads && !is_predecessor && !is_successor
  5. - if status.reply? && include_threads
  6. = render partial: 'status', collection: @ancestors, as: :status, locals: { is_predecessor: true }
  7. .entry{ class: entry_classes(status, is_predecessor, is_successor, include_threads) }
  8. - if status.reblog?
  9. .pre-header
  10. %i.fa.fa-retweet
  11. Shared by
  12. = link_to display_name(status.account), TagManager.instance.url_for(status.account), class: 'name'
  13. .entry__container
  14. .avatar
  15. = image_tag avatar_for_status_url(status)
  16. .entry__container__container
  17. .header
  18. .header__left
  19. = link_to TagManager.instance.url_for(proper_status(status).account), class: 'name' do
  20. %strong= display_name(proper_status(status).account)
  21. = "@#{proper_status(status).account.acct}"
  22. .header__right
  23. = link_to TagManager.instance.url_for(proper_status(status)), class: 'time' do
  24. %span{ title: proper_status(status).created_at }
  25. = relative_time(proper_status(status).created_at)
  26. .content= Formatter.instance.format(proper_status(status))
  27. - if (status.reblog? ? status.reblog : status).media_attachments.size > 0
  28. %ul.media-attachments
  29. - (status.reblog? ? status.reblog : status).media_attachments.each do |media|
  30. %li.transparent-background= link_to '', media.file.url, style: "background-image: url(#{media.file.url(:small)})", target: '_blank'
  31. - if include_threads
  32. = render partial: 'status', collection: @descendants, as: :status, locals: { is_successor: true }