The code powering m.abunchtell.com https://m.abunchtell.com
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.
 
 
 
 

71 lines
4.4 KiB

  1. .detailed-status.detailed-status--flex
  2. .p-author.h-card
  3. = link_to TagManager.instance.url_for(status.account), class: 'detailed-status__display-name u-url', target: stream_link_target, rel: 'noopener' do
  4. .detailed-status__display-avatar
  5. - if current_account&.user&.setting_auto_play_gif || autoplay
  6. = image_tag status.account.avatar_original_url, width: 48, height: 48, alt: '', class: 'account__avatar u-photo'
  7. - else
  8. = image_tag status.account.avatar_static_url, width: 48, height: 48, alt: '', class: 'account__avatar u-photo'
  9. %span.display-name
  10. %bdi
  11. %strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: autoplay)
  12. %span.display-name__account
  13. = acct(status.account)
  14. = fa_icon('lock') if status.account.locked?
  15. = account_action_button(status.account)
  16. .status__content.emojify<
  17. - if status.spoiler_text?
  18. %p{ :style => ('margin-bottom: 0' unless current_account&.user&.setting_expand_spoilers) }<
  19. %span.p-summary> #{Formatter.instance.format_spoiler(status, autoplay: autoplay)}&nbsp;
  20. %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
  21. .e-content{ lang: status.language, style: "display: #{!current_account&.user&.setting_expand_spoilers && status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay)
  22. - if !status.media_attachments.empty?
  23. - if status.media_attachments.first.video?
  24. - video = status.media_attachments.first
  25. = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, width: 670, height: 380, detailed: true, inline: true, alt: video.description
  26. - else
  27. = react_component :media_gallery, height: 380, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif || autoplay, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }
  28. - elsif status.preview_cards.first
  29. = react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_cards.first, serializer: REST::PreviewCardSerializer).as_json
  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. = link_to remote_interaction_path(status), class: 'modal-button detailed-status__link' do
  42. = fa_icon('reply')
  43. %span.detailed-status__reblogs>= number_to_human status.replies_count, strip_insignificant_zeros: true
  44. = " "
  45. ·
  46. - if status.direct_visibility?
  47. %span.detailed-status__link<
  48. = fa_icon('envelope')
  49. - elsif status.private_visibility? || status.limited_visibility?
  50. %span.detailed-status__link<
  51. = fa_icon('lock')
  52. - else
  53. = link_to remote_interaction_path(status), class: 'modal-button detailed-status__link' do
  54. = fa_icon('retweet')
  55. %span.detailed-status__reblogs>= number_to_human status.reblogs_count, strip_insignificant_zeros: true
  56. = " "
  57. ·
  58. = link_to remote_interaction_path(status), class: 'modal-button detailed-status__link' do
  59. = fa_icon('star')
  60. %span.detailed-status__favorites>= number_to_human status.favourites_count, strip_insignificant_zeros: true
  61. = " "
  62. - if user_signed_in?
  63. ·
  64. = link_to t('statuses.open_in_web'), web_url("statuses/#{status.id}"), class: 'detailed-status__application', target: '_blank'