aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-03-02 13:33:18 +0100
committerMario Vavti <mario@mariovavti.com>2016-03-02 13:33:18 +0100
commitc5d08fd5fdcd504dac010d62c434d16a92879852 (patch)
tree312d69adc30dd10be9e787969e69022049cb60f8 /view/theme/redbasic
parent22729da2a2a3ef71b4c5f00f15e254bddecedd91 (diff)
downloadvolse-hubzilla-c5d08fd5fdcd504dac010d62c434d16a92879852.tar.gz
volse-hubzilla-c5d08fd5fdcd504dac010d62c434d16a92879852.tar.bz2
volse-hubzilla-c5d08fd5fdcd504dac010d62c434d16a92879852.zip
add a fade in effect to main while scrolling up cover photo
Diffstat (limited to 'view/theme/redbasic')
-rw-r--r--view/theme/redbasic/js/redbasic.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js
index 7c5df0834..809776220 100644
--- a/view/theme/redbasic/js/redbasic.js
+++ b/view/theme/redbasic/js/redbasic.js
@@ -7,6 +7,7 @@ $(document).ready(function() {
if($('#cover-photo').length && $(window).width() > 767) {
$('.navbar-fixed-top').css('position', 'relative');
$('main').css('padding-top', 0 + 'px');
+ $('main').css('opacity', 0);
}
else {
$('#cover-photo').remove();
@@ -71,4 +72,8 @@ $(window).scroll(function () {
$('.navbar-fixed-top').css('position', 'fixed');
$('#cover-photo').remove();
}
+
+ if($('#cover-photo').length) {
+ $('main').css('opacity', ($(window).scrollTop()/$('#cover-photo').height()).toFixed(1));
+ }
});