闭社主体 forked from https://github.com/tootsuite/mastodon
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.

80 lines
3.1 KiB

  1. - content_for :page_title do
  2. = site_hostname
  3. - content_for :header_tags do
  4. = javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
  5. = render partial: 'shared/og'
  6. .grid-4
  7. .column-0
  8. .public-account-header.public-account-header--no-bar
  9. .public-account-header__image
  10. = image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg'), alt: @instance_presenter.site_title, class: 'parallax'
  11. .column-1
  12. .landing-page__call-to-action{ dir: 'ltr' }
  13. .row
  14. .row__information-board
  15. .information-board__section
  16. %span= t 'about.user_count_before'
  17. %strong= number_with_delimiter @instance_presenter.user_count
  18. %span= t 'about.user_count_after', count: @instance_presenter.user_count
  19. .information-board__section
  20. %span= t 'about.status_count_before'
  21. %strong= number_with_delimiter @instance_presenter.status_count
  22. %span= t 'about.status_count_after', count: @instance_presenter.status_count
  23. .row__mascot
  24. .landing-page__mascot
  25. = image_tag @instance_presenter.mascot&.file&.url || asset_pack_path('media/images/elephant_ui_plane.svg'), alt: ''
  26. .column-2
  27. .contact-widget
  28. %h4= t 'about.administered_by'
  29. = account_link_to(@instance_presenter.contact_account)
  30. - if @instance_presenter.site_contact_email.present?
  31. %h4
  32. = succeed ':' do
  33. = t 'about.contact'
  34. = mail_to @instance_presenter.site_contact_email, nil, title: @instance_presenter.site_contact_email
  35. .column-3
  36. = render 'application/flashes'
  37. - if @contents.blank? && (!display_blocks? || @blocks&.empty?)
  38. = nothing_here
  39. - else
  40. .box-widget
  41. .rich-formatting
  42. = @contents.html_safe
  43. - if display_blocks? && !@blocks.empty?
  44. %h2#unavailable-content= t('about.unavailable_content')
  45. %p= t('about.unavailable_content_html')
  46. - if (blocks = @blocks.select(&:reject_media?)) && !blocks.empty?
  47. %p= t('about.unavailable_content_description.rejecting_media')
  48. = render partial: 'domain_blocks', locals: { domain_blocks: blocks }
  49. - if (blocks = @blocks.select(&:silence?)) && !blocks.empty?
  50. %p= t('about.unavailable_content_description.silenced')
  51. = render partial: 'domain_blocks', locals: { domain_blocks: blocks }
  52. - if (blocks = @blocks.select(&:suspend?)) && !blocks.empty?
  53. %p= t('about.unavailable_content_description.suspended')
  54. = render partial: 'domain_blocks', locals: { domain_blocks: blocks }
  55. .column-4
  56. %ul.table-of-contents
  57. - @table_of_contents.each do |item|
  58. %li
  59. = link_to item.title, "##{item.anchor}"
  60. - unless item.children.empty?
  61. %ul
  62. - item.children.each do |sub_item|
  63. %li= link_to sub_item.title, "##{sub_item.anchor}"
  64. - if display_blocks? && !@blocks.empty?
  65. %li= link_to t('about.unavailable_content'), '#unavailable-content'