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.

81 lines
3.2 KiB

  1. - content_for :page_title do
  2. = "#{display_name(@account)} (@#{@account.local_username_and_domain})"
  3. - content_for :header_tags do
  4. %meta{ name: 'description', content: account_description(@account) }/
  5. - if @account.user&.setting_noindex
  6. %meta{ name: 'robots', content: 'noindex' }/
  7. %link{ rel: 'salmon', href: api_salmon_url(@account.id) }/
  8. %link{ rel: 'alternate', type: 'application/atom+xml', href: account_url(@account, format: 'atom') }/
  9. %link{ rel: 'alternate', type: 'application/rss+xml', href: account_url(@account, format: 'rss') }/
  10. %link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(@account) }/
  11. - if @older_url
  12. %link{ rel: 'next', href: @older_url }/
  13. - if @newer_url
  14. %link{ rel: 'prev', href: @newer_url }/
  15. = opengraph 'og:type', 'profile'
  16. = render 'og', account: @account, url: short_account_url(@account, only_path: false)
  17. = render 'header', account: @account, with_bio: true
  18. .grid
  19. .column-0
  20. .h-feed
  21. %data.p-name{ value: "#{@account.username} on #{site_hostname}" }/
  22. .account__section-headline
  23. = active_link_to t('accounts.posts_tab_heading'), short_account_url(@account)
  24. = active_link_to t('accounts.posts_with_replies'), short_account_with_replies_url(@account)
  25. = active_link_to t('accounts.media'), short_account_media_url(@account)
  26. - if user_signed_in? && @account.blocking?(current_account)
  27. .nothing-here.nothing-here--under-tabs= t('accounts.unavailable')
  28. - elsif @statuses.empty?
  29. = nothing_here 'nothing-here--under-tabs'
  30. - else
  31. .activity-stream.activity-stream--under-tabs
  32. - if params[:page].to_i.zero?
  33. = render partial: 'stream_entries/status', collection: @pinned_statuses, as: :status, locals: { pinned: true }
  34. - if @newer_url
  35. .entry= link_to_more @newer_url
  36. = render partial: 'stream_entries/status', collection: @statuses, as: :status
  37. - if @older_url
  38. .entry= link_to_more @older_url
  39. .column-1
  40. - if @account.memorial?
  41. .memoriam-widget= t('in_memoriam_html')
  42. - elsif @account.moved?
  43. = render 'moved', account: @account
  44. = render 'bio', account: @account
  45. - unless @endorsed_accounts.empty?
  46. .endorsements-widget
  47. %h4= t 'accounts.choices_html', name: content_tag(:bdi, display_name(@account, custom_emojify: true))
  48. - @endorsed_accounts.each do |account|
  49. = account_link_to account
  50. - @account.featured_tags.order(statuses_count: :desc).each do |featured_tag|
  51. .directory__tag{ class: params[:tag] == featured_tag.name ? 'active' : nil }
  52. = link_to short_account_tag_path(@account, featured_tag.tag) do
  53. %h4
  54. = fa_icon 'hashtag'
  55. = featured_tag.name
  56. %small
  57. - if featured_tag.last_status_at.nil?
  58. = t('accounts.nothing_here')
  59. - else
  60. %time{ datetime: featured_tag.last_status_at.iso8601, title: l(featured_tag.last_status_at) }= l featured_tag.last_status_at
  61. .trends__item__current= number_to_human featured_tag.statuses_count, strip_insignificant_zeros: true
  62. = render 'application/sidebar'