Merge git://github.com/tootsuite/mastodon into tootsuite-master

This commit is contained in:
Ondřej Hruška
2017-07-25 21:36:22 +02:00
139 changed files with 1196 additions and 758 deletions

View File

@@ -1,5 +1,8 @@
.panel
.panel-header= t 'about.contact'
.panel-header
= succeed ':' do
= t 'about.contact'
%span{ title: contact.site_contact_email.presence }= contact.site_contact_email.presence
.panel-body
- if contact.contact_account
.owner
@@ -8,8 +11,9 @@
= link_to TagManager.instance.url_for(contact.contact_account) do
%span.display_name.emojify= display_name(contact.contact_account)
%span.username @#{contact.contact_account.acct}
- unless contact.site_contact_email.blank?
.contact-email
= t 'about.business_email'
%strong= contact.site_contact_email
- else
.owner
.avatar= image_tag full_asset_url('avatars/original/missing.png', skip_pipeline: true)
.name
%span.display_name= t 'about.contact_missing'
%span.username= t 'about.contact_unavailable'

View File

@@ -1,12 +0,0 @@
.panel
.panel-header= t 'about.links'
.panel-list
%ul
- if user_signed_in?
%li= link_to t('about.get_started'), root_path
- else
- if instance.open_registrations
%li= link_to t('about.get_started'), new_user_registration_path
%li= link_to t('auth.login'), new_user_session_path
%li= link_to t('about.terms'), terms_path
%li= link_to t('about.source_code'), 'https://github.com/chronister/mastodon'

View File

@@ -1,9 +0,0 @@
.panel
.panel-header= t 'about.version'
.panel-body
- if @instance_presenter.commit_hash == ""
%strong= version.version_number
- else
%strong= version.version_number
%strong= "#{@instance_presenter.commit_hash}"

View File

@@ -1,16 +1,44 @@
- content_for :page_title do
= site_hostname
.wrapper.thicc
.sidebar-layout
.main
.panel
%h2= site_hostname
- content_for :header_tags do
= javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
- unless @instance_presenter.site_description.blank?
%p!= @instance_presenter.site_description
%meta{ property: 'og:site_name', content: site_title }/
%meta{ property: 'og:url', content: about_url }/
%meta{ property: 'og:type', content: 'website' }/
%meta{ property: 'og:title', content: site_hostname }/
%meta{ property: 'og:description', content: strip_tags(@instance_presenter.site_description.presence || t('about.about_mastodon_html')) }/
%meta{ property: 'og:image', content: asset_pack_path('mastodon_small.jpg', protocol: :request) }/
%meta{ property: 'og:image:width', content: '400' }/
%meta{ property: 'og:image:height', content: '400' }/
%meta{ property: 'twitter:card', content: 'summary' }/
.information-board
.landing-page
.header-wrapper.compact
.header
.container.links
.brand
= link_to root_url do
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
%ul.nav
%li
- if user_signed_in?
= link_to t('settings.back'), root_url, class: 'webapp-btn'
- else
= link_to t('auth.login'), new_user_session_path, class: 'webapp-btn'
%li= link_to t('about.about_this'), about_more_path
%li= link_to t('about.other_instances'), 'https://joinmastodon.org/'
.container.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
%span= t 'about.user_count_before'
%strong= number_with_delimiter @instance_presenter.user_count
@@ -23,11 +51,14 @@
%span= t 'about.domain_count_before'
%strong= number_with_delimiter @instance_presenter.domain_count
%span= t 'about.domain_count_after'
- unless @instance_presenter.site_extended_description.blank?
.panel!= @instance_presenter.site_extended_description
.sidebar
= render 'contact', contact: @instance_presenter
= render 'links', instance: @instance_presenter
= render 'version', version: @instance_presenter
.extended-description
.container
= @instance_presenter.site_extended_description.html_safe.presence || t('about.extended_description_html')
.footer-links
.container
%p
= link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon'
= " (#{@instance_presenter.version_number})"

View File

@@ -24,8 +24,7 @@
.container.links
.brand
= link_to root_url do
= image_tag asset_pack_path('logo.svg'), alt: '', role: 'presentation'
Mastodon
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
%ul.nav
%li

View File

