From f813671b672a55873856649ea3405d52218c1500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20S=2E=20Budzi=C5=84ski?= Date: Wed, 27 Jan 2021 10:57:30 +0100 Subject: Merge branch 'translation-pl' into 'dev' Translation pl Polish translations (used on hub.hubzilla.pl) - view/pl: 100% - doc/pl: ~40% - doc/context/pl: 100% - doc/macros/pl: 100% See merge request hubzilla/core!1902 --- view/theme/redbasic/css/blockmode.css | 0 view/theme/redbasic/css/mod_page.css | 0 view/theme/redbasic/css/narrow_navbar.css | 0 view/theme/redbasic/css/sloppy_photos.css | 0 view/theme/redbasic/css/style.css | 0 .../gray_and_black_diagonal_stripes_background_seamless.gif | Bin .../gray_and_white_diagonal_stripes_background_seamless.gif | Bin view/theme/redbasic/img/screenshot.png | Bin view/theme/redbasic/js/redbasic.js | 0 view/theme/redbasic/php/config.php | 0 view/theme/redbasic/php/style.php | 0 view/theme/redbasic/php/theme.php | 0 view/theme/redbasic/php/theme_init.php | 0 view/theme/redbasic/schema/Focus-Boxy.css | 0 view/theme/redbasic/schema/Focus-Boxy.php | 0 view/theme/redbasic/schema/Focus-Light.css | 0 view/theme/redbasic/schema/Focus-Light.php | 0 view/theme/redbasic/schema/dark.css | 0 view/theme/redbasic/schema/dark.php | 0 view/theme/redbasic/tpl/theme_settings.tpl | 0 20 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 view/theme/redbasic/css/blockmode.css mode change 100644 => 100755 view/theme/redbasic/css/mod_page.css mode change 100644 => 100755 view/theme/redbasic/css/narrow_navbar.css mode change 100644 => 100755 view/theme/redbasic/css/sloppy_photos.css mode change 100644 => 100755 view/theme/redbasic/css/style.css mode change 100644 => 100755 view/theme/redbasic/img/gray_and_black_diagonal_stripes_background_seamless.gif mode change 100644 => 100755 view/theme/redbasic/img/gray_and_white_diagonal_stripes_background_seamless.gif mode change 100644 => 100755 view/theme/redbasic/img/screenshot.png mode change 100644 => 100755 view/theme/redbasic/js/redbasic.js mode change 100644 => 100755 view/theme/redbasic/php/config.php mode change 100644 => 100755 view/theme/redbasic/php/style.php mode change 100644 => 100755 view/theme/redbasic/php/theme.php mode change 100644 => 100755 view/theme/redbasic/php/theme_init.php mode change 100644 => 100755 view/theme/redbasic/schema/Focus-Boxy.css mode change 100644 => 100755 view/theme/redbasic/schema/Focus-Boxy.php mode change 100644 => 100755 view/theme/redbasic/schema/Focus-Light.css mode change 100644 => 100755 view/theme/redbasic/schema/Focus-Light.php mode change 100644 => 100755 view/theme/redbasic/schema/dark.css mode change 100644 => 100755 view/theme/redbasic/schema/dark.php mode change 100644 => 100755 view/theme/redbasic/tpl/theme_settings.tpl (limited to 'view/theme/redbasic') diff --git a/view/theme/redbasic/css/blockmode.css b/view/theme/redbasic/css/blockmode.css old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/css/mod_page.css b/view/theme/redbasic/css/mod_page.css old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/css/narrow_navbar.css b/view/theme/redbasic/css/narrow_navbar.css old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/css/sloppy_photos.css b/view/theme/redbasic/css/sloppy_photos.css old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/img/gray_and_black_diagonal_stripes_background_seamless.gif b/view/theme/redbasic/img/gray_and_black_diagonal_stripes_background_seamless.gif old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/img/gray_and_white_diagonal_stripes_background_seamless.gif b/view/theme/redbasic/img/gray_and_white_diagonal_stripes_background_seamless.gif old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/img/screenshot.png b/view/theme/redbasic/img/screenshot.png old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/schema/Focus-Boxy.css b/view/theme/redbasic/schema/Focus-Boxy.css old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/schema/Focus-Boxy.php b/view/theme/redbasic/schema/Focus-Boxy.php old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/schema/Focus-Light.css b/view/theme/redbasic/schema/Focus-Light.css old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/schema/Focus-Light.php b/view/theme/redbasic/schema/Focus-Light.php old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/schema/dark.css b/view/theme/redbasic/schema/dark.css old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/schema/dark.php b/view/theme/redbasic/schema/dark.php old mode 100644 new mode 100755 diff --git a/view/theme/redbasic/tpl/theme_settings.tpl b/view/theme/redbasic/tpl/theme_settings.tpl old mode 100644 new mode 100755 -- cgit v1.2.3 From af719fea406f7acd24f65f7396b58c8654e590c9 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 27 Jan 2021 10:15:26 +0000 Subject: fix file permissions. 755 for dirs, 644 for files --- view/theme/redbasic/css/blockmode.css | 0 view/theme/redbasic/css/mod_page.css | 0 view/theme/redbasic/css/narrow_navbar.css | 0 view/theme/redbasic/css/sloppy_photos.css | 0 view/theme/redbasic/css/style.css | 0 .../gray_and_black_diagonal_stripes_background_seamless.gif | Bin .../gray_and_white_diagonal_stripes_background_seamless.gif | Bin view/theme/redbasic/img/screenshot.png | Bin view/theme/redbasic/js/redbasic.js | 0 view/theme/redbasic/php/config.php | 0 view/theme/redbasic/php/style.php | 0 view/theme/redbasic/php/theme.php | 0 view/theme/redbasic/php/theme_init.php | 0 view/theme/redbasic/schema/Focus-Boxy.css | 0 view/theme/redbasic/schema/Focus-Boxy.php | 0 view/theme/redbasic/schema/Focus-Light.css | 0 view/theme/redbasic/schema/Focus-Light.php | 0 view/theme/redbasic/schema/dark.css | 0 view/theme/redbasic/schema/dark.php | 0 view/theme/redbasic/tpl/theme_settings.tpl | 0 20 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 view/theme/redbasic/css/blockmode.css mode change 100755 => 100644 view/theme/redbasic/css/mod_page.css mode change 100755 => 100644 view/theme/redbasic/css/narrow_navbar.css mode change 100755 => 100644 view/theme/redbasic/css/sloppy_photos.css mode change 100755 => 100644 view/theme/redbasic/css/style.css mode change 100755 => 100644 view/theme/redbasic/img/gray_and_black_diagonal_stripes_background_seamless.gif mode change 100755 => 100644 view/theme/redbasic/img/gray_and_white_diagonal_stripes_background_seamless.gif mode change 100755 => 100644 view/theme/redbasic/img/screenshot.png mode change 100755 => 100644 view/theme/redbasic/js/redbasic.js mode change 100755 => 100644 view/theme/redbasic/php/config.php mode change 100755 => 100644 view/theme/redbasic/php/style.php mode change 100755 => 100644 view/theme/redbasic/php/theme.php mode change 100755 => 100644 view/theme/redbasic/php/theme_init.php mode change 100755 => 100644 view/theme/redbasic/schema/Focus-Boxy.css mode change 100755 => 100644 view/theme/redbasic/schema/Focus-Boxy.php mode change 100755 => 100644 view/theme/redbasic/schema/Focus-Light.css mode change 100755 => 100644 view/theme/redbasic/schema/Focus-Light.php mode change 100755 => 100644 view/theme/redbasic/schema/dark.css mode change 100755 => 100644 view/theme/redbasic/schema/dark.php mode change 100755 => 100644 view/theme/redbasic/tpl/theme_settings.tpl (limited to 'view/theme/redbasic') diff --git a/view/theme/redbasic/css/blockmode.css b/view/theme/redbasic/css/blockmode.css old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/css/mod_page.css b/view/theme/redbasic/css/mod_page.css old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/css/narrow_navbar.css b/view/theme/redbasic/css/narrow_navbar.css old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/css/sloppy_photos.css b/view/theme/redbasic/css/sloppy_photos.css old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/img/gray_and_black_diagonal_stripes_background_seamless.gif b/view/theme/redbasic/img/gray_and_black_diagonal_stripes_background_seamless.gif old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/img/gray_and_white_diagonal_stripes_background_seamless.gif b/view/theme/redbasic/img/gray_and_white_diagonal_stripes_background_seamless.gif old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/img/screenshot.png b/view/theme/redbasic/img/screenshot.png old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/schema/Focus-Boxy.css b/view/theme/redbasic/schema/Focus-Boxy.css old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/schema/Focus-Boxy.php b/view/theme/redbasic/schema/Focus-Boxy.php old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/schema/Focus-Light.css b/view/theme/redbasic/schema/Focus-Light.css old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/schema/Focus-Light.php b/view/theme/redbasic/schema/Focus-Light.php old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/schema/dark.css b/view/theme/redbasic/schema/dark.css old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/schema/dark.php b/view/theme/redbasic/schema/dark.php old mode 100755 new mode 100644 diff --git a/view/theme/redbasic/tpl/theme_settings.tpl b/view/theme/redbasic/tpl/theme_settings.tpl old mode 100755 new mode 100644 -- cgit v1.2.3 From b29e121113a588d88b3d8f4265bece2c5e997cef Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 25 Feb 2021 12:55:19 +0000 Subject: replace sticky_kit with a simpler homwgrown solution (still a bit raw) and slightly change the way we load new content so that people with a long aside column do not have to scroll all the way to the bottom for loading the next page --- view/theme/redbasic/js/redbasic.js | 88 +++++++++++++++++++++------------- view/theme/redbasic/php/theme_init.php | 2 - 2 files changed, 55 insertions(+), 35 deletions(-) (limited to 'view/theme/redbasic') diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 8d3b795cc..b0b8d5dfc 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -17,13 +17,8 @@ $(document).ready(function() { } $('#css3-calc').remove(); // Remove the test element - if($(window).width() >= 992) { - $('#left_aside_wrapper, #right_aside_wrapper').stick_in_parent({ - offset_top: parseInt($('aside').css('padding-top')), - parent: 'main', - spacer: '.aside_spacer' - }); - } + stickyScroll('.aside_spacer_left', '.aside_spacer_top_left', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_1')).getPropertyValue('padding-top')), 0); + stickyScroll('.aside_spacer_right', '.aside_spacer_top_right', '.content', parseFloat(window.getComputedStyle(document.querySelector('#region_3')).getPropertyValue('padding-top')), 20); $('#expand-aside').on('click', toggleAside); @@ -33,24 +28,6 @@ $(document).ready(function() { } }); - var left_aside_height = $('#left_aside_wrapper').height(); - - $('#left_aside_wrapper').on('click', function() { - if(left_aside_height != $('#left_aside_wrapper').height()) { - $(document.body).trigger("sticky_kit:recalc"); - left_aside_height = $('#left_aside_wrapper').height(); - } - }); - - - var right_aside_height = $('#right_aside_wrapper').height(); - - $('#right_aside_wrapper').on('click', function() { - if(right_aside_height != $('#right_aside_wrapper').height()) { - $(document.body).trigger("sticky_kit:recalc"); - right_aside_height = $('#right_aside_wrapper').height(); - } - }); $('.usermenu').click(function() { if($('#navbar-collapse-1, #navbar-collapse-2').hasClass('show')){ @@ -84,7 +61,7 @@ $(document).ready(function() { var doctitle = document.title; function checkNotify() { var notifyUpdateElem = document.getElementById('notify-update'); - if(notifyUpdateElem !== null) { + if(notifyUpdateElem !== null) { if(notifyUpdateElem.innerHTML !== "") document.title = "(" + notifyUpdateElem.innerHTML + ") " + doctitle; else @@ -94,6 +71,58 @@ $(document).ready(function() { setInterval(function () {checkNotify();}, 10 * 1000); }); +function setStyle(element, cssProperty) { + for (var property in cssProperty){ + element.style[property] = cssProperty[property]; + } +} + +function stickyScroll(sticky, stickyTop, container, topOffset, bottomOffset) { + var lastScrollTop = 0; + var sticky = document.querySelector(sticky); + var stickyHeight = sticky.getBoundingClientRect().height; + var stickyTop = document.querySelector(stickyTop); + var content = document.querySelector(container); + var diff = window.innerHeight - stickyHeight; + var h = 0; + var lasth = 0; + var st = window.pageYOffset || document.documentElement.scrollTop; + + var resizeObserver = new ResizeObserver(function(entries) { + stickyHeight = sticky.getBoundingClientRect().height; + st = window.pageYOffset || document.documentElement.scrollTop; + diff = window.innerHeight - stickyHeight; + }); + + resizeObserver.observe(sticky); + resizeObserver.observe(content); + + window.addEventListener('scroll', function() { + if(window.innerHeight > stickyHeight + topOffset) { + setStyle(stickyTop, { height: 0 + 'px' }); + setStyle(sticky, { position: 'sticky', top: topOffset + 'px'}); + } + else { + st = window.pageYOffset || document.documentElement.scrollTop; // Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426" + if (st > lastScrollTop){ + // downscroll code + setStyle(stickyTop, { height: lasth + 'px' }); + setStyle(sticky, { position: 'sticky', top: Math.round(diff) - bottomOffset + 'px', bottom: '' }); + } else { + // upscroll code + h = sticky.getBoundingClientRect().top - content.getBoundingClientRect().top - topOffset; + 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' }); + } + lastScrollTop = st <= 0 ? 0 : st; // For Mobile or negative scrolling + } + }, false); + +} + function makeFullScreen(full) { if(typeof full=='undefined' || full == true) { $('main').addClass('fullscreen'); @@ -104,7 +133,6 @@ function makeFullScreen(full) { $('main').removeClass('fullscreen'); $('header, nav, aside, #fullscreen-btn').show(); $('#inline-btn').hide(); - $(document.body).trigger("sticky_kit:recalc"); } } @@ -114,16 +142,10 @@ function toggleAside() { $('html, body').css('overflow-x', ''); $('main').removeClass('region_1-on') $('#overlay').remove(); - $('#left_aside_wrapper').trigger("sticky_kit:detach"); } else { $('html, body').css('overflow-x', 'hidden'); $('main').addClass('region_1-on') $('
').appendTo('section'); - $('#left_aside_wrapper').stick_in_parent({ - offset_top: parseInt($('aside').css('padding-top')), - parent: 'main', - spacer: '.aside_spacer' - }); } } diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php index 5f73f6736..0ac580f0e 100644 --- a/view/theme/redbasic/php/theme_init.php +++ b/view/theme/redbasic/php/theme_init.php @@ -13,5 +13,3 @@ 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