diff options
author | Mario Vavti <mario@mariovavti.com> | 2023-10-04 21:00:00 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2023-10-04 21:00:00 +0200 |
commit | 5265c774ae5917b5200510e668f8182eb07af750 (patch) | |
tree | 2933ae33ade766685f103835b2527594a18ae4c1 | |
parent | d1421d720c3f8ae9a7c409423fcbea4ff8132676 (diff) | |
download | volse-hubzilla-5265c774ae5917b5200510e668f8182eb07af750.tar.gz volse-hubzilla-5265c774ae5917b5200510e668f8182eb07af750.tar.bz2 volse-hubzilla-5265c774ae5917b5200510e668f8182eb07af750.zip |
move right aside into bottom of left aside if screen width is < 1200px
-rw-r--r-- | view/css/widgets.css | 11 | ||||
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 5 | ||||
-rw-r--r-- | view/tpl/notifications_widget.tpl | 7 |
3 files changed, 15 insertions, 8 deletions
diff --git a/view/css/widgets.css b/view/css/widgets.css index bf781cf47..42e869fcd 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -207,14 +207,11 @@ a.wikilist { } .fs { - position: fixed; - top: 0px; - left: 0px; - padding: 4.5rem .5rem 1rem .5rem; + position: absolute; + padding: 0 .5rem 1rem .5rem; background-color: var(--bs-body-bg); - width: 100%; - max-width: 100%; - height: 100%; + width: 100vw; + height: 100vh; z-index: 1019; overflow: auto; } 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); diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index b4b0c02ef..15b29490b 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -13,11 +13,15 @@ } $('.notifications-btn').click(function() { + $('#notifications_wrapper').removeClass('d-none'); + if($('#notifications_wrapper').hasClass('fs')) { $('#notifications_wrapper').prependTo('#' + notifications_parent); + $('#notifications_wrapper').addClass('d-none'); + } else { - $('#notifications_wrapper').prependTo('section'); + $('#notifications_wrapper').prependTo('main'); } $('#notifications_wrapper').toggleClass('fs'); @@ -27,6 +31,7 @@ }); $(document).on('click', '.notification', function() { + $('#notifications_wrapper').addClass('d-none'); if($('#notifications_wrapper').hasClass('fs')) { $('#notifications_wrapper').prependTo('#' + notifications_parent).removeClass('fs'); } |