changeset 2650:4385775cf3a1

Fixed footer to the bottom of the page in all the three themes. Earlier it used to come upto the middle of the page in case of small content.
author Ajitesh Gupta <ajgupta93@gmail.com>
date Thu, 26 Jun 2014 02:13:49 +0530
parents 82ffb3f45eed
children 2003e3685733
files MoinMoin/themes/basic/static/css/basic.css MoinMoin/themes/basic/static/custom-less/basic.less MoinMoin/themes/basic/templates/layout.html MoinMoin/themes/foobar/static/css/common.css MoinMoin/themes/foobar/static/css/stylus/main.styl MoinMoin/themes/modernized/static/css/common.css MoinMoin/themes/modernized/static/css/stylus/main.styl
diffstat 7 files changed, 78 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/basic/static/css/basic.css	Wed Jun 25 22:20:52 2014 +0530
+++ b/MoinMoin/themes/basic/static/css/basic.css	Thu Jun 26 02:13:49 2014 +0530
@@ -6607,18 +6607,36 @@
 .moin-thead {
   background-color: silver;
 }
+html,
+body {
+  height: 100%;
+}
+.moin-content {
+  padding-bottom: 100px;
+}
+.moin-footer {
+  bottom: 0;
+  position: absolute;
+  width: 100%;
+}
 @media (min-width: 768px) {
   .container {
+    min-height: 100%;
+    position: relative;
     width: auto;
   }
 }
 @media (min-width: 992px) {
   .container {
+    min-height: 100%;
+    position: relative;
     width: auto;
   }
 }
 @media (min-width: 1200px) {
   .container {
+    min-height: 100%;
+    position: relative;
     width: auto;
   }
 }
--- a/MoinMoin/themes/basic/static/custom-less/basic.less	Wed Jun 25 22:20:52 2014 +0530
+++ b/MoinMoin/themes/basic/static/custom-less/basic.less	Thu Jun 26 02:13:49 2014 +0530
@@ -306,19 +306,36 @@
 .moin-thead{
     background-color: silver;
 }
+html, body {
+  height: 100%;
+}
+.moin-content {
+  padding-bottom: 100px;
+}
+.moin-footer {
+  bottom: 0;
+  position: absolute;
+  width: 100%;
+}
 // set min-width to prevent search box from floating off window to right
 @media (min-width: 768px) {
   .container {
+    min-height: 100%;
+    position: relative;
     width: auto;
   }
 }
 @media (min-width: 992px) {
   .container {
+    min-height: 100%;
+    position: relative;
     width: auto;
   }
 }
 @media (min-width: 1200px) {
   .container {
+    min-height: 100%;
+    position: relative;
     width: auto;
   }
 }
--- a/MoinMoin/themes/basic/templates/layout.html	Wed Jun 25 22:20:52 2014 +0530
+++ b/MoinMoin/themes/basic/templates/layout.html	Thu Jun 26 02:13:49 2014 +0530
@@ -50,7 +50,7 @@
 
 {% block layout %}
     <div class="container">
-        <div class="row">
+        <div class="row moin-header">
             <div class="col-lg-2 moin-logo">
                 {% if logo %}
                 <a href="{{ url_for('frontend.show_item', item_name=cfg.item_root) }}">
@@ -209,7 +209,7 @@
             </div> <!-- col-lg-10 -->
         </div> <!-- row-topnavbar -->
 
-        <div class="row">
+        <div class="row moin-content">
             <div class="col-lg-2">
                 <div class="row">
                     <div class="col-lg-12">
@@ -296,7 +296,7 @@
         </div> <!--/row sidebar, tabs, content - main-->
 
         {% block footer %}
-        <div class="row">
+        <div class="row moin-footer">
             <div class="col-lg-12">
                 <div class="navbar"> <!--footer-->
                     {{ footer_logos }}
--- a/MoinMoin/themes/foobar/static/css/common.css	Wed Jun 25 22:20:52 2014 +0530
+++ b/MoinMoin/themes/foobar/static/css/common.css	Thu Jun 26 02:13:49 2014 +0530
@@ -449,5 +449,9 @@
 .moin-big{font-size:1.17em}
 .moin-small{font-size:.83em}
 .moin-integer{text-align:right;padding-right:1em;width:2%}
+html,body{height:100%}
+#moin-main-container{min-height:100%;position:relative}
+#moin-main-box{margin-bottom:60px}
+#moin-footer{position:absolute;bottom:5px;width:98%}
 @media print{#moin-global-tray,#moin-local-panel,#moin-footer,#moin-searchform{display:none}
 }
--- a/MoinMoin/themes/foobar/static/css/stylus/main.styl	Wed Jun 25 22:20:52 2014 +0530
+++ b/MoinMoin/themes/foobar/static/css/stylus/main.styl	Thu Jun 26 02:13:49 2014 +0530
@@ -1155,6 +1155,22 @@
     padding-right 1em
     width 2%
 
+html,
+body
+    height 100%
+
+#moin-main-container
+    min-height 100%
+    position relative
+
+#moin-main-box
+    margin-bottom 60px
+
+#moin-footer
+    position absolute
+    bottom 5px
+    width 98%
+
 /* fix tests -- currently checking <big> and <small> */
 @media print
     #moin-global-tray
--- a/MoinMoin/themes/modernized/static/css/common.css	Wed Jun 25 22:20:52 2014 +0530
+++ b/MoinMoin/themes/modernized/static/css/common.css	Thu Jun 26 02:13:49 2014 +0530
@@ -516,6 +516,10 @@
 a.moin-permalink{display:none;cursor:pointer;margin-left:.1em;color:#939393;}
 a.moin-permalink:hover.moin-permalink{color:#1f62ad}
 h1:hover .moin-permalink,h2:hover .moin-permalink,h3:hover .moin-permalink,h4:hover .moin-permalink,h5:hover .moin-permalink,h6:hover .moin-permalink{display:inline;text-decoration:none}
+html,body{height:100%}
+#moin-main-wrapper{position:relative;min-height:100%}
+#moin-page{padding-bottom:105px}
+#moin-footer{position:absolute;width:100%;bottom:0}
 @media print{html{font-family:serif;font-size:12pt;width:100%}
 body,#moin-page,#moin-content-data{margin:0;padding:0}
 a,a:visited,a.moin-nonexistent{color:#939393;text-decoration:none}
--- a/MoinMoin/themes/modernized/static/css/stylus/main.styl	Wed Jun 25 22:20:52 2014 +0530
+++ b/MoinMoin/themes/modernized/static/css/stylus/main.styl	Thu Jun 26 02:13:49 2014 +0530
@@ -1540,6 +1540,22 @@
     display inline
     text-decoration none
 
+html,
+body
+    height 100%
+
+#moin-main-wrapper
+    position relative
+    min-height 100%
+
+#moin-page
+    padding-bottom 105px
+
+#moin-footer
+    position absolute
+    width 100%
+    bottom 0
+
 @media print
     html
         font-family serif