logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

_detailed_status.html.haml (3448B)


  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> #{Formatter.instance.format_spoiler(status)}&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, custom_emojify: true)
  19. - if !status.media_attachments.empty?
  20. - if status.media_attachments.first.video?
  21. - video = status.media_attachments.first
  22. %div{ data: { component: 'Video', props: Oj.dump(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) }}
  23. - else
  24. %div{ data: { component: 'MediaGallery', props: Oj.dump(height: 380, sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}
  25. - elsif status.preview_cards.first
  26. %div{ data: { component: 'Card', props: Oj.dump('maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_cards.first, serializer: REST::PreviewCardSerializer).as_json) }}
  27. .detailed-status__meta
  28. %data.dt-published{ value: status.created_at.to_time.iso8601 }
  29. = link_to TagManager.instance.url_for(status), class: 'detailed-status__datetime u-url u-uid', target: stream_link_target, rel: 'noopener' do
  30. %time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
  31. ·
  32. - if status.application
  33. - if status.application.website.blank?
  34. %strong.detailed-status__application= status.application.name
  35. - else
  36. = link_to status.application.name, status.application.website, class: 'detailed-status__application', target: '_blank', rel: 'noopener'
  37. ·
  38. - if status.direct_visibility?
  39. %span<
  40. = fa_icon('envelope')
  41. - elsif status.private_visibility?
  42. %span<
  43. = fa_icon('lock')
  44. - else
  45. %span<
  46. = fa_icon('retweet')
  47. %span= status.reblogs_count
  48. ·
  49. %span<
  50. = fa_icon('star')
  51. %span= status.favourites_count
  52. - if user_signed_in?
  53. ·
  54. = link_to t('statuses.open_in_web'), web_url("statuses/#{status.id}"), class: 'open-in-web-link', target: '_blank'