From 799d35f187d1770b8899818c9ac24c4905537e34 Mon Sep 17 00:00:00 2001 From: Konrad Date: Mon, 1 Mar 2021 20:44:22 +0100 Subject: [PATCH 1/9] Updated stylesheets for clean footer Updated the stylesheets to have precise alignment fo elements and consistent font sizes throughout the front-end footer. --- app/assets/stylesheets/darkswarm/footer.scss | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/footer.scss b/app/assets/stylesheets/darkswarm/footer.scss index 9826970141..4893489635 100644 --- a/app/assets/stylesheets/darkswarm/footer.scss +++ b/app/assets/stylesheets/darkswarm/footer.scss @@ -5,7 +5,7 @@ footer { .row { p a { - font-size: 0.875rem; + font-size: 1rem; } a, a * { @@ -108,8 +108,8 @@ footer { } .social-icons { - margin-bottom: 0.25rem; - margin-top: 0.75rem; + margin-bottom: 0.9rem; + padding-top: 0.1rem; a { i { @@ -128,5 +128,9 @@ footer { } } } + + .legal a { + font-size: 0.875rem; + } } } From 3d8cfc4ccd5fa9aa942288cbce368f0769ef7062 Mon Sep 17 00:00:00 2001 From: Konrad Date: Mon, 1 Mar 2021 20:47:36 +0100 Subject: [PATCH 2/9] Updated footer for clean footer Updated the footer to have precise alignment of elements and consistent font sizes throughout the front-end footer. --- app/views/shared/_footer.html.haml | 50 +++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml index 2ba6278bec..dd7cd4a21c 100644 --- a/app/views/shared/_footer.html.haml +++ b/app/views/shared/_footer.html.haml @@ -31,25 +31,26 @@ // This is the instance-managed set of links: %h4 = t '.footer_contact_headline' - %p.social-icons - - if ContentConfig.footer_facebook_url.present? - %a{href: ContentConfig.footer_facebook_url} - %i.ofn-i_044-facebook - - if ContentConfig.footer_twitter_url.present? - %a{href: ContentConfig.footer_twitter_url} - %i.ofn-i_041-twitter - - if ContentConfig.footer_instagram_url.present? - %a{href: ContentConfig.footer_instagram_url} - %i.ofn-i_043-instagram - - if ContentConfig.footer_linkedin_url.present? - %a{href: ContentConfig.footer_linkedin_url} - %i.ofn-i_042-linkedin - - if ContentConfig.footer_googleplus_url.present? - %a{href: ContentConfig.footer_googleplus_url} - %i.ofn-i_046-g - - if ContentConfig.footer_pinterest_url.present? - %a{href: ContentConfig.footer_pinterest_url} - %i.ofn-i_045-pintrest + - if ContentConfig.footer_facebook_url.present? || ContentConfig.footer_twitter_url.present? || ContentConfig.footer_instagram_url.present? || ContentConfig.footer_linkedin_url.present? || ContentConfig.footer_googleplus_url.present? || ContentConfig.footer_pinterest_url.present? + %p.social-icons + - if ContentConfig.footer_facebook_url.present? + %a{href: ContentConfig.footer_facebook_url} + %i.ofn-i_044-facebook + - if ContentConfig.footer_twitter_url.present? + %a{href: ContentConfig.footer_twitter_url} + %i.ofn-i_041-twitter + - if ContentConfig.footer_instagram_url.present? + %a{href: ContentConfig.footer_instagram_url} + %i.ofn-i_043-instagram + - if ContentConfig.footer_linkedin_url.present? + %a{href: ContentConfig.footer_linkedin_url} + %i.ofn-i_042-linkedin + - if ContentConfig.footer_googleplus_url.present? + %a{href: ContentConfig.footer_googleplus_url} + %i.ofn-i_046-g + - if ContentConfig.footer_pinterest_url.present? + %a{href: ContentConfig.footer_pinterest_url} + %i.ofn-i_045-pintrest - if ContentConfig.footer_email.present? %p %a{href: ContentConfig.footer_email.reverse, mailto: true, target: '_blank'} @@ -92,7 +93,7 @@ %hr.hr-light %br - .row + .row.legal .small-12.medium-3.medium-offset-2.columns.text-left %a{href: main_app.root_path} %img{src: ContentConfig.footer_logo.url, width: "220"} @@ -107,10 +108,9 @@ %p.text-small = t '.footer_legal_text_html', {content_license: link_to('CC BY-SA 3.0', 'https://creativecommons.org/licenses/by-sa/3.0/'), code_license: link_to('AGPL 3', 'https://tldrlegal.com/license/gnu-affero-general-public-license-v3-(agpl-3.0)' )} %p.text-small - %div - - if Spree::Config.privacy_policy_url.present? - = t '.footer_data_text_with_privacy_policy_html', {cookies_policy: cookies_policy_link.html_safe, privacy_policy: privacy_policy_link.html_safe } - - else - = t '.footer_data_text_without_privacy_policy_html', {cookies_policy: cookies_policy_link.html_safe } + - if Spree::Config.privacy_policy_url.present? + = t '.footer_data_text_with_privacy_policy_html', {cookies_policy: cookies_policy_link.html_safe, privacy_policy: privacy_policy_link.html_safe } + - else + = t '.footer_data_text_without_privacy_policy_html', {cookies_policy: cookies_policy_link.html_safe } .medium-2.columns.text-center / Placeholder From 553954f8bf4aa73ac3f41265c849457b948c89a7 Mon Sep 17 00:00:00 2001 From: Konrad Date: Wed, 3 Mar 2021 20:35:16 +0100 Subject: [PATCH 3/9] Removed "footer .row a" and added "#secure" --- app/assets/stylesheets/darkswarm/footer.scss | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/footer.scss b/app/assets/stylesheets/darkswarm/footer.scss index 4893489635..e63f7f8c5b 100644 --- a/app/assets/stylesheets/darkswarm/footer.scss +++ b/app/assets/stylesheets/darkswarm/footer.scss @@ -4,7 +4,7 @@ footer { .row { - p a { + p { font-size: 1rem; } @@ -107,6 +107,11 @@ footer { color: rgba($disabled-med, 0.35); } + #secure { + font-size: 1.5rem; + font-weight: 300; + } + .social-icons { margin-bottom: 0.9rem; padding-top: 0.1rem; @@ -129,7 +134,7 @@ footer { } } - .legal a { + .legal p { font-size: 0.875rem; } } From e0108431d9725e80a3976c2942f5531923533203 Mon Sep 17 00:00:00 2001 From: Konrad Date: Wed, 3 Mar 2021 20:36:22 +0100 Subject: [PATCH 4/9] Added method to check for social icons --- app/helpers/footer_links_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/helpers/footer_links_helper.rb b/app/helpers/footer_links_helper.rb index a4caad2abd..9bb79cffd7 100644 --- a/app/helpers/footer_links_helper.rb +++ b/app/helpers/footer_links_helper.rb @@ -15,4 +15,8 @@ module FooterLinksHelper target: '_blank', rel: 'noopener' ) end + + def show_social_icons? + ContentConfig.footer_facebook_url.present? || ContentConfig.footer_twitter_url.present? || ContentConfig.footer_instagram_url.present? || ContentConfig.footer_linkedin_url.present? || ContentConfig.footer_googleplus_url.present? || ContentConfig.footer_pinterest_url.present? + end end From 07b23602cd4acd9b88399467546a64fe9f58f0b6 Mon Sep 17 00:00:00 2001 From: Konrad Date: Wed, 3 Mar 2021 20:38:12 +0100 Subject: [PATCH 5/9] Included #secure and method show_social_icons? --- app/views/shared/_footer.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml index dd7cd4a21c..7ffa59b113 100644 --- a/app/views/shared/_footer.html.haml +++ b/app/views/shared/_footer.html.haml @@ -15,7 +15,7 @@ %p.secure-icon %i.ofn-i_017-locked .small-12.medium-6.columns.text-center - %p.text-big.secure-text + %p.secure-text#secure = t '.footer_secure' %p.secure-text = t '.footer_secure_text' @@ -31,7 +31,7 @@ // This is the instance-managed set of links: %h4 = t '.footer_contact_headline' - - if ContentConfig.footer_facebook_url.present? || ContentConfig.footer_twitter_url.present? || ContentConfig.footer_instagram_url.present? || ContentConfig.footer_linkedin_url.present? || ContentConfig.footer_googleplus_url.present? || ContentConfig.footer_pinterest_url.present? + - if show_social_icons? %p.social-icons - if ContentConfig.footer_facebook_url.present? %a{href: ContentConfig.footer_facebook_url} From aa761d6d6759f2ea1fb2aa89761b50e2a69d03d7 Mon Sep 17 00:00:00 2001 From: Konrad Date: Wed, 3 Mar 2021 20:57:55 +0100 Subject: [PATCH 6/9] Removed #secure and replaced with class --- app/assets/stylesheets/darkswarm/footer.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/footer.scss b/app/assets/stylesheets/darkswarm/footer.scss index e63f7f8c5b..43b5898c7c 100644 --- a/app/assets/stylesheets/darkswarm/footer.scss +++ b/app/assets/stylesheets/darkswarm/footer.scss @@ -107,10 +107,10 @@ footer { color: rgba($disabled-med, 0.35); } - #secure { + p.text-big { font-size: 1.5rem; font-weight: 300; - } + } .social-icons { margin-bottom: 0.9rem; From db6eaede14f8d1d5dc634575b283a8c49dc86e78 Mon Sep 17 00:00:00 2001 From: Konrad Date: Wed, 3 Mar 2021 20:58:45 +0100 Subject: [PATCH 7/9] Shortened long line --- app/helpers/footer_links_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/footer_links_helper.rb b/app/helpers/footer_links_helper.rb index 9bb79cffd7..e084cca277 100644 --- a/app/helpers/footer_links_helper.rb +++ b/app/helpers/footer_links_helper.rb @@ -17,6 +17,8 @@ module FooterLinksHelper end def show_social_icons? - ContentConfig.footer_facebook_url.present? || ContentConfig.footer_twitter_url.present? || ContentConfig.footer_instagram_url.present? || ContentConfig.footer_linkedin_url.present? || ContentConfig.footer_googleplus_url.present? || ContentConfig.footer_pinterest_url.present? + ContentConfig.footer_facebook_url.present? || ContentConfig.footer_twitter_url.present? || + ContentConfig.footer_instagram_url.present? || ContentConfig.footer_linkedin_url.present? || + ContentConfig.footer_googleplus_url.present? || ContentConfig.footer_pinterest_url.present? end end From 748b2b8223bbf5622537feb79d3d002227c3f62d Mon Sep 17 00:00:00 2001 From: Konrad Date: Wed, 3 Mar 2021 20:59:30 +0100 Subject: [PATCH 8/9] Removed #secure and replaced with class --- app/views/shared/_footer.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml index 7ffa59b113..e7fb4e7dcb 100644 --- a/app/views/shared/_footer.html.haml +++ b/app/views/shared/_footer.html.haml @@ -15,7 +15,7 @@ %p.secure-icon %i.ofn-i_017-locked .small-12.medium-6.columns.text-center - %p.secure-text#secure + %p.text-big.secure-text = t '.footer_secure' %p.secure-text = t '.footer_secure_text' From 5c7466872621c6add738b2f3c2f3a8007a82dd16 Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Mon, 8 Mar 2021 16:20:07 +0100 Subject: [PATCH 9/9] Make test rely on container rather than parent This decouples it a bit from the actual HTML markup and makes it a bit more resilient. --- engines/web/spec/features/consumer/cookies_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/web/spec/features/consumer/cookies_spec.rb b/engines/web/spec/features/consumer/cookies_spec.rb index 5b55ece1fb..e447364fe2 100644 --- a/engines/web/spec/features/consumer/cookies_spec.rb +++ b/engines/web/spec/features/consumer/cookies_spec.rb @@ -155,7 +155,7 @@ feature "Cookies", js: true do end def click_footer_cookies_policy_link_and_wait - find("div > a", text: "cookies policy").click + find(".legal a", text: "cookies policy").click sleep 2 end