aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/cover_photo_widget.tpl
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-03-19 10:51:58 +0100
committerMario Vavti <mario@mariovavti.com>2017-03-19 10:51:58 +0100
commit2a25ddff3685502e22a7de8d30bb2c423c4d0ed1 (patch)
tree60067da32cb440f9b50fbc4a4126f89132374ea8 /view/tpl/cover_photo_widget.tpl
parentb2ad4e8c2a41fda822fb2c52d470aaddd4dd1102 (diff)
downloadvolse-hubzilla-2a25ddff3685502e22a7de8d30bb2c423c4d0ed1.tar.gz
volse-hubzilla-2a25ddff3685502e22a7de8d30bb2c423c4d0ed1.tar.bz2
volse-hubzilla-2a25ddff3685502e22a7de8d30bb2c423c4d0ed1.zip
bs4 fixes
Diffstat (limited to 'view/tpl/cover_photo_widget.tpl')
-rwxr-xr-xview/tpl/cover_photo_widget.tpl22
1 files changed, 5 insertions, 17 deletions
diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl
index f0c9d916f..93debf442 100755
--- a/view/tpl/cover_photo_widget.tpl
+++ b/view/tpl/cover_photo_widget.tpl
@@ -12,12 +12,9 @@
if($('#cover-photo').length && $(window).width() > 755) {
if($(window).scrollTop() < $('#cover-photo').height()) {
- $('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');
$('.navbar').removeClass('fixed-top');
+ $('main').css('margin-top', - $('nav').outerHeight(true) + 'px');
$('main').css('opacity', 0);
- $('header').hide();
}
}
else {
@@ -28,12 +25,9 @@
$(window).scroll(function () {
if($('#cover-photo').length && $(window).width() > 755 && $(window).scrollTop() >= $('#cover-photo').height()) {
- $('header').fadeIn();
- $('main').css('opacity', 1);
- $('aside').css('padding-top', aside_padding_top + 'px');
- $('section').css('padding-top', section_padding_top + 'px');
$('.navbar').addClass('fixed-top');
$('main').css('margin-top', '');
+ $('main').css('opacity', 1);
coverSlid = true;
}
else if ($('#cover-photo').length && $(window).width() > 755 && $(window).scrollTop() < $('#cover-photo').height()){
@@ -43,13 +37,9 @@
}
else {
if($(window).scrollTop() < $('#cover-photo').height()) {
- $('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');
-
$('.navbar').removeClass('fixed-top');
+ $('main').css('margin-top', - $('nav').outerHeight(true) + 'px');
$('main').css('opacity', 0);
- $('header').hide();
}
}
}
@@ -61,10 +51,8 @@
$(window).resize(function () {
if($('#cover-photo').length && $(window).width() < 755) {
$('#cover-photo').remove();
- $('main').css('opacity', 1);
- $('aside').css('padding-top', aside_padding_top + 'px');
- $('section').css('padding-top', section_padding_top + 'px');
$('.navbar').addClass('fixed-top');
+ $('main').css('opacity', 1);
coverSlid = true;
}
@@ -75,7 +63,7 @@
return;
}
$('html, body').animate({scrollTop: Math.ceil($('#cover-photo').height()) + 'px' });
- return;
+ return false;
}
</script>