From 007ba2bee4ae0d0fec8ce97a3b5bebc8b900c68b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 22 Dec 2016 11:54:04 +0100 Subject: more robust crossbrowser support --- view/css/default.css | 2 ++ view/theme/redbasic/css/style.css | 11 ++++++++++- view/theme/redbasic/js/redbasic.js | 16 ++++++++++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/view/css/default.css b/view/css/default.css index db0628cb3..67a411d6e 100644 --- a/view/css/default.css +++ b/view/css/default.css @@ -15,12 +15,14 @@ main { } aside { + position: relative; display: table-cell; vertical-align: top; padding: 71px 7px 0px 7px; } section { + position: relative; width: 100%; display: table-cell; vertical-align: top; diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 8c7f43324..7254be552 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -23,7 +23,6 @@ body { margin: 0px; height: 100%; overflow-x: hidden; - } aside { @@ -46,6 +45,16 @@ main { max-width: $main_widthpx; } +#overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + cursor: pointer; + z-index: 1029; +} + h1, .h1 { font-size: 2em; } diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 4a18db8ff..5691a40d0 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -92,7 +92,19 @@ function makeFullScreen(full) { } function toggleAside() { - $(window).scroll(); $('#expand-aside-icon').toggleClass('fa-arrow-circle-right').toggleClass('fa-arrow-circle-left'); - $('main').toggleClass('region_1-on'); + if($('main').hasClass('region_1-on')){ + $('main').removeClass('region_1-on') + $('#overlay').remove(); + } + else { + $('main').addClass('region_1-on') + $('
').appendTo('section'); + } + + $(window).scroll(); + // work around a bug where a browser seems to not trigger scroll with $(window).scroll() + var scrollpos = $(window).scrollTop(); + $(window).scrollTop(scrollpos - 1); + setTimeout(function(){ $(window).scrollTop(scrollpos) }, 100); } -- cgit v1.2.3 From a7a3ce72456b7c1ca1838bd59075e2a656459b81 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 22 Dec 2016 14:55:05 +0100 Subject: a cleaner way to work around browser bugs --- view/theme/redbasic/js/redbasic.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 5691a40d0..f97467947 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -14,7 +14,6 @@ $(document).ready(function() { } }); } - $('#css3-calc').remove(); // Remove the test element $('#left_aside_wrapper').stick_in_parent({ @@ -96,15 +95,13 @@ function toggleAside() { if($('main').hasClass('region_1-on')){ $('main').removeClass('region_1-on') $('#overlay').remove(); + $('#left_aside_wrapper').trigger("sticky_kit:detach"); } else { $('main').addClass('region_1-on') $('
').appendTo('section'); + $('#left_aside_wrapper').stick_in_parent({ + offset_top: $('nav').outerHeight(true) + }); } - - $(window).scroll(); - // work around a bug where a browser seems to not trigger scroll with $(window).scroll() - var scrollpos = $(window).scrollTop(); - $(window).scrollTop(scrollpos - 1); - setTimeout(function(){ $(window).scrollTop(scrollpos) }, 100); } -- cgit v1.2.3 From d7f65ca125ee6020928a48220055f637d8ca5000 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 22 Dec 2016 15:01:29 +0100 Subject: another check --- view/theme/redbasic/js/redbasic.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index f97467947..e31458b4e 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -16,9 +16,11 @@ $(document).ready(function() { } $('#css3-calc').remove(); // Remove the test element - $('#left_aside_wrapper').stick_in_parent({ - offset_top: $('nav').outerHeight(true) - }); + if($(window).width() > 767) { + $('#left_aside_wrapper').stick_in_parent({ + offset_top: $('nav').outerHeight(true) + }); + } $('#expand-aside').on('click', toggleAside); -- cgit v1.2.3 From 4bcc1f5adbe604917c1005028808c29bf48dea69 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 22 Dec 2016 15:20:02 +0100 Subject: move style info into css file --- doc/about/about_hubzilla.bb | 3 +-- doc/toc.html | 32 -------------------------------- view/css/mod_help.css | 29 +++++++++++++++++++++++++++++ view/tpl/help.tpl | 18 +++++++++--------- 4 files changed, 39 insertions(+), 43 deletions(-) create mode 100644 view/css/mod_help.css diff --git a/doc/about/about_hubzilla.bb b/doc/about/about_hubzilla.bb index 1117fd25a..38b99f83d 100644 --- a/doc/about/about_hubzilla.bb +++ b/doc/about/about_hubzilla.bb @@ -1,4 +1,3 @@ - [h3]Project Overview[/h3] $Projectname is a decentralized community server providing communications, identity, and access control services which work together seamlessly across domains and connected websites. It allows anybody to publicly or [b]privately[/b] publish a range of web/media/personal content. The cross-domain privacy implementation is unique and somewhat revolutionary, as identity and access rights are negotiated by servers invisibly in the background. @@ -469,4 +468,4 @@ even if we have had our occasional disagreements. [li]Simó Albert i Beltran[/li] [li]Manuel Reva[/li] [li]Manuel Jiménez Friaza[/li] -[/list] \ No newline at end of file +[/list] diff --git a/doc/toc.html b/doc/toc.html index 6090c4ace..b8816ed91 100644 --- a/doc/toc.html +++ b/doc/toc.html @@ -1,35 +1,3 @@ - -
diff --git a/view/css/mod_help.css b/view/css/mod_help.css new file mode 100644 index 000000000..f59a40894 --- /dev/null +++ b/view/css/mod_help.css @@ -0,0 +1,29 @@ +.doco-list-group-item > a { + font-weight: bold; +} + +.sub-menu { + margin: 3px 0px 10px 10px; +} + +#doco-content h3 { + border-bottom: #ccc 3px solid; + padding-bottom: 0.3em; +} + +#doco-content h4 { + text-decoration: underline; +} + +#doco-content h5 { + text-decoration: underline; +} + +#region_1 .widget ul ul { + list-style-type: none; +} + +.toc-content li, + #doco-top-toc li { + padding: 3px 0px; +} diff --git a/view/tpl/help.tpl b/view/tpl/help.tpl index 494869683..10e0a4957 100644 --- a/view/tpl/help.tpl +++ b/view/tpl/help.tpl @@ -1,19 +1,20 @@
-

{{$title}}: {{$heading}}

+

{{$title}}: {{$heading}}

-

- - {{$tocHeading}} -

- - {{$content}} +

+ + + {{$tocHeading}} + +

+ + {{$content}}
-- cgit v1.2.3