about summary refs log tree commit diff
path: root/app/views/about
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/about')
-rw-r--r--app/views/about/_domain_blocks.html.haml12
-rw-r--r--app/views/about/_logged_in.html.haml10
-rw-r--r--app/views/about/_login.html.haml22
-rw-r--r--app/views/about/_registration.html.haml37
-rw-r--r--app/views/about/more.html.haml95
-rw-r--r--app/views/about/show.html.haml79
-rw-r--r--app/views/about/terms.html.haml9
7 files changed, 2 insertions, 262 deletions
diff --git a/app/views/about/_domain_blocks.html.haml b/app/views/about/_domain_blocks.html.haml
deleted file mode 100644
index 35a30f16e..000000000
--- a/app/views/about/_domain_blocks.html.haml
+++ /dev/null
@@ -1,12 +0,0 @@
-%table
-  %thead
-    %tr
-      %th= t('about.unavailable_content_description.domain')
-      %th= t('about.unavailable_content_description.reason')
-  %tbody
-    - domain_blocks.each do |domain_block|
-      %tr
-        %td.nowrap
-          %span{ title: "SHA-256: #{domain_block.domain_digest}" }= domain_block.public_domain
-        %td
-          = domain_block.public_comment if display_blocks_rationale?
diff --git a/app/views/about/_logged_in.html.haml b/app/views/about/_logged_in.html.haml
deleted file mode 100644
index e1bcfffb3..000000000
--- a/app/views/about/_logged_in.html.haml
+++ /dev/null
@@ -1,10 +0,0 @@
-.simple_form
-  %p.lead= t('about.logged_in_as_html', username: content_tag(:strong, current_account.username))
-
-  .actions
-    = link_to t('about.continue_to_web'), root_url, class: 'button button-primary'
-
-.form-footer
-  %ul.no-list
-    %li= link_to t('about.get_apps'), 'https://joinmastodon.org/apps', target: '_blank', rel: 'noopener noreferrer'
-    %li= link_to t('auth.logout'), destroy_user_session_path, data: { method: :delete }
diff --git a/app/views/about/_login.html.haml b/app/views/about/_login.html.haml
deleted file mode 100644
index 0f19e8164..000000000
--- a/app/views/about/_login.html.haml
+++ /dev/null
@@ -1,22 +0,0 @@
-- unless omniauth_only?
-  = simple_form_for(new_user, url: user_session_path, namespace: 'login') do |f|
-    .fields-group
-      - if use_seamless_external_login?
-        = f.input :email, placeholder: t('simple_form.labels.defaults.username_or_email'), input_html: { 'aria-label' => t('simple_form.labels.defaults.username_or_email') }, hint: false
-      - else
-        = f.input :email, placeholder: t('simple_form.labels.defaults.email'), input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }, hint: false
-
-      = f.input :password, placeholder: t('simple_form.labels.defaults.password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.password') }, hint: false
-
-    .actions
-      = f.button :button, t('auth.login'), type: :submit, class: 'button button-primary'
-
-    %p.hint.subtle-hint= link_to t('auth.trouble_logging_in'), new_user_password_path
-
-- if Devise.mappings[:user].omniauthable? and User.omniauth_providers.any?
-  .simple_form.alternative-login
-    %h4= omniauth_only? ? t('auth.log_in_with') : t('auth.or_log_in_with')
-
-    .actions
-      - User.omniauth_providers.each do |provider|
-        = provider_sign_in_link(provider)
diff --git a/app/views/about/_registration.html.haml b/app/views/about/_registration.html.haml
deleted file mode 100644
index 5db620b2d..000000000
--- a/app/views/about/_registration.html.haml
+++ /dev/null
@@ -1,37 +0,0 @@
-- disabled = closed_registrations? || omniauth_only? || current_account.present?
-- show_message = disabled && (current_user.present? || @instance_presenter.closed_registrations_message.present?)
-
-.simple_form__overlay-area{ class: show_message ? 'simple_form__overlay-area__blurred' : '' }
-  = simple_form_for(new_user, url: user_registration_path, namespace: 'registration', html: { novalidate: false }) do |f|
-    %p.lead= t('about.federation_hint_html', instance: content_tag(:strong, site_hostname))
-
-    .fields-group
-      = f.simple_fields_for :account do |account_fields|
-        = account_fields.input :username, wrapper: :with_label, label: false, required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username'), :autocomplete => 'off', placeholder: t('simple_form.labels.defaults.username'), pattern: '[a-zA-Z0-9_]+', maxlength: 30 }, append: "@#{site_hostname}", hint: false, disabled: disabled
-
-      = f.input :email, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email'), :autocomplete => 'off' }, hint: false, disabled: disabled
-      = f.input :password, placeholder: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'new-password', :minlength => User.password_length.first, :maxlength => User.password_length.last }, hint: false, disabled: disabled
-      = f.input :password_confirmation, placeholder: t('simple_form.labels.defaults.confirm_password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_password'), :autocomplete => 'new-password' }, hint: false, disabled: disabled
-
-      = f.input :confirm_password, as: :string, placeholder: t('simple_form.labels.defaults.honeypot', label: t('simple_form.labels.defaults.password')), required: false, input_html: { 'aria-label' => t('simple_form.labels.defaults.honeypot', label: t('simple_form.labels.defaults.password')), :autocomplete => 'off' }, hint: false, disabled: disabled
-      = f.input :website, as: :url, placeholder: t('simple_form.labels.defaults.honeypot', label: 'Website'), required: false, input_html: { 'aria-label' => t('simple_form.labels.defaults.honeypot', label: 'Website'), :autocomplete => 'off' }, hint: false, disabled: disabled
-
-    - if approved_registrations?
-      .fields-group
-        = f.simple_fields_for :invite_request do |invite_request_fields|
-          = invite_request_fields.input :text, as: :text, wrapper: :with_block_label, required: Setting.require_invite_text
-
-    .fields-group
-      = f.input :agreement, as: :boolean, wrapper: :with_label, label: t('auth.checkbox_agreement_html', rules_path: about_more_path, terms_path: terms_path), required: true, disabled: disabled
-
-    .actions
-      = f.button :button, sign_up_message, type: :submit, class: 'button button-primary', disabled: disabled
-
-  - if show_message
-    .simple_form__overlay-area__overlay
-      .simple_form__overlay-area__overlay__content.rich-formatting
-        .block-icon= fa_icon 'warning'
-        - if current_account.present?
-          = t('about.logout_before_registering')
-        - else
-          = @instance_presenter.closed_registrations_message.html_safe
diff --git a/app/views/about/more.html.haml b/app/views/about/more.html.haml
deleted file mode 100644
index 0b75f159a..000000000
--- a/app/views/about/more.html.haml
+++ /dev/null
@@ -1,95 +0,0 @@
-- content_for :page_title do
-  = site_hostname
-
-- content_for :header_tags do
-  = render partial: 'shared/og'
-
-.grid-4
-  .column-0
-    .public-account-header.public-account-header--no-bar
-      .public-account-header__image
-        = image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.png'), alt: @instance_presenter.site_title, class: 'parallax'
-
-  .column-1
-    .landing-page__call-to-action{ dir: 'ltr' }
-      .row
-        .row__information-board
-          .information-board__section
-            %span= t 'about.user_count_before'
-            %strong= friendly_number_to_human @instance_presenter.user_count
-            %span= t 'about.user_count_after', count: @instance_presenter.user_count
-          .information-board__section
-            %span= t 'about.status_count_before'
-            %strong= friendly_number_to_human @instance_presenter.status_count
-            %span= t 'about.status_count_after', count: @instance_presenter.status_count
-        .row__mascot
-          .landing-page__mascot
-            = image_tag @instance_presenter.mascot&.file&.url || asset_pack_path('media/images/elephant_ui_plane.svg'), alt: ''
-
-  .column-2
-    .contact-widget
-      %h4= t 'about.administered_by'
-
-      = account_link_to(@instance_presenter.contact_account)
-
-      - if @instance_presenter.site_contact_email.present?
-        %h4
-          = succeed ':' do
-            = t 'about.contact'
-
-        = mail_to @instance_presenter.site_contact_email, nil, title: @instance_presenter.site_contact_email
-
-  .column-3
-    = render 'application/flashes'
-
-    - if @contents.blank? && @rules.empty? && (!display_blocks? || @blocks&.empty?)
-      = nothing_here
-    - else
-      .box-widget
-        .rich-formatting
-          - unless @rules.empty?
-            %h2#rules= t('about.rules')
-
-            %p= t('about.rules_html')
-
-            %ol.rules-list
-              - @rules.each do |rule|
-                %li
-                  .rules-list__text= rule.text
-
-          = @contents.html_safe
-
-          - if display_blocks? && !@blocks.empty?
-            %h2#unavailable-content= t('about.unavailable_content')
-
-            %p= t('about.unavailable_content_html')
-
-            - if (blocks = @blocks.select(&:reject_media?)) && !blocks.empty?
-              %h3= t('about.unavailable_content_description.rejecting_media_title')
-              %p= t('about.unavailable_content_description.rejecting_media')
-              = render partial: 'domain_blocks', locals: { domain_blocks: blocks }
-            - if (blocks = @blocks.select(&:silence?)) && !blocks.empty?
-              %h3= t('about.unavailable_content_description.silenced_title')
-              %p= t('about.unavailable_content_description.silenced')
-              = render partial: 'domain_blocks', locals: { domain_blocks: blocks }
-            - if (blocks = @blocks.select(&:suspend?)) && !blocks.empty?
-              %h3= t('about.unavailable_content_description.suspended_title')
-              %p= t('about.unavailable_content_description.suspended')
-              = render partial: 'domain_blocks', locals: { domain_blocks: blocks }
-
-  .column-4
-    %ul.table-of-contents
-      - unless @rules.empty?
-        %li= link_to t('about.rules'), '#rules'
-
-      - @table_of_contents.each do |item|
-        %li
-          = link_to item.title, "##{item.anchor}"
-
-          - unless item.children.empty?
-            %ul
-              - item.children.each do |sub_item|
-                %li= link_to sub_item.title, "##{sub_item.anchor}"
-
-      - if display_blocks? && !@blocks.empty?
-        %li= link_to t('about.unavailable_content'), '#unavailable-content'
diff --git a/app/views/about/show.html.haml b/app/views/about/show.html.haml
index fb292941b..05d8989ad 100644
--- a/app/views/about/show.html.haml
+++ b/app/views/about/show.html.haml
@@ -1,82 +1,7 @@
 - content_for :page_title do
