diff options
author | zotlabs <mike@macgirvin.com> | 2018-09-05 21:02:06 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-09-05 21:02:06 -0700 |
commit | c5bc4fe24519079664b8f63a5e9082f0a7ffc945 (patch) | |
tree | 9039d12215106b92b21f42977abbcdb44b529f65 /view | |
parent | bc4a92b702618aa83991ea65eb24d653cfc6601a (diff) | |
parent | ea381d918021a33a73df40de95fd0c57f0edc5c2 (diff) | |
download | volse-hubzilla-c5bc4fe24519079664b8f63a5e9082f0a7ffc945.tar.gz volse-hubzilla-c5bc4fe24519079664b8f63a5e9082f0a7ffc945.tar.bz2 volse-hubzilla-c5bc4fe24519079664b8f63a5e9082f0a7ffc945.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'view')
-rw-r--r-- | view/css/widgets.css | 1 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 12 | ||||
-rw-r--r-- | view/theme/redbasic/php/style.php | 6 | ||||
-rwxr-xr-x | view/tpl/cover_photo_widget.tpl | 33 |
4 files changed, 30 insertions, 22 deletions
diff --git a/view/css/widgets.css b/view/css/widgets.css index e330c38e1..995647d1c 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -142,7 +142,6 @@ li:hover .group-edit-icon { position: relative; width: 100%; height: auto; - cursor: pointer; } #cover-photo-caption { diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 943b27637..0a879cb71 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -32,13 +32,9 @@ aside #region_1 { border-right: 1px solid transparent; } -aside #left_aside_wrapper { - /*margin-bottom: 10px;*/ - margin-bottom: $bottom_margin; -} +aside #left_aside_wrapper, aside #right_aside_wrapper { - /*margin-bottom: 10px;*/ - margin-bottom: $bottom_margin; + margin-bottom: 10px; } main { @@ -47,10 +43,6 @@ main { max-width: $main_widthpx; } -main #region_2 { - margin-bottom: $bottom_margin; -} - #overlay { position: absolute; top: 0; diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 0631fa142..91cc0b85b 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -106,8 +106,6 @@ if(! $top_photo) $top_photo = '2.3rem'; if(! $reply_photo) $reply_photo = '2.3rem'; -if(! $bottom_margin) - $bottom_margin = '200px'; // Apply the settings if(file_exists('view/theme/redbasic/css/style.css')) { @@ -152,9 +150,7 @@ if(file_exists('view/theme/redbasic/css/style.css')) { '$pmenu_top' => $pmenu_top, '$pmenu_reply' => $pmenu_reply, '$main_width' => $main_width, - '$aside_width' => $aside_width, - '$bottom_margin' => $bottom_margin - + '$aside_width' => $aside_width ); echo str_replace(array_keys($options), array_values($options), $x); diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 3aaad5ae5..2de3c74be 100755 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -2,16 +2,28 @@ var aside_padding_top; var section_padding_top; var coverSlid = false; + var hide_cover = Boolean({{$hide_cover}}); $(document).ready(function() { + if(! $('#cover-photo').length) + return; aside_padding_top = parseInt($('aside').css('padding-top')); section_padding_top = parseInt($('section').css('padding-top')); $(document).on('click mouseup keyup', slideUpCover); - if($('#cover-photo').length && $(window).width() > 755) { + if($(window).width() > 755) { + $('#cover-photo').removeClass('d-none'); + datasrc2src('#cover-photo > img'); + + if(hide_cover) { + hideCover(); + coverSlid = true; + } + if($(window).scrollTop() < $('#cover-photo').height()) { + $('body').css('cursor', 'n-resize'); $('.navbar').removeClass('fixed-top'); $('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); $('main').css('opacity', 0); @@ -24,32 +36,34 @@ }); $(window).scroll(function () { - if($('#cover-photo').length && $(window).width() > 755 && $(window).scrollTop() >= $('#cover-photo').height()) { + if($(window).width() > 755 && $(window).scrollTop() >= $('#cover-photo').height()) { + $('body').css('cursor', ''); $('.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()){ + else if ($(window).width() > 755 && $(window).scrollTop() < $('#cover-photo').height()){ if(coverSlid) { $(window).scrollTop(Math.ceil($('#cover-photo').height())); setTimeout(function(){ coverSlid = false; }, 1000); } else { if($(window).scrollTop() < $('#cover-photo').height()) { + $('body').css('cursor', 'n-resize'); $('.navbar').removeClass('fixed-top'); $('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); $('main').css('opacity', 0); } } } - if($('#cover-photo').length && $('main').css('opacity') < 1) { + if($('main').css('opacity') < 1) { $('main').css('opacity', ($(window).scrollTop()/$('#cover-photo').height()).toFixed(1)); } }); $(window).resize(function () { - if($('#cover-photo').length && $(window).width() < 755) { + if($(window).width() < 755) { $('#cover-photo').remove(); $('.navbar').addClass('fixed-top'); $('main').css('opacity', 1); @@ -65,9 +79,16 @@ $('html, body').animate({scrollTop: Math.ceil($('#cover-photo').height()) + 'px' }, 'fast'); return; } + + function hideCover() { + if(coverSlid) { + return; + } + window.scrollTo(0, Math.ceil($('#cover-photo').height())); + } </script> -<div id="cover-photo" title="{{$hovertitle}}"> +<div class="d-none" id="cover-photo" title="{{$hovertitle}}"> {{$photo_html}} <div id="cover-photo-caption"> <h1>{{$title}}</h1> |