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.

41 lines
2.0 KiB

  1. - processed_bio = FrontmatterHandler.instance.process_bio Formatter.instance.simplified_format account
  2. .card.h-card.p-author{ style: "background-image: url(#{account.header.url(:original)})" }
  3. .details
  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 t('accounts.unfollow'), account_unfollow_path(account), data: { method: :post }, class: 'button'
  8. - else
  9. = link_to t('accounts.follow'), account_follow_path(account), data: { method: :post }, class: 'button'
  10. - elsif !user_signed_in?
  11. .controls
  12. .remote-follow
  13. = link_to t('accounts.remote_follow'), account_remote_follow_path(account), class: 'button'
  14. .avatar= image_tag account.avatar.url(:original), class: 'u-photo'
  15. %h1.name
  16. %span.p-name.emojify= display_name(account)
  17. %small
  18. %span @#{account.username}
  19. = fa_icon('lock') if account.locked?
  20. .bio
  21. .account__header__content.p-note.emojify!=processed_bio[:text]
  22. .details-counters
  23. .counter{ class: active_nav_class(short_account_url(account)) }
  24. = link_to short_account_url(account), class: 'u-url u-uid' do
  25. %span.counter-label= t('accounts.posts')
  26. %span.counter-number= number_with_delimiter account.statuses_count
  27. .counter{ class: active_nav_class(account_following_index_url(account)) }
  28. = link_to account_following_index_url(account) do
  29. %span.counter-label= t('accounts.following')
  30. %span.counter-number= number_with_delimiter account.following_count
  31. .counter{ class: active_nav_class(account_followers_url(account)) }
  32. = link_to account_followers_url(account) do
  33. %span.counter-label= t('accounts.followers')
  34. %span.counter-number= number_with_delimiter account.followers_count
  35. - if processed_bio[:metadata].length > 0
  36. .metadata<
  37. - processed_bio[:metadata].each do |i|
  38. .metadata-item><
  39. %b.emojify>!=i[0]
  40. %span.emojify>!=i[1]