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

55 lines
2.7 KiB

  1. .detailed-status.light
  2. = link_to TagManager.instance.url_for(status.account), class: 'detailed-status__display-name p-author h-card', target: stream_link_target, rel: 'noopener' do
  3. %div
  4. .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= acct(status.account)
  9. - if embedded_view?
  10. = link_to "web+mastodon://follow?uri=#{status.account.local_username_and_domain}", class: 'button button-secondary logo-button', target: '_new' do
  11. = render file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')
  12. = t('accounts.follow')
  13. .status__content.p-name.emojify<
  14. - if status.spoiler_text?
  15. %p{ style: 'margin-bottom: 0' }<
  16. %span.p-summary> #{status.spoiler_text}&nbsp;
  17. %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
  18. .e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
  19. - unless status.media_attachments.empty?
  20. - if status.media_attachments.first.video?
  21. .video-player
  22. = render partial: 'stream_entries/content_spoiler', locals: { sensitive: status.sensitive? }
  23. %video.u-video{ src: status.media_attachments.first.file.url(:original), loop: true }
  24. - else
  25. .detailed-status__attachments
  26. = render partial: 'stream_entries/content_spoiler', locals: { sensitive: status.sensitive? }
  27. .status__attachments__inner
  28. - status.media_attachments.each do |media|
  29. = render partial: 'stream_entries/media', locals: { media: media }
  30. .detailed-status__meta
  31. %data.dt-published{ value: status.created_at.to_time.iso8601 }
  32. = link_to TagManager.instance.url_for(status), class: 'detailed-status__datetime u-url u-uid', target: stream_link_target, rel: 'noopener' do
  33. %time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
  34. ·
  35. - if status.application
  36. - if status.application.website.blank?
  37. %strong.detailed-status__application= status.application.name
  38. - else
  39. = link_to status.application.name, status.application.website, class: 'detailed-status__application', target: '_blank', rel: 'noopener'
  40. ·
  41. %span<
  42. = fa_icon('retweet')
  43. %span= status.reblogs_count
  44. ·
  45. %span<
  46. = fa_icon('star')
  47. %span= status.favourites_count
  48. - if user_signed_in?
  49. ·
  50. = link_to t('statuses.open_in_web'), web_url("statuses/#{status.id}"), class: 'open-in-web-link', target: '_blank'