From 6fe0d94f92a7d481fb7d63899627502e8a53bffc Mon Sep 17 00:00:00 2001 From: Olimpia Magliulo <olimpiam@intern-ikts-MacBook-Air.local> Date: Thu, 9 Nov 2017 12:40:03 +0100 Subject: [PATCH] Stiky footer Fixed footer at the bottom in fixed position. (+1 squashed commit) Squashed commits: [27ac007] footer --- templates/_footer.twig | 7 ++++--- templates/base.twig | 19 +++++++++---------- www/assets/css/src/default.css | 19 +++++++++++++------ 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/templates/_footer.twig b/templates/_footer.twig index f789441c1..efbcb5847 100644 --- a/templates/_footer.twig +++ b/templates/_footer.twig @@ -1,6 +1,7 @@ <hr> - <img src="/{{ baseurlpath }}resources/icons/ssplogo-fish-small.png" alt="Small fish logo" style="float: right"> - Copyright © 2007-2016 <a href="http://uninett.no/">UNINETT AS</a> + <img src="/{{ baseurlpath }}resources/icons/ssplogo-fish-small.png" alt="Small fish logo" class="right"> + <div id="wrap"> + <p>Copyright © 2007-2017 <a href="http://uninett.no/">UNINETT AS</a></p> + </div> - <br style="clear: right"> diff --git a/templates/base.twig b/templates/base.twig index 2ba07faed..6415fda2a 100644 --- a/templates/base.twig +++ b/templates/base.twig @@ -24,26 +24,25 @@ {% block header %}{% include "_header.twig" %}{% endblock %} </div> </div> -</div> -<div id="wrap"> <!-- content --> - <div class="pure-g"> - <div class="pure-u-1"> - {% block contentwrapper %} - {% block content %}{% endblock %} - {% endblock %} + <div id="content"> <!-- content --> + <div class="pure-g"> + <div class="pure-u-1"> + {% block contentwrapper %} + {% block content %}{% endblock %} + {% endblock %} + </div> </div> </div> </div> -<div id="footer"> - <div id="wrap" > <!-- footer --> + <div id="footer"> <div class="pure-g"> <div class="pure-u-1"> {% block footer %}{% include "_footer.twig" %}{% endblock %} </div> </div> </div> -</div> + <!-- postload javascript --> <script type="text/javascript" src="/{{ baseurlpath }}assets/js/src/script.js"></script> diff --git a/www/assets/css/src/default.css b/www/assets/css/src/default.css index 590739d66..c28cb2e5e 100644 --- a/www/assets/css/src/default.css +++ b/www/assets/css/src/default.css @@ -3,24 +3,31 @@ GENERAL ************************************************************ */ html{ height: 100%; + } body { font-family: sans-serif; - padding-left: 2em; - padding-right: 2em; line-height: 1.5em; } #wrap{ - margin: 0 2rem; - padding: 1rem; + position:relative; + margin: 1.5rem; + padding-bottom: 4rem; } #footer { - position: relative; + position: fixed; bottom: 0; + height:4rem; width:100%; - padding: 1rem; + padding: 0.3rem; background-color: #efefef; text-align: center; + z-index: 5; +} +#footer p { + position: relative; + bottom: 0; + font-size: .75em; } img { -- GitLab