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.

59 lines
2.4 KiB

  1. - content_for :page_title do
  2. = t('directories.explore_mastodon')
  3. - content_for :header_tags do
  4. %meta{ name: 'description', content: t('directories.explanation') }
  5. = opengraph 'og:site_name', site_title
  6. = opengraph 'og:title', t('directories.explore_mastodon', title: site_title)
  7. = opengraph 'og:description', t('directories.explanation')
  8. .page-header
  9. %h1= t('directories.explore_mastodon', title: site_title)
  10. %p= t('directories.explanation')
  11. .grid
  12. .column-0
  13. .account__section-headline
  14. = active_link_to t('directories.most_recently_active'), @tag ? explore_hashtag_path(@tag) : explore_path
  15. = active_link_to t('directories.most_popular'), @tag ? explore_hashtag_popular_path(@tag) : explore_popular_path
  16. - if @accounts.empty?
  17. = nothing_here
  18. - else
  19. .directory
  20. %table.accounts-table
  21. %tbody
  22. - @accounts.each do |account|
  23. %tr
  24. %td= account_link_to account
  25. %td.accounts-table__count
  26. = number_to_human account.statuses_count, strip_insignificant_zeros: true
  27. %small= t('accounts.posts', count: account.statuses_count)
  28. %td.accounts-table__count
  29. = number_to_human account.followers_count, strip_insignificant_zeros: true
  30. %small= t('accounts.followers', count: account.followers_count)
  31. %td.accounts-table__count
  32. - if account.last_status_at.present?
  33. %time.time-ago{ datetime: account.last_status_at.iso8601, title: l(account.last_status_at) }= l account.last_status_at
  34. - else
  35. \-
  36. %small= t('accounts.last_active')
  37. = paginate @accounts
  38. .column-1
  39. - if @tags.empty?
  40. .nothing-here.nothing-here--flexible
  41. - else
  42. - @tags.each do |tag|
  43. .directory__tag{ class: tag.id == @tag&.id ? 'active' : nil }
  44. = link_to explore_hashtag_path(tag) do
  45. %h4
  46. = fa_icon 'hashtag'
  47. = tag.name
  48. %small= t('directories.people', count: tag.accounts_count)
  49. .avatar-stack
  50. - tag.accounts.limit(3).each do |account|
  51. = 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'