]> cat aescling's git repositories - mastodon.git/commitdiff
Unify links container implementation in about pages (#6382)
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Fri, 2 Feb 2018 09:32:21 +0000 (18:32 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 2 Feb 2018 09:32:21 +0000 (10:32 +0100)
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.

app/views/about/_links.html.haml [new file with mode: 0644]
app/views/about/more.html.haml
app/views/about/show.html.haml
app/views/about/terms.html.haml

diff --git a/app/views/about/_links.html.haml b/app/views/about/_links.html.haml
new file mode 100644 (file)
index 0000000..ccf4f08
--- /dev/null
@@ -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;' }
index b012606ce99620c666ffaaeddc7d84ddf6f6d357..9c9580eac2436c76a4e6af45fd2b9681f877e2cc 100644 (file)
@@ -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
index f8f90ce24319aba3e5f7def546f86accd6648bbd..b7c08479da01efbf52b646e1d0c3e5f9e5fa19e9 100644 (file)
       = 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
index 7004cb0b13f824bab014fac38befcece9e5b31d4..ba780759ce756eab5ce65e4cc046f7326f14a175 100644 (file)
@@ -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