From c412c01a657fbac49f611b94b4c88cf63f4fff77 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 18 Jul 2023 11:00:21 +0000 Subject: fix admin table highlight by adding the correct classes --- view/theme/redbasic/css/style.css | 4 ---- 1 file changed, 4 deletions(-) (limited to 'view/theme') diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 658a3cf6e..b20977f28 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -924,10 +924,6 @@ a .drop-icons:hover { list-style-type: none; } -#adminpage table tr:hover { - background-color: #BBC7D7; -} - table { border-spacing: 2px; max-width: 100%; -- cgit v1.2.3 From 5d9346999e8e45132596e5940f39c6fd655ddbd9 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 7 Sep 2023 13:29:34 +0200 Subject: redbasic: Use body background color for colorboxes. Typically (only?) used by the "view source" function. --- view/theme/redbasic/css/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/theme') diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index b20977f28..2805ed718 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -608,7 +608,7 @@ nav .acpopup { padding: 3px; border: 0px solid var(--bs-border-color); border-radius: var(--bs-border-radius); - background-color: #fff; + background-color: var(--bs-body-bg); z-index: 1052; } -- cgit v1.2.3 From 0e8ecbc9fc108b4903eb013ca0a4a1f4beb5fbe1 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Sep 2023 08:00:18 +0000 Subject: theme fixes to make a barebones theme work slightly better --- view/theme/redbasic/php/theme_init.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'view/theme') diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php index 0ac580f0e..39fc28f1f 100644 --- a/view/theme/redbasic/php/theme_init.php +++ b/view/theme/redbasic/php/theme_init.php @@ -4,12 +4,10 @@ head_add_css('/library/fork-awesome/css/fork-awesome.min.css'); head_add_css('/vendor/twbs/bootstrap/dist/css/bootstrap.min.css'); head_add_css('/library/bootstrap-tagsinput/bootstrap-tagsinput.css'); head_add_css('/view/css/bootstrap-red.css'); -head_add_css('/library/datetimepicker/jquery.datetimepicker.css'); head_add_css('/library/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css'); require_once('view/php/theme_init.php'); head_add_js('/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.min.js'); head_add_js('/library/bootbox/bootbox.min.js'); head_add_js('/library/bootstrap-tagsinput/bootstrap-tagsinput.js'); -head_add_js('/library/datetimepicker/jquery.datetimepicker.js'); head_add_js('/library/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js'); -- cgit v1.2.3 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/css/style.css | 28 ---------------------------- view/theme/redbasic/js/redbasic.js | 36 ++---------------------------------- 2 files changed, 2 insertions(+), 62 deletions(-) (limited to 'view/theme') diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 2805ed718..6ba5acd63 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1382,34 +1382,6 @@ blockquote { z-index:1030; } - - -@media screen and (max-width: 992px) { - - main { - left: -$left_aside_widthrem; - width: calc( 100% + $left_aside_widthrem ); - } - - main.region_1-on { - left: 0px; - } - - #nav-app-link-wrapper { - min-width: 0; - } - - #nav-app-link-wrapper { - margin-right: 0.5rem; - } - - #navbar-collapse-2 .navbar-app i { - font-size: 1rem; - margin-right: 0.5rem; - } - -} - .shareable_element_text { height: 300px; width: 300px; 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 From 8d3d5747d228c249b0eb88051f6e82ca932b3b4b Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 13 Sep 2023 16:31:38 +0000 Subject: more theme fixes --- view/theme/redbasic/php/theme.php | 2 +- view/theme/redbasic/php/theme_init.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'view/theme') diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php index b7e08705c..82f6c80d3 100644 --- a/view/theme/redbasic/php/theme.php +++ b/view/theme/redbasic/php/theme.php @@ -14,7 +14,7 @@ */ -function redbasic_init(&$a) { +function redbasic_init() { $mode = ''; $navbar_mode = ''; diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php index 39fc28f1f..af2794b8d 100644 --- a/view/theme/redbasic/php/theme_init.php +++ b/view/theme/redbasic/php/theme_init.php @@ -1,11 +1,11 @@ Date: Wed, 13 Sep 2023 20:56:27 +0000 Subject: more theme fixes --- view/theme/redbasic/js/redbasic.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'view/theme') 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 } -- cgit v1.2.3 From 526c85e2ca5f4ab60b6a922f4829f3d8126a6571 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 14 Sep 2023 10:00:24 +0000 Subject: fix minor regression after recent changes --- view/theme/redbasic/js/redbasic.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'view/theme') diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 28fb73845..4ad3665fe 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -134,7 +134,7 @@ $(document).ready(function() { //just one finger touched touch_start = e.touches.item(0).clientX; if (touch_start < touch_max) { - $('html, body').css('overflow-y', 'hidden'); + $('body').css('overflow-y', 'hidden'); } } else { @@ -144,7 +144,7 @@ $(document).ready(function() { }); window.addEventListener('touchend', function(e) { - $('html, body').css('overflow-y', ''); + $('body').css('overflow-y', ''); let touch_offset = 30; //at least 30px are a swipe if (touch_start) { @@ -159,7 +159,6 @@ $(document).ready(function() { } if (touch_end < (touch_start - touch_offset)) { //a right -> left swipe - //toggleAside('left'); } } }); -- cgit v1.2.3 From df60be423ab1daf3ab558c9d452dbe68c1a184b1 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 15 Sep 2023 13:50:19 +0000 Subject: redbasic: add functions for reference --- view/theme/redbasic/php/config.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'view/theme') diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php index b4cb281b9..344f3ff68 100644 --- a/view/theme/redbasic/php/config.php +++ b/view/theme/redbasic/php/config.php @@ -129,7 +129,15 @@ class RedbasicConfig { } +function redbasic_theme_admin_enable() { + // This function is called once when the theme is being enabled by the admin + // It can be used to register hooks etc. +} +function redbasic_theme_admin_disable() { + // This function is called once when the theme is being disabled by the admin + // It can be used to unregister hooks etc. +} -- cgit v1.2.3 From 283d27c5b1807b2eb3ada985e53f206fd223f7f0 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 16 Sep 2023 11:35:41 +0000 Subject: css fix --- view/theme/redbasic/css/style.css | 4 ---- 1 file changed, 4 deletions(-) (limited to 'view/theme') diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 6ba5acd63..6fbcf5077 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1378,10 +1378,6 @@ blockquote { background-color: var(--bs-tertiary-bg); } -.navbar { - z-index:1030; -} - .shareable_element_text { height: 300px; width: 300px; -- cgit v1.2.3 From 38c2b36606a779a8748cf0cb410101b9c64581a9 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 25 Sep 2023 20:00:33 +0000 Subject: =?UTF-8?q?=C3=85=C3=85fix=20narrow=20navbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/theme/redbasic/css/narrow_navbar.css | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'view/theme') diff --git a/view/theme/redbasic/css/narrow_navbar.css b/view/theme/redbasic/css/narrow_navbar.css index 7a48fc71e..9f915418e 100644 --- a/view/theme/redbasic/css/narrow_navbar.css +++ b/view/theme/redbasic/css/narrow_navbar.css @@ -4,16 +4,6 @@ --bs-navbar-padding-y: 1px; } - .contextual-help-content-open { - top: 2.5rem; - } - - #region_1, - #region_2, - #region_3 { - padding-top: 3.5rem; - } - #jGrowl.top-right { top: 3.5rem; right: 15px; -- cgit v1.2.3 From 5265c774ae5917b5200510e668f8182eb07af750 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 4 Oct 2023 21:00:00 +0200 Subject: move right aside into bottom of left aside if screen width is < 1200px --- view/theme/redbasic/js/redbasic.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'view/theme') diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 4ad3665fe..0f2617cc0 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -55,6 +55,11 @@ $(document).ready(function() { } $('#css3-calc').remove(); // Remove the test element + if($(window).width() < 1200) { + $("#right_aside_wrapper").children().detach().appendTo('#left_aside_wrapper'); + $('#notifications_wrapper').addClass('d-none'); + } + if (document.querySelector('#region_1')) { stickyScroll('.aside_spacer_left', '.aside_spacer_top_left', 'section', parseFloat(document.querySelector('main').getBoundingClientRect().top), 20); -- cgit v1.2.3 From 547e6542ba7d396cc1c349577e2078fda098bee6 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 7 Nov 2023 10:09:31 +0000 Subject: move color_mode related code to theme_init.php --- view/theme/redbasic/php/theme.php | 20 -------------------- view/theme/redbasic/php/theme_init.php | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 20 deletions(-) (limited to 'view/theme') diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php index 82f6c80d3..c33c4f78e 100644 --- a/view/theme/redbasic/php/theme.php +++ b/view/theme/redbasic/php/theme.php @@ -16,24 +16,4 @@ function redbasic_init() { - $mode = ''; - $navbar_mode = ''; - - if (local_channel()) { - $mode = ((get_pconfig(local_channel(), 'redbasic', 'dark_mode')) ? 'dark' : 'light'); - $navbar_mode = ((get_pconfig(local_channel(), 'redbasic', 'navbar_dark_mode')) ? 'dark' : 'light'); - } - - if (App::$profile_uid) { - $mode = ((get_pconfig(App::$profile_uid, 'redbasic', 'dark_mode')) ? 'dark' : 'light'); - $navbar_mode = ((get_pconfig(App::$profile_uid, 'redbasic', 'navbar_dark_mode')) ? 'dark' : 'light'); - } - - if (!$mode) { - $mode = ((get_config('redbasic', 'dark_mode')) ? 'dark' : 'light'); - $navbar_mode = ((get_config('redbasic', 'navbar_dark_mode')) ? 'dark' : 'light'); - } - - App::$page['color_mode'] = 'data-bs-theme="' . $mode . '"'; - App::$page['navbar_color_mode'] = (($navbar_mode === 'dark') ? 'data-bs-theme="' . $navbar_mode . '"' : ''); } diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php index af2794b8d..cb81165b1 100644 --- a/view/theme/redbasic/php/theme_init.php +++ b/view/theme/redbasic/php/theme_init.php @@ -11,3 +11,24 @@ head_add_js('/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.min.js'); head_add_js('/library/bootbox/bootbox.min.js'); head_add_js('/library/bootstrap-tagsinput/bootstrap-tagsinput.js'); head_add_js('/library/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js'); + +$redbasic_mode = ''; +$redbasic_navbar_mode = ''; + +if (local_channel()) { + $redbasic_mode = ((get_pconfig(local_channel(), 'redbasic', 'dark_mode')) ? 'dark' : 'light'); + $redbasic_navbar_mode = ((get_pconfig(local_channel(), 'redbasic', 'navbar_dark_mode')) ? 'dark' : 'light'); +} + +if (App::$profile_uid) { + $redbasic_mode = ((get_pconfig(App::$profile_uid, 'redbasic', 'dark_mode')) ? 'dark' : 'light'); + $redbasic_navbar_mode = ((get_pconfig(App::$profile_uid, 'redbasic', 'navbar_dark_mode')) ? 'dark' : 'light'); +} + +if (!$redbasic_mode) { + $redbasic_mode = ((get_config('redbasic', 'dark_mode')) ? 'dark' : 'light'); + $redbasic_navbar_mode = ((get_config('redbasic', 'navbar_dark_mode')) ? 'dark' : 'light'); +} + +App::$page['color_mode'] = 'data-bs-theme="' . $redbasic_mode . '"'; +App::$page['navbar_color_mode'] = (($redbasic_navbar_mode === 'dark') ? 'data-bs-theme="' . $redbasic_navbar_mode . '"' : ''); -- cgit v1.2.3 From 3c20231aadab1c8a687469f8f5d67248a2798e1a Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 15 Nov 2023 22:11:20 +0000 Subject: add backlink to profile to profile vcard and adjust switch colors for better visibility --- view/theme/redbasic/css/style.css | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'view/theme') diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 6fbcf5077..3bf5d5f20 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1481,10 +1481,6 @@ dl.bb-dl > dd > li { font-weight: normal; } -.onoffswitch.checkbox:hover label { - color: var(--bs-link-color); -} - .onoffswitch.checkbox:hover > div label { border-color: var(--bs-link-color); } @@ -1502,21 +1498,21 @@ dl.bb-dl > dd > li { .onoffswitch-inner:before { content: attr(data-on); padding-right: 21px; - background-color: rgba(var(--bs-body-color-rgb), 0); + background-color: var(--bs-secondary-bg); text-align: right; } .onoffswitch-inner:after { content: attr(data-off); padding-left: 21px; - background-color: rgba(var(--bs-body-color-rgb), 0); - color: var(--bs-border-color); + background-color: var(--bs-secondary-bg); text-align: left; } .onoffswitch-switch { display: block; width: 15px; margin:4px; - background: var(--bs-secondary-bg); + background: var(--bs-tertiary-color); + color: var(--bs-secondary-color); border-radius: 10px; position: absolute; top: 0; bottom: 0; right: 36px; transition: right 0.2s ease-in-out; -- cgit v1.2.3