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

51 lines
2.1 KiB

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