@@ -1,8 +1,23 @@
- content_for :page_title do
= t('terms.title', instance: site_hostname)
.wrapper
- if @instance_presenter.site_terms.present?
= raw @instance_presenter.site_terms
- else
= t('terms.body_html')
.landing-page
.header-wrapper.compact
.header
.container.links
.brand
= link_to root_url do
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
%ul.nav
%li
- if user_signed_in?
= link_to t('settings.back'), root_url, class: 'webapp-btn'
- else
= link_to t('auth.login'), new_user_session_path, class: 'webapp-btn'
%li= link_to t('about.about_this'), about_more_path
%li= link_to t('about.other_instances'), 'https://joinmastodon.org/'
.extended-description
.container
= @instance_presenter.site_terms.html_safe.presence || t('terms.body_html')

View File

@@ -23,9 +23,9 @@
.accounts-grid
= render 'nothing_here'
- else
.activity-stream
.activity-stream.with-header
= render partial: 'stream_entries/status', collection: @statuses, as: :status
.pagination
- if @statuses.size == 20
- if @statuses.size == 20
.pagination
= link_to safe_join([t('pagination.next'), fa_icon('chevron-right')], ' '), short_account_url(@account, max_id: @statuses.last.id), class: 'next', rel: 'next'

View File

@@ -3,13 +3,18 @@
= simple_form_for @domain_block, url: admin_domain_block_path(@domain_block), method: :delete do |f|
= f.input :retroactive,
as: :boolean,
wrapper: :with_label,
label: t(".retroactive.#{@domain_block.severity}"),
hint: t(:affected_accounts,
scope: [:admin, :domain_blocks, :show],
count: @domain_block.accounts_count)
- if (@domain_block.noop?)
= f.input :retroactive,
as: :hidden,
input_html: { :value => "0" }
- else
= f.input :retroactive,
as: :boolean,
wrapper: :with_label,
label: t(".retroactive.#{@domain_block.severity}"),
hint: t(:affected_accounts,
scope: [:admin, :domain_blocks, :show],
count: @domain_block.accounts_count)
.actions
= f.button :button, t('.undo'), type: :submit

View File

@@ -7,6 +7,7 @@
.app-holder#mastodon{ data: { props: Oj.dump(default_props) } }
%noscript
= image_tag asset_pack_path('logo.png')
= image_tag asset_pack_path('logo.svg'), alt: 'Mastodon'
%div
= t('errors.noscript')

View File

@@ -6,7 +6,7 @@
.sidebar-wrapper
.sidebar
= link_to root_path do
= image_tag asset_pack_path('logo.png'), class: 'logo'
= image_tag asset_pack_path('logo.svg'), class: 'logo', alt: 'Mastodon'
= render_navigation
.content-wrapper

View File

@@ -6,8 +6,7 @@
.logo-container
%h1
= link_to root_path do
= image_tag asset_pack_path('logo.svg')
Mastodon
= image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
.form-container
= render 'flashes'

View File

@@ -2,7 +2,7 @@ object false
node(:name) { Setting.site_title }
node(:short_name) { Setting.site_title }
node(:description) { strip_tags(Setting.site_description.presence || I18n.t('about.about_mastodon')) }
node(:description) { strip_tags(Setting.site_description.presence || I18n.t('about.about_mastodon_html')) }
node(:icons) { [{ src: '/android-chrome-192x192.png', sizes: '192x192', type: 'image/png' }] }
node(:theme_color) { '#282c37' }
node(:background_color) { '#d9e1e8' }

View File

@@ -8,7 +8,7 @@ end
node(:links) do
[
{ rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: account_url(@account) },
{ rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: short_account_url(@account) },
{ rel: 'http://schemas.google.com/g/2010#updates-from', type: 'application/atom+xml', href: account_url(@account, format: 'atom') },
{ rel: 'self', type: 'application/activity+json', href: account_url(@account) },
{ rel: 'salmon', href: api_salmon_url(@account.id) },

View File

@@ -3,7 +3,7 @@ Nokogiri::XML::Builder.new do |xml|
xml.Subject @canonical_account_uri
xml.Alias short_account_url(@account)
xml.Alias account_url(@account)
xml.Link(rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: TagManager.instance.url_for(@account))
xml.Link(rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: short_account_url(@account))
xml.Link(rel: 'http://schemas.google.com/g/2010#updates-from', type: 'application/atom+xml', href: account_url(@account, format: 'atom'))
xml.Link(rel: 'self', type: 'application/activity+json', href: account_url(@account))
xml.Link(rel: 'salmon', href: api_salmon_url(@account.id))