aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-12-22 11:54:04 +0100
committerMario Vavti <mario@mariovavti.com>2016-12-22 11:54:39 +0100
commit007ba2bee4ae0d0fec8ce97a3b5bebc8b900c68b (patch)
tree8db19929bf8e07da54168a4a5f96a33d2398784c
parente8be8139cb46daa912babcb6c0cdd74d366b9b3b (diff)
downloadvolse-hubzilla-007ba2bee4ae0d0fec8ce97a3b5bebc8b900c68b.tar.gz
volse-hubzilla-007ba2bee4ae0d0fec8ce97a3b5bebc8b900c68b.tar.bz2
volse-hubzilla-007ba2bee4ae0d0fec8ce97a3b5bebc8b900c68b.zip
more robust crossbrowser support
-rw-r--r--view/css/default.css2
-rw-r--r--view/theme/redbasic/css/style.css11
-rw-r--r--view/theme/redbasic/js/redbasic.js16
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')
+ $('<div id="overlay"></div>').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);
}