diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-07-15 13:20:00 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-07-15 13:20:00 +0200 |
commit | 2e32b5f467e9bb66e339c56308ad8a82163566e6 (patch) | |
tree | ad03bdf26555b7136240917657a5e7a768529a3b /view/tpl | |
parent | 7ee7f00bf34b11d0427f03df9494088cf56ef9ee (diff) | |
download | volse-hubzilla-2e32b5f467e9bb66e339c56308ad8a82163566e6.tar.gz volse-hubzilla-2e32b5f467e9bb66e339c56308ad8a82163566e6.tar.bz2 volse-hubzilla-2e32b5f467e9bb66e339c56308ad8a82163566e6.zip |
upgrade to jquery-3.1 and minor fixes
Diffstat (limited to 'view/tpl')
-rwxr-xr-x | view/tpl/contact_block.tpl | 1 | ||||
-rwxr-xr-x | view/tpl/cover_photo_widget.tpl | 20 |
2 files changed, 16 insertions, 5 deletions
diff --git a/view/tpl/contact_block.tpl b/view/tpl/contact_block.tpl index a32437212..6a29abaef 100755 --- a/view/tpl/contact_block.tpl +++ b/view/tpl/contact_block.tpl @@ -11,4 +11,3 @@ </div> {{/if}} </div> -<div class="clear"></div> diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 8254fc87d..5e97d3773 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -1,8 +1,17 @@ <script> + var aside_padding_top; + var section_padding_top; + $(document).ready(function() { + + aside_padding_top = parseInt($('aside').css('padding-top')); + section_padding_top = parseInt($('section').css('padding-top')); + if($('#cover-photo').length && $(window).width() > 755) { $('.navbar-fixed-top').css('position', 'relative'); - $('aside, section').css('padding-top', 0 + 'px'); + $('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); + $('aside').css('padding-top', aside_padding_top - $('nav').outerHeight() + 'px'); + $('section').css('padding-top', section_padding_top - $('nav').outerHeight() + 'px'); $('main').css('opacity', 0); $('header').hide(); } @@ -15,9 +24,11 @@ if($('#cover-photo').length && $(window).width() > 755 && $(window).scrollTop() >= $('#cover-photo').height()) { $('header').fadeIn(); $('main').css('opacity', 1); - $('aside, section').css('padding-top', $('nav').outerHeight(true) + 'px'); + $('aside').css('padding-top', aside_padding_top + 'px'); + $('section').css('padding-top', section_padding_top + 'px'); $(window).scrollTop($(window).scrollTop() - $('#cover-photo').height()) $('.navbar-fixed-top').css('position', 'fixed'); + $('main').css('margin-top', ''); $('#cover-photo').remove(); } if($('#cover-photo').length) { @@ -28,7 +39,8 @@ $(window).resize(function () { if($('#cover-photo').length && $(window).width() < 755) { $('main').css('opacity', 1); - $('aside, section').css('padding-top', $('nav').outerHeight(true) + 'px'); + $('aside').css('padding-top', aside_padding_top + 'px'); + $('section').css('padding-top', section_padding_top + 'px'); $('.navbar-fixed-top').css('position', 'fixed'); $('#cover-photo').remove(); } @@ -36,7 +48,7 @@ }); function slideUpCover() { - $('html, body').animate({scrollTop: $('#cover-photo').height() + 'px'}); + $('html, body').animate({scrollTop: $('#cover-photo').height() + 1 + 'px' }); } </script> |