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

34 lines
1.6 KiB

  1. .card{ style: "background-image: url(#{@account.header.url( :original)})" }
  2. - if user_signed_in? && current_account.id != @account.id && !current_account.requested?(@account)
  3. .controls
  4. - if current_account.following?(@account)
  5. = link_to t('accounts.unfollow'), unfollow_account_path(@account), data: { method: :post }, class: 'button'
  6. - else
  7. = link_to t('accounts.follow'), follow_account_path(@account), data: { method: :post }, class: 'button'
  8. - else
  9. .controls
  10. .remote-follow
  11. = link_to t('accounts.remote_follow'), account_remote_follow_path(@account), class: 'button'
  12. .avatar= image_tag @account.avatar.url(:original)
  13. %h1.name
  14. = display_name(@account)
  15. %small
  16. = "@#{@account.username}"
  17. = fa_icon('lock') if @account.locked?
  18. .details
  19. .bio
  20. .account__header__content= Formatter.instance.simplified_format(@account)
  21. .details-counters
  22. .counter{ class: active_nav_class(account_url(@account)) }
  23. = link_to account_url(@account) do
  24. %span.counter-label= t('accounts.posts')
  25. %span.counter-number= number_with_delimiter @account.statuses.count
  26. .counter{ class: active_nav_class(following_account_url(@account)) }
  27. = link_to following_account_url(@account) do
  28. %span.counter-label= t('accounts.following')
  29. %span.counter-number= number_with_delimiter @account.following.count
  30. .counter{ class: active_nav_class(followers_account_url(@account)) }
  31. = link_to followers_account_url(@account) do
  32. %span.counter-label= t('accounts.followers')
  33. %span.counter-number= number_with_delimiter @account.followers.count