From 9e42be988408e0b4c7cff57c3923c73f6756e861 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 13 Sep 2023 15:51:10 +0000 Subject: theme fixes --- view/theme/redbasic/js/redbasic.js | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) (limited to 'view/theme/redbasic/js/redbasic.js') diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 706bf2808..c288c8b92 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -8,20 +8,15 @@ let redbasic_theme_color = localStorage.getItem('redbasic_theme_color'); if (redbasic_dark_mode == 1) { $('html').attr('data-bs-theme', 'dark'); } + if (redbasic_dark_mode == 0) { $('html').attr('data-bs-theme', 'light'); } - - - - if (redbasic_theme_color) { $('meta[name=theme-color]').attr('content', redbasic_theme_color); } - - $(document).ready(function() { // provide a fake progress bar for pwa standalone mode if (window.matchMedia('(display-mode: standalone)').matches) { @@ -69,15 +64,6 @@ $(document).ready(function() { stickyScroll('.aside_spacer_right', '.aside_spacer_top_right', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_3')).getPropertyValue('padding-top')), 20); } - $('#expand-aside').on('click', function() { - if($('main').hasClass('region_1-on')){ - toggleAside('left'); - } - else { - toggleAside('right'); - } - }); - $('.usermenu').click(function() { if($('#navbar-collapse-1, #navbar-collapse-2').hasClass('show')){ $('#navbar-collapse-1, #navbar-collapse-2').removeClass('show'); @@ -168,7 +154,7 @@ $(document).ready(function() { if (touch_end > (touch_start + touch_offset)) { //a left -> right swipe if (touch_start < touch_max) { - toggleAside('right'); + toggleAside(); } } if (touch_end < (touch_start - touch_offset)) { @@ -178,10 +164,6 @@ $(document).ready(function() { } }); - $(document).on('hz:hqControlsClickAction', function(e) { - toggleAside('left'); - }); - }); function setStyle(element, cssProperty) { @@ -255,18 +237,4 @@ function makeFullScreen(full) { } } -function toggleAside(swipe) { - if ($('main').hasClass('region_1-on') && swipe === 'left') { - $('#expand-aside-icon').addClass('fa-arrow-circle-right').removeClass('fa-arrow-circle-left'); - $('html, body').css({ 'position': '', left: '' }); - $('main').removeClass('region_1-on'); - $('#overlay').remove(); - } - if (!$('main').hasClass('region_1-on') && swipe === 'right') { - $('#expand-aside-icon').removeClass('fa-arrow-circle-right').addClass('fa-arrow-circle-left'); - $('html, body').css({ 'position': 'sticky', 'left': '0px'}); - $('main').addClass('region_1-on'); - $('
').appendTo('body').one('click', function() { toggleAside('left'); }); - } -} -- cgit v1.2.3