show.html.haml 1.0 KB

123456789101112131415161718192021
  1. - content_for :page_title do
  2. = t('statuses.title', name: display_name(@account), quote: truncate(@status.spoiler_text.presence || @status.text, length: 50, omission: '…', escape: false))
  3. - content_for :header_tags do
  4. - if @account.user_prefers_noindex?
  5. %meta{ name: 'robots', content: 'noindex, noarchive' }/
  6. %link{ rel: 'alternate', type: 'application/json+oembed', href: api_oembed_url(url: short_account_status_url(@account, @status), format: 'json') }/
  7. %link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(@status) }/
  8. = opengraph 'og:site_name', site_title
  9. = opengraph 'og:type', 'article'
  10. = opengraph 'og:title', "#{display_name(@account)} (#{acct(@account)})"
  11. = opengraph 'og:url', short_account_status_url(@account, @status)
  12. = opengraph 'og:published_time', @status.created_at.iso8601
  13. = opengraph 'profile:username', acct(@account)[1..]
  14. = render 'og_description', activity: @status
  15. = render 'og_image', activity: @status, account: @account
  16. = render 'shared/web_app'