Skip to content

Commit cc7b952

Browse files
committed
Attempt to improve sidebar
1 parent 7635813 commit cc7b952

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

data/codebrowser.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,10 @@ $(function () {
12381238

12391239
/*-------------------------------------------------------------------------------------*/
12401240

1241-
$('#content').append('<div id="allSideBoxes">');
1241+
//$('body').append('<div id="allSideBoxes">');
1242+
//$('#content').prepend('<div id="allSideBoxes">');
1243+
//$('body').prepend('<div id="allSideBoxes">');
1244+
$('#content').before('<div id="allSideBoxes">');
12421245

12431246
// The definitions side bar
12441247
var dfns = document.getElementsByClassName('def');

data/common.css

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,20 @@ a:hover{ text-decoration: underline }
88
div#header { position:fixed; top:0; left:0; right:0; background-color: #f5f5f5; z-index:2; height: 5.2em; overflow: clip; }
99
div#header+hr {position:fixed; top:5.2em; left:0; right:0; z-index:2}
1010
div#header input {-webkit-appearance:searchfield;-moz-appearance:searchfield;appearance:searchfield;}
11-
div#content { margin-top: 5.3em; }
11+
div#content { margin-top: 5.3em; overflow:auto;/*width:100%;*/height:calc(100vh - 5.3em);}
1212

1313
/* Fixme: We could experiment around with max-height: 90 vh? */
1414
#allSideBoxes {
15-
position:fixed; margin-top:1ex; top:5.2em; right:10px; z-index:1;
16-
max-height:30em;
15+
float:right;
16+
display:inline-block;
17+
/*position:fixed; margin-top:0px; margin-right:0px;top:5.2em; right:0px*/;/* z-index:1;*/
18+
/*max-height:30em;
19+
max-height:calc(100vh - 5.2em);
20+
height:calc(100vh - 5.2em);*/
21+
background-color:red;
1722
}
1823
.sideBox {
19-
padding:1ex; border-radius:0.5ex; overflow:hide; font-size:smaller; margin-bottom:1em;
24+
padding:1ex; border-radius:0.25ex; overflow:hide; font-size:smaller; margin-bottom:1em;
2025
max-height:100%;
2126
}
2227
.sideBox h3 { text-align:center; width:100%; cursor: pointer; cursor: hand; margin: 0;}
@@ -26,6 +31,9 @@ display:block; overflow:auto; max-width:20em; max-height:20em; list-style:none;
2631
.sideBox li {
2732
list-style-type: none; padding: 0; margin-right: 1ex;
2833
}
34+
@media only screen and (max-height: 50em) {
35+
.sideBox {max-height:25em;}
36+
}
2937

3038
.code { border-collapse:collapse; width:100%; padding:0 }
3139
.code { font-family: monospace; }

0 commit comments

Comments
 (0)