-  = site_hostname
+  = t('about.title')
 
 - content_for :header_tags do
-  %link{ rel: 'canonical', href: about_url }/
   = render partial: 'shared/og'
 
-.landing
-  .landing__brand
-    = link_to root_url, class: 'brand' do
-      = logo_as_symbol(:wordmark)
-      %span.brand__tagline=t 'about.tagline'
-
-  .landing__grid
-    .landing__grid__column.landing__grid__column-registration
-      .box-widget
-        = render 'registration'
-
-      .directory
-        - if Setting.profile_directory
-          .directory__tag
-            = optional_link_to Setting.profile_directory, explore_path do
-              %h4
-                = fa_icon 'address-book fw'
-                = t('about.discover_users')
-                %small= t('about.browse_directory')
-
-              .avatar-stack
-                - @instance_presenter.sample_accounts.each do |account|
-                  = image_tag current_account&.user&.setting_auto_play_gif ? account.avatar_original_url : account.avatar_static_url, alt: '', class: 'account__avatar'
-
-        - if Setting.timeline_preview
-          .directory__tag
-            = optional_link_to Setting.timeline_preview, public_timeline_path do
-              %h4
-                = fa_icon 'globe fw'
-                = t('about.see_whats_happening')
-                %small= t('about.browse_public_posts')
-
-        .directory__tag
-          = link_to 'https://joinmastodon.org/apps', target: '_blank', rel: 'noopener noreferrer' do
-            %h4
-              = fa_icon 'tablet fw'
-              = t('about.get_apps')
-              %small= t('about.apps_platforms')
-
-    .landing__grid__column.landing__grid__column-login
-      .box-widget
-        - if current_user.present?
-          = render 'logged_in'
-        - else
-          = render 'login'
-
-      .hero-widget
-        .hero-widget__img
-          = image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.png'), alt: @instance_presenter.site_title
-
-        .hero-widget__text
-          %p
-            = @instance_presenter.site_short_description.html_safe.presence || t('about.about_mastodon_html')
-            = link_to about_more_path do
-              = t('about.learn_more')
-              = fa_icon 'angle-double-right'
-
-        .hero-widget__footer
-          .hero-widget__footer__column
-            %h4= t 'about.administered_by'
-
-            = account_link_to @instance_presenter.contact_account
-
-          .hero-widget__footer__column
-            %h4= t 'about.server_stats'
-
-            .hero-widget__counters__wrapper
-              .hero-widget__counter
-                %strong= friendly_number_to_human @instance_presenter.user_count
-                %span= t 'about.user_count_after', count: @instance_presenter.user_count
-              .hero-widget__counter
-                %strong= friendly_number_to_human @instance_presenter.active_user_count
-                %span
-                  = t 'about.active_count_after'
-                  %abbr{ title: t('about.active_footnote') } *
+= render partial: 'shared/web_app'
diff --git a/app/views/about/terms.html.haml b/app/views/about/terms.html.haml
deleted file mode 100644
index 9d076a91b..000000000
--- a/app/views/about/terms.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-- content_for :page_title do
-  = t('terms.title', instance: site_hostname)
-
-.grid
-  .column-0
-    .box-widget
-      .rich-formatting= @instance_presenter.site_terms.html_safe.presence || t('terms.body_html')
-  .column-1
-    = render 'application/sidebar'