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

27 lines
1.6 KiB

  1. - content_for :header_tags do
  2. %link{ rel: 'alternate', type: 'application/atom+xml', href: account_stream_entry_url(@account, @stream_entry, format: 'atom') }/
  3. %link{ rel: 'alternate', type: 'application/json+oembed', href: api_oembed_url(url: account_stream_entry_url(@account, @stream_entry), format: 'json') }/
  4. %meta{ property: 'og:site_name', content: site_title }/
  5. %meta{ property: 'og:type', content: 'article' }/
  6. %meta{ property: 'og:title', content: "#{@account.username} on #{Rails.configuration.x.local_domain}" }/
  7. - if @stream_entry.activity.is_a?(Status) && !@stream_entry.activity.spoiler_text.blank?
  8. %meta{ property: 'og:description', content: @stream_entry.activity.spoiler_text }/
  9. - else
  10. %meta{ property: 'og:description', content: @stream_entry.activity.content }/
  11. - if @stream_entry.activity.is_a?(Status) && @stream_entry.activity.media_attachments.size > 0
  12. %meta{ property: 'og:image', content: full_asset_url(@stream_entry.activity.media_attachments.first.file.url(:small)) }/
  13. - else
  14. %meta{ property: 'og:image', content: full_asset_url(@account.avatar.url(:original)) }/
  15. %meta{ property: 'og:image:width', content: '120' }/
  16. %meta{ property: 'og:image:height', content: '120' }/
  17. %meta{ property: 'twitter:card', content: 'summary' }/
  18. - if !user_signed_in? && !Rails.configuration.x.single_user_mode
  19. = render partial: 'shared/landing_strip', locals: { account: @stream_entry.account }
  20. .activity-stream.activity-stream-headless.h-entry
  21. = render partial: "stream_entries/#{@type}", locals: { @type.to_sym => @stream_entry.activity, include_threads: true }