diff options
-rw-r--r-- | Zotlabs/Module/Settings/Display.php | 5 | ||||
-rw-r--r-- | view/css/default.css | 6 | ||||
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 8 | ||||
-rw-r--r-- | view/tpl/cover_photo_widget.tpl | 4 | ||||
-rw-r--r-- | view/tpl/navbar_default.tpl | 2 |
5 files changed, 13 insertions, 12 deletions
diff --git a/Zotlabs/Module/Settings/Display.php b/Zotlabs/Module/Settings/Display.php index ea9ae2da1..ee9692014 100644 --- a/Zotlabs/Module/Settings/Display.php +++ b/Zotlabs/Module/Settings/Display.php @@ -163,7 +163,8 @@ class Display { $title_tosource = get_pconfig(local_channel(),'system','title_tosource'); $title_tosource = (($title_tosource===false)? '0': $title_tosource); // default if not set: 0 - $theme_config = ""; + $theme_config = null; + $schemas = null; if(($themeconfigfile = $this->get_theme_config_file($theme)) != null){ require_once($themeconfigfile); if(class_exists('\\Zotlabs\\Theme\\' . ucfirst($theme) . 'Config')) { @@ -188,7 +189,7 @@ class Display { '$uid' => local_channel(), '$theme' => (($themes) ? array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview') : false), - '$schema' => array('schema', t('Select scheme'), $existing_schema, '' , $schemas), + '$schema' => (($schemas) ? array('schema', t('Select scheme'), $existing_schema, '' , $schemas) : false), '$preload_images' => array('preload_images', t("Preload images before rendering the page"), $preload_images, t("The subjective page load time will be longer but the page will be ready when displayed"), $yes_no), '$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, '', $yes_no), diff --git a/view/css/default.css b/view/css/default.css index 768775fbc..6336c82ae 100644 --- a/view/css/default.css +++ b/view/css/default.css @@ -19,7 +19,7 @@ main { #region_1 { position: relative; order: 1; - padding: 4.5rem 7px 0px 7px; + padding: 0 7px 0 7px; width: 25%; min-width: 300px; } @@ -28,14 +28,14 @@ main { position: relative; flex: 1; order: 2; - padding: 4.5rem 7px 200px 7px; + padding: 0 7px 200px 7px; min-width: 0; } #region_3 { position: relative; order: 3; - padding: 4.5rem 7px 0px 7px; + padding: 0 7px 0 7px; width: 25%; min-width: 300px; } diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index c288c8b92..28fb73845 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -57,11 +57,11 @@ $(document).ready(function() { if (document.querySelector('#region_1')) { - stickyScroll('.aside_spacer_left', '.aside_spacer_top_left', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_1')).getPropertyValue('padding-top')), 0); + stickyScroll('.aside_spacer_left', '.aside_spacer_top_left', 'section', parseFloat(document.querySelector('main').getBoundingClientRect().top), 20); } if (document.querySelector('#region_3')) { - stickyScroll('.aside_spacer_right', '.aside_spacer_top_right', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_3')).getPropertyValue('padding-top')), 20); + stickyScroll('.aside_spacer_right', '.aside_spacer_top_right', 'section', parseFloat(document.querySelector('main').getBoundingClientRect().top), 20); } $('.usermenu').click(function() { @@ -211,12 +211,12 @@ function stickyScroll(sticky, stickyTop, container, topOffset, bottomOffset) { setStyle(sticky, { position: 'sticky', top: Math.round(diff) - bottomOffset + 'px', bottom: '' }); } else { // upscroll code - h = sticky.getBoundingClientRect().top - content.getBoundingClientRect().top - topOffset; + h = sticky.getBoundingClientRect().top - content.getBoundingClientRect().top; if(Math.round(stickyTop.getBoundingClientRect().height) === lasth) { setStyle(stickyTop, { height: Math.round(h) + 'px' }); } lasth = Math.round(h); - setStyle(sticky, { position: 'sticky', top: '', bottom: Math.round(diff - topOffset) + 'px' }); + setStyle(sticky, { position: 'sticky', top: '', bottom: Math.round(diff) - topOffset + 'px' }); } lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling } diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index 7333f2d4c..e7fe1effc 100644 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -89,14 +89,14 @@ function coverVisibleActions() { $('body').css('cursor', 'n-resize'); $('.navbar').removeClass('fixed-top'); - $('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); + //$('main').css('margin-top', - $('nav').outerHeight(true) + 'px'); $('main').css('opacity', 0); } function coverHiddenActions() { $('body').css('cursor', ''); $('.navbar').addClass('fixed-top'); - $('main').css('margin-top', ''); + //$('main').css('margin-top', ''); $('main').css('opacity', 1); } </script> diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl index c6f350b09..ed243c103 100644 --- a/view/tpl/navbar_default.tpl +++ b/view/tpl/navbar_default.tpl @@ -1,4 +1,4 @@ -<nav class="navbar fixed-top navbar-expand-lg bg-body-tertiary" {{$navbar_color_mode}}> +<nav id="navbar-top" class="navbar navbar-expand-lg sticky-top bg-body-tertiary mb-4" {{$navbar_color_mode}}> <div class="container-fluid flex-nowrap"> {{if $userinfo}} <div class="d-flex" style="max-width: 50%"> |