From c9fd6f386c5ae0938f1f9c2d1134508e66231e23 Mon Sep 17 00:00:00 2001 From: TheInventrix Date: Mon, 7 Aug 2017 17:50:15 -0600 Subject: unify short description styling (#4548) apply same style class to the About description on both the landing page and the about/more page --- app/views/about/more.html.haml | 9 +++++---- app/views/about/show.html.haml | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'app/views/about') diff --git a/app/views/about/more.html.haml b/app/views/about/more.html.haml index 6342c7248..189b3bf1e 100644 --- a/app/views/about/more.html.haml +++ b/app/views/about/more.html.haml @@ -35,9 +35,10 @@ %i.fa.fa-external-link{ style: 'padding-left: 5px;' } .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) + .about-short + .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 @@ -64,4 +65,4 @@ .container %p = link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon' - = " (#{@instance_presenter.version_number})" + = " (#{@instance_presenter.version_number})" \ No newline at end of file diff --git a/app/views/about/show.html.haml b/app/views/about/show.html.haml index d0c9a6650..acdb12ad7 100644 --- a/app/views/about/show.html.haml +++ b/app/views/about/show.html.haml @@ -58,7 +58,7 @@ = @instance_presenter.closed_registrations_message.html_safe = link_to t('about.find_another_instance'), 'https://joinmastodon.org/', class: 'button button-alternative button--block' - .learn-more-cta + .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) @@ -77,4 +77,4 @@ .container %p = link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon' - = " (#{@instance_presenter.version_number})" + = " (#{@instance_presenter.version_number})" \ No newline at end of file -- cgit From dcbc1af38a3ddc289783d9e9021690692bc1438e Mon Sep 17 00:00:00 2001 From: Lynx Kotoura Date: Tue, 8 Aug 2017 22:49:32 +0900 Subject: Fix short description in about/more page (#4554) --- app/views/about/more.html.haml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/views/about') diff --git a/app/views/about/more.html.haml b/app/views/about/more.html.haml index 189b3bf1e..a6fd265fa 100644 --- a/app/views/about/more.html.haml +++ b/app/views/about/more.html.haml @@ -35,10 +35,9 @@ %i.fa.fa-external-link{ style: 'padding-left: 5px;' } .container.hero - .about-short - .heading - %h3= t('about.description_headline', domain: site_hostname) - %p= @instance_presenter.site_description.html_safe.presence || t('about.generic_description', domain: site_hostname) + .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 -- cgit From 696c2c6f2f3338df121cf17389478da9ecab11af Mon Sep 17 00:00:00 2001 From: Daigo 3 Dango Date: Tue, 22 Aug 2017 20:54:19 +0000 Subject: Add Mastodon::Source.url (#4643) * Add Mastodon::Source.url * Update spec * Refactor Move things frmo Mastodon::Source to Mastodon::Version --- app/presenters/instance_presenter.rb | 4 ++++ app/views/about/more.html.haml | 4 ++-- app/views/about/show.html.haml | 4 ++-- lib/mastodon/version.rb | 17 +++++++++++++++++ spec/views/about/show.html.haml_spec.rb | 1 + 5 files changed, 26 insertions(+), 4 deletions(-) (limited to 'app/views/about') diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb index 5d5be58ba..8104b7531 100644 --- a/app/presenters/instance_presenter.rb +++ b/app/presenters/instance_presenter.rb @@ -31,4 +31,8 @@ class InstancePresenter def version_number Mastodon::Version end + + def source_url + Mastodon::Version.source_url + end end diff --git a/app/views/about/more.html.haml b/app/views/about/more.html.haml index a6fd265fa..094188472 100644 --- a/app/views/about/more.html.haml +++ b/app/views/about/more.html.haml @@ -63,5 +63,5 @@ .footer-links .container %p - = link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon' - = " (#{@instance_presenter.version_number})" \ No newline at end of file + = link_to t('about.source_code'), @instance_presenter.source_url + = " (#{@instance_presenter.version_number})" diff --git a/app/views/about/show.html.haml b/app/views/about/show.html.haml index acdb12ad7..93270fe3d 100644 --- a/app/views/about/show.html.haml +++ b/app/views/about/show.html.haml @@ -76,5 +76,5 @@ .footer-links .container %p - = link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon' - = " (#{@instance_presenter.version_number})" \ No newline at end of file + = link_to t('about.source_code'), @instance_presenter.source_url + = " (#{@instance_presenter.version_number})" diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 381e9aac9..fcca875d9 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -31,5 +31,22 @@ module Mastodon def to_s [to_a.join('.'), flags].join end + + def source_base_url + 'https://github.com/tootsuite/mastodon' + end + + # specify git tag or commit hash here + def source_tag + nil + end + + def source_url + if source_tag + "#{source_base_url}/tree/#{source_tag}" + else + source_base_url + end + end end end diff --git a/spec/views/about/show.html.haml_spec.rb b/spec/views/about/show.html.haml_spec.rb index c0ead6349..aa151dd27 100644 --- a/spec/views/about/show.html.haml_spec.rb +++ b/spec/views/about/show.html.haml_spec.rb @@ -13,6 +13,7 @@ describe 'about/show.html.haml', without_verify_partial_doubles: true do site_title: 'something', site_description: 'something', version_number: '1.0', + source_url: 'https://github.com/tootsuite/mastodon', open_registrations: false, closed_registrations_message: 'yes') assign(:instance_presenter, instance_presenter) -- cgit