diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/about/_forms.html.haml | 14 | ||||
-rw-r--r-- | app/views/about/_links.html.haml | 2 | ||||
-rw-r--r-- | app/views/about/_registration.html.haml | 2 | ||||
-rw-r--r-- | app/views/about/more.html.haml | 16 | ||||
-rw-r--r-- | app/views/about/show.html.haml | 116 | ||||
-rw-r--r-- | app/views/about/terms.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/settings/edit.html.haml | 1 | ||||
-rw-r--r-- | app/views/layouts/auth.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/modal.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/public.html.haml | 2 | ||||
-rw-r--r-- | app/views/settings/exports/show.html.haml | 23 | ||||
-rw-r--r-- | app/views/user_mailer/backup_ready.html.haml | 59 | ||||
-rw-r--r-- | app/views/user_mailer/backup_ready.text.erb | 7 |
13 files changed, 182 insertions, 66 deletions
diff --git a/app/views/about/_forms.html.haml b/app/views/about/_forms.html.haml new file mode 100644 index 000000000..9916b6bf4 --- /dev/null +++ b/app/views/about/_forms.html.haml @@ -0,0 +1,14 @@ +- if @instance_presenter.open_registrations + = render 'registration' +- else + - if @instance_presenter.closed_registrations_message.blank? + %p= t('about.closed_registrations') + - else + = @instance_presenter.closed_registrations_message.html_safe + + = link_to t('auth.register'), 'https://joinmastodon.org', class: 'button button-primary' + +.separator-or + %span= t('auth.or') + += link_to t('auth.login'), new_user_session_path, class: 'button button-alternative-2 webapp-btn' diff --git a/app/views/about/_links.html.haml b/app/views/about/_links.html.haml index ccf4f08b9..f79c37e65 100644 --- a/app/views/about/_links.html.haml +++ b/app/views/about/_links.html.haml @@ -1,4 +1,4 @@ -.container.links +.container-alt.links .brand = link_to root_url do = image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon' diff --git a/app/views/about/_registration.html.haml b/app/views/about/_registration.html.haml index 7a28f9738..6ca1d7129 100644 --- a/app/views/about/_registration.html.haml +++ b/app/views/about/_registration.html.haml @@ -10,6 +10,6 @@ = 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 => 'off' } .actions - = f.button :button, t('auth.register'), type: :submit, class: 'button button-alternative' + = f.button :button, t('auth.register'), type: :submit, class: 'button button-primary' %p.hint.subtle-hint=t('auth.agreement_html', rules_path: about_more_path, terms_path: terms_path) diff --git a/app/views/about/more.html.haml b/app/views/about/more.html.haml index 84daadba8..f86051fbf 100644 --- a/app/views/about/more.html.haml +++ b/app/views/about/more.html.haml @@ -9,34 +9,34 @@ .header = render 'links' - .container.hero + .container-alt.hero .heading %h3= t('about.description_headline', domain: site_hostname) %p= @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname) .information-board - .container - .information-board-sections - .section + .container-alt + .information-board__sections + .information-board__section %span= t 'about.user_count_before' %strong= number_with_delimiter @instance_presenter.user_count %span= t 'about.user_count_after' - .section + .information-board__section %span= t 'about.status_count_before' %strong= number_with_delimiter @instance_presenter.status_count %span= t 'about.status_count_after' - .section + .information-board__section %span= t 'about.domain_count_before' %strong= number_with_delimiter @instance_presenter.domain_count %span= t 'about.domain_count_after' = render 'contact', contact: @instance_presenter .extended-description - .container + .container-alt = @instance_presenter.site_extended_description.html_safe.presence || t('about.extended_description_html') .footer-links - .container + .container-alt %p = link_to t('about.source_code'), @instance_presenter.source_url - if @instance_presenter.commit_hash == "" diff --git a/app/views/about/show.html.haml b/app/views/about/show.html.haml index 487c8429b..bc357e522 100644 --- a/app/views/about/show.html.haml +++ b/app/views/about/show.html.haml @@ -5,62 +5,74 @@ %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) = render partial: 'shared/og' -.landing-page - .header-wrapper - .mascot-container - = image_tag asset_pack_path('elephant-fren.png'), alt: '', role: 'presentation', class: 'mascot' +.landing-page.alternative + .container + .row + .column-4.hide-sm.show-xs.show-m + .landing-page__forms + .brand + = link_to root_url do + = image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon' - .header - = render 'links' + .hide-xs + = render 'forms' - .container.hero - .floats - %div{ role: 'presentation', class: 'float-1' } - %div{ role: 'presentation', class: 'float-2' } - %div{ role: 'presentation', class: 'float-3' } - .heading - %h1 - = @instance_presenter.site_title - %small= t 'about.hosted_on', domain: site_hostname - - if @instance_presenter.open_registrations - = render 'registration' - - else - .closed-registrations-message - %div - - if @instance_presenter.closed_registrations_message.blank? - %p= t('about.closed_registrations') - - else - = @instance_presenter.closed_registrations_message.html_safe + .column-7.column-9-sm + .landing-page__hero + = image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('preview.jpg'), alt: @instance_presenter.site_title - = simple_form_for(:user, html: { style: 'margin-left: -20px' }, url: session_path(:user)) do |f| - = f.input :email, autofocus: true, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email') } - = f.input :password, placeholder: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' } + .landing-page__information + .landing-page__short-description + .row + .landing-page__logo.hide-xs + = image_tag asset_pack_path('logo_transparent.svg'), alt: 'Mastodon' - .actions - = f.button :button, t('auth.login'), type: :submit - = link_to t('about.find_another_instance'), 'https://joinmastodon.org/', class: 'button button-alternative button--block' + %h1 + = @instance_presenter.site_title + %small!= t 'about.hosted_on', domain: content_tag(:span, site_hostname) - .about-short - .container - %h3= t('about.description_headline', domain: site_hostname) - %p= @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname) + %p= @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname) - .features - .container - - if Setting.timeline_preview - #mastodon-timeline{ data: { props: Oj.dump(default_props) } } + .show-xs + .landing-page__forms + = render 'forms' + .landing-page__call-to-action.hide-xs + .row + .column-5 + .landing-page__mascot + = image_tag asset_pack_path('elephant_ui_plane.svg') + .column-5 + .information-board__section + %span= t 'about.user_count_before' + %strong= number_with_delimiter @instance_presenter.user_count + %span= t 'about.user_count_after' + .column-5 + .information-board__section + %span= t 'about.status_count_before' + %strong= number_with_delimiter @instance_presenter.status_count + %span= t 'about.status_count_after' + .landing-page__information + .landing-page__features + %h3= t 'about.what_is_mastodon' + %p= t 'about.about_mastodon_html' - .about-mastodon - %h3= t 'about.what_is_mastodon' - %p= t 'about.about_mastodon_html' - = link_to t('about.learn_more'), 'https://joinmastodon.org/', class: 'button button-secondary' - = render 'features' - .footer-links - .container - %p - = link_to t('about.source_code'), @instance_presenter.source_url - - if @instance_presenter.commit_hash == "" - %strong= " (#{@instance_presenter.version_number})" - - else - %strong= " (#{@instance_presenter.version_number}, " - %strong= " #{@instance_presenter.commit_hash})" + = render 'features' + + .landing-page__features__action + = link_to t('about.learn_more'), 'https://joinmastodon.org/', class: 'button button-alternative' + + .landing-page__footer + %p + = link_to t('about.source_code'), @instance_presenter.source_url + = " (#{@instance_presenter.version_number})" + + .column-4.column-6-sm.column-flex + .show-sm.hide-xs + .landing-page__forms + .brand + = link_to root_url do + = image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon' + + = render 'forms' + - if Setting.timeline_preview + #mastodon-timeline{ data: { props: Oj.dump(default_props) } } diff --git a/app/views/about/terms.html.haml b/app/views/about/terms.html.haml index ba780759c..c7d36ed47 100644 --- a/app/views/about/terms.html.haml +++ b/app/views/about/terms.html.haml @@ -7,5 +7,5 @@ = render 'links' .extended-description - .container + .container-alt = @instance_presenter.site_terms.html_safe.presence || t('terms.body_html') diff --git a/app/views/admin/settings/edit.html.haml b/app/views/admin/settings/edit.html.haml index 73fd5642e..08d05d738 100644 --- a/app/views/admin/settings/edit.html.haml +++ b/app/views/admin/settings/edit.html.haml @@ -12,6 +12,7 @@ .fields-group = f.input :thumbnail, as: :file, wrapper: :with_block_label, label: t('admin.settings.thumbnail.title'), hint: t('admin.settings.thumbnail.desc_html') + = f.input :hero, as: :file, wrapper: :with_block_label, label: t('admin.settings.hero.title'), hint: t('admin.settings.hero.desc_html') %hr/ diff --git a/app/views/layouts/auth.html.haml b/app/views/layouts/auth.html.haml index f4812ac6a..ca9c13945 100644 --- a/app/views/layouts/auth.html.haml +++ b/app/views/layouts/auth.html.haml @@ -1,5 +1,5 @@ - content_for :content do - .container + .container-alt .logo-container %h1 = link_to root_path do diff --git a/app/views/layouts/modal.html.haml b/app/views/layouts/modal.html.haml index a5d79f5c0..e808593cd 100644 --- a/app/views/layouts/modal.html.haml +++ b/app/views/layouts/modal.html.haml @@ -8,7 +8,7 @@ = link_to destroy_user_session_path, method: :delete, class: 'logout-link icon-button' do = fa_icon 'sign-out' - .container= yield + .container-alt= yield .modal-layout__mastodon %div diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index b3795eaad..07441a77d 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -1,5 +1,5 @@ - content_for :content do - .container= yield + .container-alt= yield .footer - if !user_signed_in? && single_user_mode? %span.single-user-login diff --git a/app/views/settings/exports/show.html.haml b/app/views/settings/exports/show.html.haml index e0df1c480..89d768d3f 100644 --- a/app/views/settings/exports/show.html.haml +++ b/app/views/settings/exports/show.html.haml @@ -20,3 +20,26 @@ %th= t('exports.mutes') %td= @export.total_mutes %td= table_link_to 'download', t('exports.csv'), settings_exports_mutes_path(format: :csv) + +%p.muted-hint= t('exports.archive_takeout.hint_html') + +- if policy(:backup).create? + %p= link_to t('exports.archive_takeout.request'), settings_export_path, class: 'button', method: :post + +- unless @backups.empty? + .table-wrapper + %table.table + %thead + %tr + %th= t('exports.archive_takeout.date') + %th= t('exports.archive_takeout.size') + %th + %tbody + - @backups.each do |backup| + %tr + %td= l backup.created_at + - if backup.processed? + %td= number_to_human_size backup.dump_file_size + %td= table_link_to 'download', t('exports.archive_takeout.download'), backup.dump.url + - else + %td{ colspan: 2 }= t('exports.archive_takeout.in_progress') diff --git a/app/views/user_mailer/backup_ready.html.haml b/app/views/user_mailer/backup_ready.html.haml new file mode 100644 index 000000000..d5a4b8b48 --- /dev/null +++ b/app/views/user_mailer/backup_ready.html.haml @@ -0,0 +1,59 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.hero + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td + = image_tag full_pack_url('icon_file_download.png'), alt: '' + + %h1= t 'user_mailer.backup_ready.title' + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center + %p= t 'user_mailer.backup_ready.explanation' + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.button-cell + %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.button-primary + = link_to full_asset_url(@backup.dump.url) do + %span= t 'exports.archive_takeout.download' diff --git a/app/views/user_mailer/backup_ready.text.erb b/app/views/user_mailer/backup_ready.text.erb new file mode 100644 index 000000000..eb89e7d74 --- /dev/null +++ b/app/views/user_mailer/backup_ready.text.erb @@ -0,0 +1,7 @@ +<%= t 'user_mailer.backup_ready.title' %> + +=== + +<%= t 'user_mailer.backup_ready.explanation' %> + +=> <%= full_asset_url(@backup.dump.url) %> |