aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme
diff options
context:
space:
mode:
Diffstat (limited to 'view/theme')
-rw-r--r--view/theme/redbasic/js/redbasic.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js
index ca27bb825..7a6d795a4 100644
--- a/view/theme/redbasic/js/redbasic.js
+++ b/view/theme/redbasic/js/redbasic.js
@@ -6,18 +6,19 @@ let redbasic_dark_mode = localStorage.getItem('redbasic_dark_mode');
if (redbasic_dark_mode == 1) {
$('html').attr('data-bs-theme', 'light');
- $('meta[name=theme-color]').attr('content', $('nav').css('background-color'));
$('#theme-switch-icon').removeClass('fa-sun-o').addClass('fa-moon-o');
}
if (redbasic_dark_mode == 2) {
$('html').attr('data-bs-theme', 'dark');
- $('meta[name=theme-color]').attr('content', $('nav').css('background-color'));
$('#theme-switch-icon').removeClass('fa-moon-o').addClass('fa-sun-o');
}
+
$(document).ready(function() {
+ $('meta[name=theme-color]').attr('content', $('nav').css('background-color'));
+
// CSS3 calc() fallback (for unsupported browsers)
$('body').append('<div id="css3-calc" style="width: 10px; width: calc(10px + 10px); display: none;"></div>');
if( $('#css3-calc').width() == 10) {
@@ -31,6 +32,7 @@ $(document).ready(function() {
}
$('#css3-calc').remove(); // Remove the test element
+
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);
}