aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/cover_photo_widget.tpl
diff options
context:
space:
mode:
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 bc1f421bd..806866212 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()) {
+ $('.navbar').removeClass('fixed-top');
$('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-fixed-top').css('position', 'relative');
$('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-fixed-top').css('position', '');
+ $('.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()) {
+ $('.navbar').removeClass('fixed-top');
$('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-fixed-top').css('position', 'relative');
$('main').css('opacity', 0);
- $('header').hide();
}
}
}
@@ -61,10 +51,8 @@
$(window).resize(function () {
if($('#cover-photo').length && $(window).width() < 755) {
$('#cover-photo').remove();
+ $('.navbar').addClass('fixed-top');
$('main').css('opacity', 1);
- $('aside').css('padding-top', aside_padding_top + 'px');
- $('section').css('padding-top', section_padding_top + 'px');
- $('.navbar-fixed-top').css('position', '');
coverSlid = true;
}