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

91 lines
3.6 KiB

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