The code powering m.abunchtell.com https://m.abunchtell.com
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

70 righe
4.2 KiB

  1. .detailed-status.detailed-status--flex
  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. .detailed-status__display-avatar
  4. - if current_account&.user&.setting_auto_play_gif || autoplay
  5. = image_tag status.account.avatar.url(:original), width: 48, height: 48, alt: '', class: 'account__avatar u-photo'
  6. - else
  7. = image_tag status.account.avatar.url(:static), width: 48, height: 48, alt: '', class: 'account__avatar u-photo'
  8. %span.display-name
  9. %bdi
  10. %strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: autoplay)
  11. %span.display-name__account
  12. = acct(status.account)
  13. = fa_icon('lock') if status.account.locked?
  14. = account_action_button(status.account)
  15. .status__content.emojify<
  16. - if status.spoiler_text?
  17. %p{ style: 'margin-bottom: 0' }<
  18. %span.p-summary> #{Formatter.instance.format_spoiler(status, autoplay: autoplay)}&nbsp;
  19. %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
  20. .e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay)
  21. - if !status.media_attachments.empty?
  22. - if status.media_attachments.first.video?
  23. - video = status.media_attachments.first
  24. = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 670, height: 380, detailed: true, inline: true, alt: video.description
  25. - else
  26. = react_component :media_gallery, height: 380, sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_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 }
  27. - elsif status.preview_cards.first
  28. = react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_cards.first, serializer: REST::PreviewCardSerializer).as_json
  29. .detailed-status__meta
  30. %data.dt-published{ value: status.created_at.to_time.iso8601 }
  31. = link_to TagManager.instance.url_for(status), class: 'detailed-status__datetime u-url u-uid', target: stream_link_target, rel: 'noopener' do
  32. %time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
  33. ·
  34. - if status.application
  35. - if status.application.website.blank?
  36. %strong.detailed-status__application= status.application.name
  37. - else
  38. = link_to status.application.name, status.application.website, class: 'detailed-status__application', target: '_blank', rel: 'noopener'
  39. ·
  40. = link_to remote_interaction_path(status), class: 'modal-button detailed-status__link' do
  41. = fa_icon('reply')
  42. %span.detailed-status__reblogs>= number_to_human status.replies_count, strip_insignificant_zeros: true
  43. = " "
  44. ·
  45. - if status.direct_visibility?
  46. %span.detailed-status__link<
  47. = fa_icon('envelope')
  48. - elsif status.private_visibility?
  49. %span.detailed-status__link<
  50. = fa_icon('lock')
  51. - else
  52. = link_to remote_interaction_path(status), class: 'modal-button detailed-status__link' do
  53. = fa_icon('retweet')
  54. %span.detailed-status__reblogs>= number_to_human status.reblogs_count, strip_insignificant_zeros: true
  55. = " "
  56. ·
  57. = link_to remote_interaction_path(status), class: 'modal-button detailed-status__link' do
  58. = fa_icon('star')
  59. %span.detailed-status__favorites>= number_to_human status.favourites_count, strip_insignificant_zeros: true
  60. = " "
  61. - if user_signed_in?
  62. ·
  63. = link_to t('statuses.open_in_web'), web_url("statuses/#{status.id}"), class: 'detailed-status__application', target: '_blank'