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

18 lines
1.2 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: 'Mastodon' }/
  5. %meta{ property: 'og:type', content: 'article' }/
  6. %meta{ property: 'og:title', content: "#{@account.username} on #{Rails.configuration.x.local_domain}" }/
  7. %meta{ property: 'og:description', content: @stream_entry.activity.content }/
  8. - if @stream_entry.activity.is_a?(Status) && @stream_entry.activity.media_attachments.size > 0
  9. %meta{ property: 'og:image', content: full_asset_url(@stream_entry.activity.media_attachments.first.file.url(:small)) }/
  10. - else
  11. %meta{ property: 'og:image', content: full_asset_url(@account.avatar.url(:original)) }/
  12. %meta{ property: 'og:image:width', content: '120' }/
  13. %meta{ property: 'og:image:height', content: '120' }/
  14. .activity-stream.activity-stream-headless
  15. = render partial: @type, locals: { @type.to_sym => @stream_entry.activity, include_threads: true }