Chris Oliver пре 6 година
родитељ
комит
5978068084

+ 1 - 4
app/assets/stylesheets/application.scss

@@ -3,12 +3,9 @@
 // $navbar-default-color: $light-orange;
 
 @import "bootstrap";
+@import "sticky-footer";
 @import "announcements";
 
-body > .container {
-  margin-top: 40px;
-}
-
 // Fixes bootstrap nav-brand container overlap
 @include media-breakpoint-down(xs) {
   .container {

+ 33 - 0
app/assets/stylesheets/sticky-footer.scss

@@ -0,0 +1,33 @@
+/* Sticky footer styles
+-------------------------------------------------- */
+html {
+  position: relative;
+  min-height: 100%;
+}
+body {
+  /* Margin bottom by footer height */
+  margin-bottom: 60px;
+}
+.footer {
+  position: absolute;
+  bottom: 0;
+  width: 100%;
+  /* Set the fixed height of the footer here */
+  height: 60px;
+  line-height: 60px; /* Vertically center the text there */
+  background-color: #f5f5f5;
+}
+
+
+/* Custom page CSS
+-------------------------------------------------- */
+/* Not required for template or sticky footer method. */
+
+body > .container {
+  padding: 40px 15px 0;
+}
+
+.footer > .container {
+  padding-right: 15px;
+  padding-left: 15px;
+}

+ 2 - 1
app/views/layouts/application.html.erb

@@ -7,10 +7,11 @@
   <body>
     <%= render 'shared/navbar' %>
     <%= render 'shared/notices' %>
+
     <div class="container">
       <%= yield %>
     </div>
-    <hr>
+
     <%= render 'shared/footer' %>
   </body>
 </html>