added sticky footer js
This commit is contained in:
Родитель
34dd879265
Коммит
2909551000
|
@ -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,
|
||||
|
|
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче