_header.html.haml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. .public-account-header{:class => ("inactive" if account.moved?)}
  2. .public-account-header__image
  3. = image_tag (prefers_autoplay? ? account.header_original_url : account.header_static_url), class: 'parallax'
  4. .public-account-header__bar
  5. = link_to short_account_url(account), class: 'avatar' do
  6. = image_tag (prefers_autoplay? ? account.avatar_original_url : account.avatar_static_url), id: 'profile_page_avatar', data: { original: full_asset_url(account.avatar_original_url), static: full_asset_url(account.avatar_static_url), autoplay: prefers_autoplay? }
  7. .public-account-header__tabs
  8. .public-account-header__tabs__name
  9. %h1
  10. = display_name(account, custom_emojify: true)
  11. %small
  12. = acct(account)
  13. = fa_icon('lock') if account.locked?
  14. .public-account-header__tabs__tabs
  15. .details-counters
  16. .counter{ class: active_nav_class(short_account_url(account), short_account_with_replies_url(account), short_account_media_url(account)) }
  17. = link_to short_account_url(account), class: 'u-url u-uid', title: number_with_delimiter(account.statuses_count) do
  18. %span.counter-number= friendly_number_to_human account.statuses_count
  19. %span.counter-label= t('accounts.posts', count: account.statuses_count)
  20. .counter{ class: active_nav_class(account_following_index_url(account)) }
  21. = link_to account_following_index_url(account), title: number_with_delimiter(account.following_count) do
  22. %span.counter-number= friendly_number_to_human account.following_count
  23. %span.counter-label= t('accounts.following', count: account.following_count)
  24. .counter{ class: active_nav_class(account_followers_url(account)) }
  25. = link_to account_followers_url(account), title: number_with_delimiter(account.followers_count) do
  26. %span.counter-number= friendly_number_to_human account.followers_count
  27. %span.counter-label= t('accounts.followers', count: account.followers_count)
  28. .spacer
  29. .public-account-header__tabs__tabs__buttons
  30. = account_action_button(account)
  31. .public-account-header__extra
  32. = render 'accounts/bio', account: account
  33. .public-account-header__extra__links
  34. = link_to account_following_index_url(account) do
  35. %strong= friendly_number_to_human account.following_count
  36. = t('accounts.following', count: account.following_count)
  37. = link_to account_followers_url(account) do
  38. %strong= friendly_number_to_human account.followers_count
  39. = t('accounts.followers', count: account.followers_count)