about summary refs log tree commit diff
path: root/app/views/about
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2018-02-02 18:32:21 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-02-02 10:32:21 +0100
commit5da5c65db8557abd7c6be15842189b9d83e85079 (patch)
treedbdf2657efdf420154fc16b0ef5c515042dac114 /app/views/about
parent0be9a1e3212b0b9918abe1536e51efe2fefa49f1 (diff)
Unify links container implementation in about pages (#6382)
They were redundant, and also had a inconsistency; the button for
"other instances" had an icon for the external link in "more" page, but
it didn't in the other pages.

This unifies the implementation, and the external link icon is now shown
in all the about pages.
Diffstat (limited to 'app/views/about')
-rw-r--r--app/views/about/_links.html.haml16
-rw-r--r--app/views/about/more.html.haml17
-rw-r--r--app/views/about/show.html.haml17
-rw-r--r--app/views/about/terms.html.haml14
4 files changed, 19 insertions, 45 deletions
diff --git a/app/views/about/_links.html.haml b/app/views/about/_links.html.haml
new file mode 100644
index 000000000..ccf4f08b9
--- /dev/null
+++ b/app/views/about/_links.html.haml
@@ -0,0 +1,16 @@
+.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 'https://joinmastodon.org/' do
+        = "#{t('about.other_instances')}"
+        %i.fa.fa-external-link{ style: 'padding-left: 5px;' }
diff --git a/app/views/about/more.html.haml b/app/views/about/more.html.haml
index b012606ce..9c9580eac 100644
--- a/app/views/about/more.html.haml
+++ b/app/views/about/more.html.haml
@@ -8,22 +8,7 @@
 .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 'https://joinmastodon.org/' do
-              = "#{t('about.other_instances')}"
-              %i.fa.fa-external-link{ style: 'padding-left: 5px;' }
+      = render 'links'
 
       .container.hero
         .heading
diff --git a/app/views/about/show.html.haml b/app/views/about/show.html.haml
index f8f90ce24..b7c08479d 100644
--- a/app/views/about/show.html.haml
+++ b/app/views/about/show.html.haml
@@ -12,22 +12,7 @@
       = image_tag asset_pack_path('elephant-fren.png'), alt: '', role: 'presentation', class: 'mascot'
 
     .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 'https://joinmastodon.org/' do
-              = "#{t('about.other_instances')}"
-              %i.fa.fa-external-link{ style: 'padding-left: 5px;' }
+      = render 'links'
 
       .container.hero
         .floats
diff --git a/app/views/about/terms.html.haml b/app/views/about/terms.html.haml
index 7004cb0b1..ba780759c 100644
--- a/app/views/about/terms.html.haml
+++ b/app/views/about/terms.html.haml
@@ -4,19 +4,7 @@
 .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/'
+      = render 'links'
 
   .extended-description
     .container