This commit is contained in:
Matt Claypotch 2011-10-25 16:30:19 -07:00
Родитель 34dd879265
Коммит 2909551000
4 изменённых файлов: 27 добавлений и 9 удалений

Просмотреть файл

@ -18,11 +18,17 @@
background: #33559b url(../../img/zamboni/global/bg-footer.png) repeat-x;
line-height: 20px;
padding: 123px 0 5px 0;
z-index: -1;
.section {
max-width: 960px;
margin: 0 auto;
position: relative;
}
&.sticky {
position: absolute;
bottom: 0;
width: 100%;
}
}
#footer-logo a,

11
media/js/impala/footer.js Normal file
Просмотреть файл

@ -0,0 +1,11 @@
(function() {
var $footer = $('#footer'),
$page = $("#page"),
$win = $(window);
function stickyFooter() {
// Stick the footer to the bottom when there's head(foot)room.
$footer.toggleClass('sticky', $win.height() - $footer.outerHeight() > $page.outerHeight());
}
stickyFooter();
$(window).resize(_.debounce(stickyFooter, 800));
})();

Просмотреть файл

@ -609,6 +609,7 @@ MINIFY_BUNDLES = {
'js/zamboni/storage.js',
'js/zamboni/buttons.js',
'js/lib/jquery.pjax.js',
'js/impala/footer.js',
# jQuery UI
'js/lib/jquery-ui/jquery.ui.core.js',

Просмотреть файл

@ -48,7 +48,7 @@
{% endif %}
{% block bodyattrs %}{% endblock %}>
<div id="page">
<div id="page" class="c">
{% block site_header %}
{# Well that's an awful tiny mozilla header #}
<div id="global-header-tab">
@ -185,14 +185,6 @@
{% block popups %}
{% endblock %}
</div>
{# js #}
{% block site_js %}
<script src="{{ static(url('jsi18n')) }}"></script>
{{ js('impala') }}
<script async defer src="{{ static(url('addons.buttons.js')) }}"></script>
<script async defer src="{{ settings.PAYPAL_JS_URL }}"></script>
{% endblock %}
{% block js %}{% endblock %}
{% block footer %}
<div id="footer" role="contentinfo">
<div class="section">
@ -203,6 +195,14 @@
</div> {# section #}
</div> {# footer #}
{% endblock %}
{# js #}
{% block site_js %}
<script src="{{ static(url('jsi18n')) }}"></script>
{{ js('impala') }}
<script async defer src="{{ static(url('addons.buttons.js')) }}"></script>
<script async defer src="{{ settings.PAYPAL_JS_URL }}"></script>
{% endblock %}
{% block js %}{% endblock %}
<div id="get-satisfaction"></div>
{# Webtrends Stats Tracking #}
<script defer src="{{ media('js/webtrends/webtrends-v0.1.js') }}"></script>