Merge remote-tracking branch 'origin/master' into merge-upstream
Conflicts: README.md app/controllers/follower_accounts_controller.rb app/controllers/following_accounts_controller.rb app/serializers/rest/instance_serializer.rb app/views/stream_entries/_simple_status.html.haml config/locales/simple_form.ja.yml
This commit is contained in:
@ -7,51 +7,100 @@
|
||||
|
||||
.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'
|
||||
.grid
|
||||
.column-0
|
||||
.brand
|
||||
= link_to root_url do
|
||||
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
|
||||
|
||||
.hide-xs
|
||||
= render 'forms'
|
||||
|
||||
.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
|
||||
|
||||
.landing-page__information
|
||||
.landing-page__short-description
|
||||
.row
|
||||
.landing-page__logo.hide-xs
|
||||
= image_tag asset_pack_path('logo_transparent.svg'), alt: 'Mastodon'
|
||||
|
||||
%h1
|
||||
= @instance_presenter.site_title
|
||||
%small!= t 'about.hosted_on', domain: content_tag(:span, site_hostname)
|
||||
|
||||
%p= @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname)
|
||||
|
||||
.show-xs
|
||||
- if Setting.timeline_preview
|
||||
.column-1
|
||||
.landing-page__forms
|
||||
.brand
|
||||
= link_to root_url do
|
||||
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
|
||||
|
||||
= 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
|
||||
|
||||
- else
|
||||
.column-1.non-preview
|
||||
.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
|
||||
.column-2
|
||||
.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
|
||||
|
||||
.landing-page__information
|
||||
.landing-page__short-description
|
||||
.row
|
||||
.landing-page__logo
|
||||
= image_tag asset_pack_path('logo_transparent.svg'), alt: 'Mastodon'
|
||||
|
||||
%h1
|
||||
= @instance_presenter.site_title
|
||||
%small!= t 'about.hosted_on', domain: content_tag(:span, site_hostname)
|
||||
|
||||
%p= @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname)
|
||||
|
||||
.landing-page__call-to-action
|
||||
.row
|
||||
.row__information-board
|
||||
.information-board__section
|
||||
%span= t 'about.user_count_before'
|
||||
%strong= number_with_delimiter @instance_presenter.user_count
|
||||
%span= t 'about.user_count_after'
|
||||
.information-board__section
|
||||
%span= t 'about.status_count_before'
|
||||
%strong= number_with_delimiter @instance_presenter.status_count
|
||||
%span= t 'about.status_count_after'
|
||||
.row__mascot
|
||||
.landing-page__mascot
|
||||
= image_tag asset_pack_path('elephant_ui_plane.svg')
|
||||
|
||||
- else
|
||||
.column-2.non-preview
|
||||
.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
|
||||
|
||||
.landing-page__information
|
||||
.landing-page__short-description
|
||||
.row
|
||||
.landing-page__logo
|
||||
= image_tag asset_pack_path('logo_transparent.svg'), alt: 'Mastodon'
|
||||
|
||||
%h1
|
||||
= @instance_presenter.site_title
|
||||
%small!= t 'about.hosted_on', domain: content_tag(:span, site_hostname)
|
||||
|
||||
%p= @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname)
|
||||
|
||||
.landing-page__call-to-action
|
||||
.row
|
||||
.row__information-board
|
||||
.information-board__section
|
||||
%span= t 'about.user_count_before'
|
||||
%strong= number_with_delimiter @instance_presenter.user_count
|
||||
%span= t 'about.user_count_after'
|
||||
.information-board__section
|
||||
%span= t 'about.status_count_before'
|
||||
%strong= number_with_delimiter @instance_presenter.status_count
|
||||
%span= t 'about.status_count_after'
|
||||
.row__mascot
|
||||
.landing-page__mascot
|
||||
= image_tag asset_pack_path('elephant_ui_plane.svg')
|
||||
|
||||
- if Setting.timeline_preview
|
||||
.column-3
|
||||
#mastodon-timeline{ data: { props: Oj.dump(default_props) } }
|
||||
|
||||
- if Setting.timeline_preview
|
||||
.column-4.landing-page__information
|
||||
.landing-page__features
|
||||
%h3= t 'about.what_is_mastodon'
|
||||
%p= t 'about.about_mastodon_html'
|
||||
@ -66,13 +115,18 @@
|
||||
= 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'
|
||||
- else
|
||||
.column-4.non-preview.landing-page__information
|
||||
.landing-page__features
|
||||
%h3= t 'about.what_is_mastodon'
|
||||
%p= t 'about.about_mastodon_html'
|
||||
|
||||
= render 'forms'
|
||||
- if Setting.timeline_preview
|
||||
#mastodon-timeline{ data: { props: Oj.dump(default_props) } }
|
||||
= 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})"
|
||||
|
23
app/views/accounts/_follow_button.html.haml
Normal file
23
app/views/accounts/_follow_button.html.haml
Normal file
@ -0,0 +1,23 @@
|
||||
- relationships ||= nil
|
||||
|
||||
- unless account.memorial? || account.moved?
|
||||
- if user_signed_in?
|
||||
- requested = relationships ? relationships.requested[account.id].present? : current_account.requested?(account)
|
||||
- following = relationships ? relationships.following[account.id].present? : current_account.following?(account)
|
||||
|
||||
- if user_signed_in? && current_account.id != account.id && !requested
|
||||
.controls
|
||||
- if following
|
||||
= link_to account_unfollow_path(account), data: { method: :post }, class: 'icon-button' do
|
||||
= fa_icon 'user-times'
|
||||
= t('accounts.unfollow')
|
||||
- else
|
||||
= link_to account_follow_path(account), data: { method: :post }, class: 'icon-button' do
|
||||
= fa_icon 'user-plus'
|
||||
= t('accounts.follow')
|
||||
- elsif !user_signed_in?
|
||||
.controls
|
||||
.remote-follow
|
||||
= link_to account_remote_follow_path(account), class: 'icon-button' do
|
||||
= fa_icon 'user-plus'
|
||||
= t('accounts.remote_follow')
|
@ -1,9 +1,12 @@
|
||||
.account-grid-card
|
||||
.account-grid-card__header{ style: "background-image: url(#{account.header.url(:original)})" }
|
||||
= render 'accounts/follow_button', account: account, relationships: @relationships
|
||||
.account-grid-card__avatar
|
||||
.avatar= image_tag account.avatar.url(:original)
|
||||
.name
|
||||
= link_to TagManager.instance.url_for(account) do
|
||||
%span.display_name.emojify= display_name(account)
|
||||
%span.username @#{account.acct}
|
||||
%p.note.emojify= truncate(strip_tags(account.note), length: 150)
|
||||
%span.username
|
||||
@#{account.local? ? account.local_username_and_domain : account.acct}
|
||||
= fa_icon('lock') if account.locked?
|
||||
.account__header__content.p-note.emojify= Formatter.instance.simplified_format(account)
|
||||
|
@ -1,24 +1,7 @@
|
||||
- processed_bio = FrontmatterHandler.instance.process_bio Formatter.instance.simplified_format account
|
||||
.card.h-card.p-author{ style: "background-image: url(#{account.header.url(:original)})" }
|
||||
.card__illustration
|
||||
- unless account.memorial? || account.moved?
|
||||
- if user_signed_in? && current_account.id != account.id && !current_account.requested?(account)
|
||||
.controls
|
||||
- if current_account.following?(account)
|
||||
= link_to account_unfollow_path(account), data: { method: :post }, class: 'icon-button' do
|
||||
= fa_icon 'user-times'
|
||||
= t('accounts.unfollow')
|
||||
- else
|
||||
= link_to account_follow_path(account), data: { method: :post }, class: 'icon-button' do
|
||||
= fa_icon 'user-plus'
|
||||
= t('accounts.follow')
|
||||
- elsif !user_signed_in?
|
||||
.controls
|
||||
.remote-follow
|
||||
= link_to account_remote_follow_path(account), class: 'icon-button' do
|
||||
= fa_icon 'user-plus'
|
||||
= t('accounts.remote_follow')
|
||||
|
||||
= render 'accounts/follow_button', account: account
|
||||
.avatar= image_tag account.avatar.url(:original), class: 'u-photo'
|
||||
|
||||
.card__bio
|
||||
|
@ -39,6 +39,9 @@
|
||||
|
||||
= render partial: 'stream_entries/status', collection: @statuses, as: :status
|
||||
|
||||
- if @statuses.size == 20
|
||||
- if @newer_url || @older_url
|
||||
.pagination
|
||||
= link_to safe_join([t('pagination.next'), fa_icon('chevron-right')], ' '), @next_url, class: 'next', rel: 'next'
|
||||
- if @older_url
|
||||
= link_to safe_join([fa_icon('chevron-left'), t('pagination.older')], ' '), @older_url, class: 'older', rel: 'older'
|
||||
- if @newer_url
|
||||
= link_to safe_join([t('pagination.newer'), fa_icon('chevron-right')], ' '), @newer_url, class: 'newer', rel: 'newer'
|
||||
|
@ -4,7 +4,7 @@
|
||||
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
|
||||
= render 'shared/error_messages', object: resource
|
||||
|
||||
- if !use_pam? || resource.encrypted_password.present?
|
||||
- if !use_seamless_external_login?? || resource.encrypted_password.present?
|
||||
= f.input :reset_password_token, as: :hidden
|
||||
|
||||
= f.input :password, autofocus: true, placeholder: t('simple_form.labels.defaults.new_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.new_password'), :autocomplete => 'off' }
|
||||
@ -13,6 +13,6 @@
|
||||
.actions
|
||||
= f.button :button, t('auth.set_new_password'), type: :submit
|
||||
- else
|
||||
= t('simple_form.labels.defaults.pam_account')
|
||||
%p.hint= t('users.seamless_external_login')
|
||||
|
||||
.form-footer= render 'auth/shared/links'
|
||||
|
@ -4,7 +4,7 @@
|
||||
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'auth_edit' }) do |f|
|
||||
= render 'shared/error_messages', object: resource
|
||||
|
||||
- if !use_pam? || resource.encrypted_password.present?
|
||||
- if !use_seamless_external_login? || resource.encrypted_password.present?
|
||||
= f.input :email, placeholder: t('simple_form.labels.defaults.email'), input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }
|
||||
= f.input :password, placeholder: t('simple_form.labels.defaults.new_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.new_password'), :autocomplete => 'off' }
|
||||
= f.input :password_confirmation, placeholder: t('simple_form.labels.defaults.confirm_new_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.confirm_new_password'), :autocomplete => 'off' }
|
||||
@ -13,7 +13,7 @@
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
- else
|
||||
= t('simple_form.labels.defaults.pam_account')
|
||||
%p.hint= t('users.seamless_external_login')
|
||||
|
||||
%hr/
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
= render partial: 'shared/og'
|
||||
|
||||
= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
||||
- if use_pam?
|
||||
- if use_seamless_external_login?
|
||||
= f.input :email, autofocus: true, placeholder: t('simple_form.labels.defaults.username_or_email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.username_or_email') }
|
||||
- else
|
||||
= f.input :email, autofocus: true, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }
|
||||
|
@ -4,7 +4,7 @@
|
||||
= simple_form_for current_user, url: settings_preferences_path, html: { method: :put } do |f|
|
||||
= render 'shared/error_messages', object: current_user
|
||||
|
||||
.actions
|
||||
.actions.actions--top
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
||||
%h4= t 'preferences.languages'
|
||||
|
@ -22,7 +22,7 @@
|
||||
- if !status.media_attachments.empty?
|
||||
- if status.media_attachments.first.video?
|
||||
- video = status.media_attachments.first
|
||||
%div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 670, height: 380, detailed: true) }}
|
||||
%div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, width: 670, height: 380, detailed: true, inline: true) }}
|
||||
- else
|
||||
%div{ data: { component: 'MediaGallery', props: Oj.dump(height: 380, sensitive: status.sensitive? && !current_account&.user&.setting_display_sensitive_media, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}
|
||||
- elsif status.preview_cards.first
|
||||
|
@ -20,7 +20,6 @@
|
||||
%a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
|
||||
.e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }<
|
||||
= Formatter.instance.format(status, custom_emojify: true)
|
||||
|
||||
- unless status.media_attachments.empty?
|
||||
- if status.media_attachments.first.video?
|
||||
- video = status.media_attachments.first
|
||||
|
25
app/views/tags/_features.html.haml
Normal file
25
app/views/tags/_features.html.haml
Normal file
@ -0,0 +1,25 @@
|
||||
.features-list
|
||||
.features-list__row
|
||||
.text
|
||||
%h6= t 'about.features.real_conversation_title'
|
||||
= t 'about.features.real_conversation_body'
|
||||
.visual
|
||||
= fa_icon 'fw comments'
|
||||
.features-list__row
|
||||
.text
|
||||
%h6= t 'about.features.not_a_product_title'
|
||||
= t 'about.features.not_a_product_body'
|
||||
.visual
|
||||
= fa_icon 'fw users'
|
||||
.features-list__row
|
||||
.text
|
||||
%h6= t 'about.features.within_reach_title'
|
||||
= t 'about.features.within_reach_body'
|
||||
.visual
|
||||
= fa_icon 'fw mobile'
|
||||
.features-list__row
|
||||
.text
|
||||
%h6= t 'about.features.humane_approach_title'
|
||||
= t 'about.features.humane_approach_body'
|
||||
.visual
|
||||
= fa_icon 'fw leaf'
|
@ -5,48 +5,31 @@
|
||||
%script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
|
||||
= render 'og'
|
||||
|
||||
.landing-page.tag-page
|
||||
.landing-page.tag-page.alternative
|
||||
.features
|
||||
.container
|
||||
#mastodon-timeline{ data: { props: Oj.dump(default_props.merge(hashtag: @tag.name)) } }
|
||||
.grid
|
||||
.column-1
|
||||
#mastodon-timeline{ data: { props: Oj.dump(default_props.merge(hashtag: @tag.name)) } }
|
||||
|
||||
.about-mastodon
|
||||
.about-hashtag
|
||||
.brand
|
||||
= link_to root_url do
|
||||
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
|
||||
.column-2
|
||||
.about-mastodon
|
||||
.about-hashtag.landing-page__information
|
||||
.brand
|
||||
= link_to root_url do
|
||||
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
|
||||
|
||||
%p= t 'about.about_hashtag_html', hashtag: @tag.name
|
||||
%p= t 'about.about_hashtag_html', hashtag: @tag.name
|
||||
|
||||
.cta
|
||||
- if user_signed_in?
|
||||
= link_to t('settings.back'), root_path, class: 'button button-secondary'
|
||||
- else
|
||||
= link_to t('auth.login'), new_user_session_path, class: 'button button-secondary'
|
||||
= link_to t('about.learn_more'), about_path, class: 'button button-alternative'
|
||||
.cta
|
||||
- if user_signed_in?
|
||||
= link_to t('settings.back'), root_path, class: 'button button-secondary'
|
||||
- else
|
||||
= link_to t('auth.login'), new_user_session_path, class: 'button button-secondary'
|
||||
= link_to t('about.learn_more'), about_path, class: 'button button-alternative'
|
||||
|
||||
.features-list
|
||||
.features-list__row
|
||||
.text
|
||||
%h6= t 'about.features.real_conversation_title'
|
||||
= t 'about.features.real_conversation_body'
|
||||
.visual
|
||||
= fa_icon 'fw comments'
|
||||
.features-list__row
|
||||
.text
|
||||
%h6= t 'about.features.not_a_product_title'
|
||||
= t 'about.features.not_a_product_body'
|
||||
.visual
|
||||
= fa_icon 'fw users'
|
||||
.features-list__row
|
||||
.text
|
||||
%h6= t 'about.features.within_reach_title'
|
||||
= t 'about.features.within_reach_body'
|
||||
.visual
|
||||
= fa_icon 'fw mobile'
|
||||
.features-list__row
|
||||
.text
|
||||
%h6= t 'about.features.humane_approach_title'
|
||||
= t 'about.features.humane_approach_body'
|
||||
.visual
|
||||
= fa_icon 'fw leaf'
|
||||
.landing-page__features.landing-page__information
|
||||
%h3= t 'about.what_is_mastodon'
|
||||
%p= t 'about.about_mastodon_html'
|
||||
|
||||
= render 'features'
|
||||
|
Reference in New Issue
Block a user