diff --git a/app/assets/stylesheets/layout/social.scss b/app/assets/stylesheets/layout/social.scss index 8c78a7acc..a0b980bc0 100644 --- a/app/assets/stylesheets/layout/social.scss +++ b/app/assets/stylesheets/layout/social.scss @@ -1,4 +1,10 @@ .social { + @include grid-column; + text-align: right; + + @include breakpoint(medium) { + width: 1 * 100% / 3; + } li { display: inline-block; diff --git a/app/components/layout/social_component.html.erb b/app/components/layout/social_component.html.erb index 447a7d3c6..8476e0bcb 100644 --- a/app/components/layout/social_component.html.erb +++ b/app/components/layout/social_component.html.erb @@ -1,19 +1,14 @@ -
-
-
diff --git a/app/components/layout/social_component.rb b/app/components/layout/social_component.rb index accd15bc5..1391bd76a 100644 --- a/app/components/layout/social_component.rb +++ b/app/components/layout/social_component.rb @@ -10,6 +10,18 @@ class Layout::SocialComponent < ApplicationComponent youtube: "https://www.youtube.com", telegram: "https://www.telegram.me", instragram: "https://www.instagram.com" - } + }.select { |name, _| setting["#{name}_handle"] } + end + + def link_title(site_name) + t("shared.go_to_page") + link_text(site_name) + t("shared.target_blank") + end + + def link_text(site_name) + t("social.#{site_name}", org: setting["org_name"]) + end + + def footer_content_block + content_block("footer", I18n.locale) end end