aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-16 09:09:13 +0000
committerMario <mario@mariovavti.com>2021-03-16 10:13:55 +0100
commit3b9a9db664e41ab4f5e26154123324fb81cf39d8 (patch)
tree96bcd00191ff5635e0d0004bc4b9b731a388faa2
parentbecb898a514e691458111417d99c8902fb09a716 (diff)
downloadvolse-hubzilla-3b9a9db664e41ab4f5e26154123324fb81cf39d8.tar.gz
volse-hubzilla-3b9a9db664e41ab4f5e26154123324fb81cf39d8.tar.bz2
volse-hubzilla-3b9a9db664e41ab4f5e26154123324fb81cf39d8.zip
fix cover photo image issues on some mobile devices
(cherry picked from commit 4e921cfdcfd6f021081a955855ecbafb1f30ec48)
-rw-r--r--view/tpl/cover_photo_widget.tpl11
1 files changed, 9 insertions, 2 deletions
diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl
index 7739d24b8..7333f2d4c 100644
--- a/view/tpl/cover_photo_widget.tpl
+++ b/view/tpl/cover_photo_widget.tpl
@@ -31,6 +31,10 @@
});
$(window).scroll(function () {
+ if(! $('#cover-photo').length) {
+ return;
+ }
+
if($(window).scrollTop() >= cover_height) {
coverHiddenActions();
coverSlid = true;
@@ -52,12 +56,15 @@
});
$(window).resize(function () {
+ if(! $('#cover-photo').length) {
+ return;
+ }
+
cover_height = Math.ceil($(window).width()/2.75862069);
$('#cover-photo').css('height', cover_height + 'px');
if($(window).width() < 755) {
$('#cover-photo').remove();
- $('.navbar').addClass('fixed-top');
- $('main').css('opacity', 1);
+ coverHiddenActions();
coverSlid = true;
}