diff --git a/README.md b/README.md index 9f2fc27c..41f9c4dd 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,12 @@ var CONFIG = { * (optional) */ header: DEFAULT_HEADER, + + /* footer: Matching functionality of header, but at the bottom instead of the top + * https://github.com/resoai/TileBoard/wiki/Header-configuration + * (optional) + */ + footer: DEFAULT_HEADER, } ``` diff --git a/index.html.ejs b/index.html.ejs index d47a4a05..afce8ac6 100644 --- a/index.html.ejs +++ b/index.html.ejs @@ -272,8 +272,14 @@
+ + + +
+ + diff --git a/scripts/controllers/main.js b/scripts/controllers/main.js index 6b22c316..03154aad 100644 --- a/scripts/controllers/main.js +++ b/scripts/controllers/main.js @@ -876,6 +876,14 @@ App.controller('Main', function ($scope, $timeout, $location, Api, tmhDynamicLoc return page.header; }; + $scope.getFooter = function (page) { + if (!page) { + return CONFIG.footer; + } + + return page.footer; + }; + function toSafeNumber (value) { return !isNaN(+value) ? +value : null; } diff --git a/styles/main.less b/styles/main.less index 1bb37758..5058e4fc 100644 --- a/styles/main.less +++ b/styles/main.less @@ -343,7 +343,8 @@ body { } } -.header { +.header, +.footer { position: absolute; z-index: 2; left: 0; @@ -414,6 +415,22 @@ body { } } +.footer { + bottom: 0px; + top: auto; +} + +.-menu-bottom { + .footer { + bottom: @pageBottomPaddingSmall; + } + @media (min-width: 500px) { + .footer { + bottom: @pageBottomPaddingBig; + } + } +} + .-menu-left { &.-scrolled-horizontally { .pages-menu--scroll-indicator { diff --git a/styles/themes.less b/styles/themes.less index 941415f4..da38c22a 100644 --- a/styles/themes.less +++ b/styles/themes.less @@ -461,11 +461,17 @@ .page { padding-bottom: @pageBottomPaddingSmall + 2 * @winphonePageMenuIconBorderSize; } + .footer { + bottom: @pageBottomPaddingSmall + 2 * @winphonePageMenuIconBorderSize; + } @media (min-width: 500px) { .page { padding-bottom: @pageBottomPaddingBig + 2 * @winphonePageMenuIconBorderSize; } + .footer { + bottom: @pageBottomPaddingBig + 2 * @winphonePageMenuIconBorderSize; + } } } } @@ -647,6 +653,9 @@ .page { padding-bottom: @pageBottomPadding; } + .footer { + bottom: @pageBottomPadding; + } } @sliderBorderRadius: 6px;