Skip to content

Commit cdadc27

Browse files
committed
sidebar styles
1 parent 1ae48bb commit cdadc27

File tree

3 files changed

+35
-4
lines changed

3 files changed

+35
-4
lines changed

bit-docs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ var mergeOnto = function(prop, dest, source){
1010

1111
/**
1212
* @module {function} bit-docs-generate-html
13-
* @parent BitDocs
1413
* @group bit-docs-generate-html/modules modules
14+
* @parent plugins
1515
*
1616
* @description Generates HTML for a docMap. Supports plugins.
1717
*
1818
* @body
1919
*
20-
* Blah blah
20+
* TBD
2121
*/
2222

2323
module.exports = function(bitDocs){

site/default/static/static.js

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
var packages = require("./packages");
22
require("./styles/styles.less!");
33
window.PACKAGES = packages;
4+
5+
// sets sidebar height to window height
6+
function setSidebarHeightOnResize() {
7+
var windowHeight = window.innerHeight;
8+
document.getElementsByClassName("sidebar")[0].style.height = windowHeight + "px";
9+
}
10+
setSidebarHeightOnResize();
11+
window.onresize = function() {
12+
setSidebarHeightOnResize();
13+
};
+23-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
@import "locate://bit-docs-site/styles/variables.less";
2-
body{
3-
font-family: @defaultFontFamily;
2+
3+
@sidebar-width: 250px;
4+
5+
body {
6+
font-family: @defaultFontFamily;
7+
margin-left: (@sidebar-width + 25);
8+
}
9+
.sidebar {
10+
float: left;
11+
margin: 0;
12+
margin-top: -19px;
13+
max-width: @sidebar-width;
14+
overflow: auto;
15+
position: fixed;
16+
left: 0;
17+
18+
ul {
19+
white-space: nowrap;
20+
}
21+
22+
.current>a {
23+
font-weight: bold;
24+
}
425
}

0 commit comments

Comments
 (0)