diff options
author | Mario <mario@mariovavti.com> | 2023-09-13 15:51:10 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-09-13 15:51:10 +0000 |
commit | 9e42be988408e0b4c7cff57c3923c73f6756e861 (patch) | |
tree | db100bae5e09cc7a1d76c35c065b5a783806cc6d /view/theme/redbasic/js | |
parent | 75e75b93cff5b2fb5d6243a908ee003b3faf010a (diff) | |
download | volse-hubzilla-9e42be988408e0b4c7cff57c3923c73f6756e861.tar.gz volse-hubzilla-9e42be988408e0b4c7cff57c3923c73f6756e861.tar.bz2 volse-hubzilla-9e42be988408e0b4c7cff57c3923c73f6756e861.zip |
theme fixes
Diffstat (limited to 'view/theme/redbasic/js')
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 36 |
1 files changed, 2 insertions, 34 deletions
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'); - $('<div id="overlay"></div>').appendTo('body').one('click', function() { toggleAside('left'); }); - } -} |