diff options
author | redmatrix <git@macgirvin.com> | 2016-07-15 15:31:50 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-07-15 15:31:50 -0700 |
commit | d6d94d94273a954735927179585ca4c0156d8a74 (patch) | |
tree | 4b2b0d284b66fc40fe65dd2f72ef89aa1b88a077 /view/tpl | |
parent | acb78205c8d2f1ada41e61783a7b421200e2658b (diff) | |
parent | 9048f8cffea94b653e97bed421e2be10c9c6a7d3 (diff) | |
download | volse-hubzilla-d6d94d94273a954735927179585ca4c0156d8a74.tar.gz volse-hubzilla-d6d94d94273a954735927179585ca4c0156d8a74.tar.bz2 volse-hubzilla-d6d94d94273a954735927179585ca4c0156d8a74.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
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..4e210a300 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: Math.ceil($('#cover-photo').height()) + 'px' }); } </script> |