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.

56 lines
2.4 KiB

  1. .card.h-card.p-author{ style: "background-image: url(#{account.header.url(:original)})" }
  2. .card__illustration
  3. - unless account.memorial? || account.moved?
  4. - if user_signed_in? && current_account.id != account.id && !current_account.requested?(account)
  5. .controls
  6. - if current_account.following?(account)
  7. = link_to account_unfollow_path(account), data: { method: :post }, class: 'icon-button' do
  8. = fa_icon 'user-times'
  9. = t('accounts.unfollow')
  10. - else
  11. = link_to account_follow_path(account), data: { method: :post }, class: 'icon-button' do
  12. = fa_icon 'user-plus'
  13. = t('accounts.follow')
  14. - elsif !user_signed_in?
  15. .controls
  16. .remote-follow
  17. = link_to account_remote_follow_path(account), class: 'icon-button' do
  18. = fa_icon 'user-plus'
  19. = t('accounts.remote_follow')
  20. .avatar= image_tag account.avatar.url(:original), class: 'u-photo'
  21. .card__bio
  22. %h1.name
  23. %span.p-name.emojify= display_name(account)
  24. %small
  25. %span @#{account.local_username_and_domain}
  26. = fa_icon('lock') if account.locked?
  27. - if account.user_admin?
  28. .roles
  29. .account-role.admin
  30. = t 'accounts.roles.admin'
  31. - elsif account.user_moderator?
  32. .roles
  33. .account-role.moderator
  34. = t 'accounts.roles.moderator'
  35. .bio
  36. .account__header__content.p-note.emojify= Formatter.instance.simplified_format(account)
  37. .details-counters
  38. .counter{ class: active_nav_class(short_account_url(account)) }
  39. = link_to short_account_url(account), class: 'u-url u-uid' do
  40. %span.counter-number= number_to_human account.statuses_count, strip_insignificant_zeros: true
  41. %span.counter-label= t('accounts.posts')
  42. .counter{ class: active_nav_class(account_following_index_url(account)) }
  43. = link_to account_following_index_url(account) do
  44. %span.counter-number= number_to_human account.following_count, strip_insignificant_zeros: true
  45. %span.counter-label= t('accounts.following')
  46. .counter{ class: active_nav_class(account_followers_url(account)) }
  47. = link_to account_followers_url(account) do
  48. %span.counter-number= number_to_human account.followers_count, strip_insignificant_zeros: true
  49. %span.counter-label= t('accounts.followers')