From 4014912ea4cee3e0b9754fd77a83e4bcb10849c4 Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Wed, 6 Dec 2017 16:10:01 +0100 Subject: [PATCH] [fix #1042] keep footer only for the landing --- app/assets/stylesheets/new_design/_constants.scss | 2 ++ app/assets/stylesheets/new_design/common.scss | 10 +++++++--- app/views/layouts/new_application.html.haml | 5 +++-- app/views/root/landing.html.haml | 2 ++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/new_design/_constants.scss b/app/assets/stylesheets/new_design/_constants.scss index 17689108b..1bbcb6b3d 100644 --- a/app/assets/stylesheets/new_design/_constants.scss +++ b/app/assets/stylesheets/new_design/_constants.scss @@ -5,3 +5,5 @@ $default-padding: 2 * $default-spacer; $footer-height: 267px; $footer-height-mobile: 531px; + +$small-footer-height: 2 * $default-padding; diff --git a/app/assets/stylesheets/new_design/common.scss b/app/assets/stylesheets/new_design/common.scss index fc2345111..5901a5db6 100644 --- a/app/assets/stylesheets/new_design/common.scss +++ b/app/assets/stylesheets/new_design/common.scss @@ -15,11 +15,15 @@ select { .page-wrapper { position: relative; - padding-bottom: $footer-height; + padding-bottom: $small-footer-height; min-height: 100%; - @media (max-width: 1000px) { - padding-bottom: $footer-height-mobile; + &.with-footer { + padding-bottom: $footer-height; + + @media (max-width: 1000px) { + padding-bottom: $footer-height-mobile; + } } } diff --git a/app/views/layouts/new_application.html.haml b/app/views/layouts/new_application.html.haml index 6bbd3cf51..90c8a1111 100644 --- a/app/views/layouts/new_application.html.haml +++ b/app/views/layouts/new_application.html.haml @@ -17,7 +17,7 @@ = stylesheet_link_tag "new_design/print", media: "print", "data-turbolinks-track": true %body - .page-wrapper + .page-wrapper{ class: content_for?(:display_footer) ? 'with-footer' : 'nil' } = render partial: "layouts/support_navigator_banner" = render partial: "layouts/ie_lt_10" #beta{ class:(Rails.env == "production" ? "" : "beta_staging") } @@ -30,7 +30,8 @@ = render partial: "layouts/flash_messages" = yield - = render partial: "layouts/new_footer" + - if content_for?(:display_footer) + = render partial: "layouts/new_footer" = render partial: "layouts/google_analytics" = render partial: "layouts/mailjet_newsletter" diff --git a/app/views/root/landing.html.haml b/app/views/root/landing.html.haml index 9b2471332..182f815b6 100644 --- a/app/views/root/landing.html.haml +++ b/app/views/root/landing.html.haml @@ -1,3 +1,5 @@ +- content_for(:display_footer, true) + .landing .landing-panel.hero-panel .container