From 8c39d127ccd3baeb2d9f95e177377a80d595f7c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Pe=CC=81rez=20Crespo?= <jaime.perez@uninett.no> Date: Fri, 30 Nov 2018 11:57:51 +0100 Subject: [PATCH] Fix the footer. It was broken in previous commits. It should always stick to the bottom of the page, unless the page is long enough to not fit in the screen, so then it should just be thrown after the end of the content. --- src/css/default.scss | 9 ++++----- src/js/bundle.js | 1 + templates/base.twig | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/css/default.scss b/src/css/default.scss index 1ad6ec115..782d25bd1 100644 --- a/src/css/default.scss +++ b/src/css/default.scss @@ -388,14 +388,13 @@ HEADER CONTENT ************************************************************ */ #layout { - position: relative; right: 0; padding-right: 0; } #content { padding-top: 2em; - padding-bottom: 4rem; + padding-bottom: 2rem; } .message-box { @@ -451,15 +450,15 @@ FOOTER ************************************************************ */ #layout { min-height: 100%; - height: 100%; - margin: 0 auto -6rem; /*negative margin = footer height + padding-top + padding-bottom*/ + margin: 0 auto -6rem auto; /*negative margin = footer height + padding-top + padding-bottom*/ } #bottom, #push { - height: 4rem; + height: 6rem; } #footer { + width: 100%; background: linear-gradient(141deg, $primaryBackground 0%, $transitionBackground 51%, $secondaryBackground 75%); height: 4rem; padding: 2rem 0 0; diff --git a/src/js/bundle.js b/src/js/bundle.js index 2710a3368..50aeece05 100644 --- a/src/js/bundle.js +++ b/src/js/bundle.js @@ -21,6 +21,7 @@ $(document).ready(function () { $('#menuLink').click(function (e) { e.preventDefault(); $('#layout').toggleClass('active'); + $('#foot').toggleClass('active'); $(this).toggleClass('active'); }); }); \ No newline at end of file diff --git a/templates/base.twig b/templates/base.twig index e7dc81172..29228797c 100644 --- a/templates/base.twig +++ b/templates/base.twig @@ -38,11 +38,11 @@ </div> </div><!-- content --> <div id="push"></div> - <div id="foot"> - {%- block footer %}{% include "_footer.twig" %}{% endblock %} - - </div> </div><!-- layout --> + <div id="foot"> + {%- block footer %}{% include "_footer.twig" %}{% endblock %} + + </div> <script src="{{ asset('js/bundle.js') }}"></script> {%- block postload %}{% endblock %} -- GitLab