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.

57 lines
2.4 KiB

  1. - processed_bio = FrontmatterHandler.instance.process_bio Formatter.instance.simplified_format(account, custom_emojify: true)
  2. .card.h-card.p-author{ style: "background-image: url(#{account.header.url(:original)})" }
  3. .card__illustration
  4. = render 'accounts/follow_button', account: account
  5. .avatar= image_tag account.avatar.url(:original), class: 'u-photo'
  6. .card__bio
  7. %h1.name
  8. %span.p-name.emojify= display_name(account, custom_emojify: true)
  9. %small<
  10. %span>< @#{account.local_username_and_domain}
  11. = fa_icon('lock') if account.locked?
  12. - if account.bot?
  13. .roles
  14. .account-role.bot
  15. = t 'accounts.roles.bot'
  16. - elsif Setting.show_staff_badge
  17. - if account.user_admin?
  18. .roles
  19. .account-role.admin
  20. = t 'accounts.roles.admin'
  21. - elsif account.user_moderator?
  22. .roles
  23. .account-role.moderator
  24. = t 'accounts.roles.moderator'
  25. .bio
  26. .account__header__content.p-note.emojify!=processed_bio[:text]
  27. - if !account.fields.empty?
  28. .account__header__fields
  29. - account.fields.each do |field|
  30. %dl
  31. %dt.emojify{ title: field.name }= field.name
  32. %dd.emojify{ title: field.value }= Formatter.instance.format_field(account, field.value, custom_emojify: true)
  33. - elsif processed_bio[:metadata].length > 0
  34. .account__header__fields
  35. - processed_bio[:metadata].each do |i|
  36. %dl
  37. %dt.emojify{ title: i[0] }!= i[0]
  38. %dd.emojify{ title: i[1] }!= i[1]
  39. .details-counters
  40. .counter{ class: active_nav_class(short_account_url(account)) }
  41. = link_to short_account_url(account), class: 'u-url u-uid' do
  42. %span.counter-number= number_to_human account.statuses_count, strip_insignificant_zeros: true
  43. %span.counter-label= t('accounts.posts')
  44. .counter{ class: active_nav_class(account_following_index_url(account)) }
  45. = link_to account_following_index_url(account) do
  46. %span.counter-number= number_to_human account.following_count, strip_insignificant_zeros: true
  47. %span.counter-label= t('accounts.following')
  48. .counter{ class: active_nav_class(account_followers_url(account)) }
  49. = link_to account_followers_url(account) do
  50. %span.counter-number= number_to_human account.followers_count, strip_insignificant_zeros: true
  51. %span.counter-label= t('accounts.followers')