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; background: #33559b url(../../img/zamboni/global/bg-footer.png) repeat-x;
line-height: 20px; line-height: 20px;
padding: 123px 0 5px 0; padding: 123px 0 5px 0;
z-index: -1;
.section { .section {
max-width: 960px; max-width: 960px;
margin: 0 auto; margin: 0 auto;
position: relative; position: relative;
} }
&.sticky {
position: absolute;
bottom: 0;
width: 100%;
}
} }
#footer-logo a, #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/storage.js',
'js/zamboni/buttons.js', 'js/zamboni/buttons.js',
'js/lib/jquery.pjax.js', 'js/lib/jquery.pjax.js',
'js/impala/footer.js',
# jQuery UI # jQuery UI
'js/lib/jquery-ui/jquery.ui.core.js', 'js/lib/jquery-ui/jquery.ui.core.js',

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

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