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.3 KiB

  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. .grid
  14. .column-0
  15. - if @accounts.empty?
  16. = nothing_here
  17. - else
  18. .directory
  19. %table.accounts-table
  20. %tbody
  21. - @accounts.each do |account|
  22. %tr
  23. %td= account_link_to account
  24. %td.accounts-table__count.optional
  25. = number_to_human account.statuses_count, strip_insignificant_zeros: true
  26. %small= t('accounts.posts', count: account.statuses_count).downcase
  27. %td.accounts-table__count.optional
  28. = number_to_human account.followers_count, strip_insignificant_zeros: true
  29. %small= t('accounts.followers', count: account.followers_count).downcase
  30. %td.accounts-table__count
  31. - if account.last_status_at.present?
  32. %time.time-ago{ datetime: account.last_status_at.iso8601, title: l(account.last_status_at) }= l account.last_status_at
  33. - else
  34. \-
  35. %small= t('accounts.last_active')
  36. = paginate @accounts
  37. .column-1
  38. - if @tags.empty?
  39. .nothing-here.nothing-here--flexible
  40. - else
  41. - @tags.each do |tag|
  42. .directory__tag{ class: tag.id == @tag&.id ? 'active' : nil }
  43. = link_to explore_hashtag_path(tag) do
  44. %h4
  45. = fa_icon 'hashtag'
  46. = tag.name
  47. %small= t('directories.people', count: tag.accounts_count)
  48. .avatar-stack
  49. - tag.cached_sample_accounts.each do |account|
  50. = image_tag current_account&.user&.setting_auto_play_gif ? account.avatar_original_url : account.avatar_static_url, width: 48, height: 48, alt: '', class: 'account__avatar'