index.html.haml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. - content_for :page_title do
  2. = t('directories.explore_mastodon', title: site_title)
  3. - content_for :header_tags do
  4. %meta{ name: 'description', content: t('directories.explanation') }
  5. = opengraph 'og:site_name', t('about.hosted_on', domain: site_hostname)
  6. = opengraph 'og:type', 'website'
  7. = opengraph 'og:title', t('directories.explore_mastodon', title: site_title)
  8. = opengraph 'og:description', t('directories.explanation')
  9. = opengraph 'og:image', File.join(root_url, 'android-chrome-192x192.png')
  10. .page-header
  11. %h1= t('directories.explore_mastodon', title: site_title)
  12. %p= t('directories.explanation')
  13. - if @accounts.empty?
  14. = nothing_here
  15. - else
  16. .directory__list
  17. - @accounts.each do |account|
  18. .account-card
  19. = link_to TagManager.instance.url_for(account), class: 'account-card__permalink' do
  20. .account-card__header
  21. = image_tag account.header.url, alt: ''
  22. .account-card__title
  23. .account-card__title__avatar
  24. = image_tag account.avatar.url, alt: ''
  25. .display-name
  26. %bdi
  27. %strong.emojify.p-name= display_name(account, custom_emojify: true)
  28. %span
  29. = acct(account)
  30. = fa_icon('lock') if account.locked?
  31. - if account.note.present?
  32. .account-card__bio.emojify
  33. = prerender_custom_emojis(account_bio_format(account), account.emojis)
  34. - else
  35. .flex-spacer
  36. .account-card__actions
  37. .account-card__counters
  38. .account-card__counters__item
  39. = friendly_number_to_human account.statuses_count
  40. %small= t('accounts.posts', count: account.statuses_count).downcase
  41. .account-card__counters__item
  42. = friendly_number_to_human account.followers_count
  43. %small= t('accounts.followers', count: account.followers_count).downcase
  44. .account-card__counters__item
  45. = friendly_number_to_human account.following_count
  46. %small= t('accounts.following', count: account.following_count).downcase
  47. .account-card__actions__button
  48. = account_action_button(account)
  49. = paginate @accounts