File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ( function ( ) {
2+
3+ var Init = {
4+
5+ start : function ( ) {
6+ var classname = this . hasClass ( document . body , 'page-sub' ) ;
7+
8+ if ( classname ) {
9+ this . addEventListeners ( ) ;
10+ }
11+ } ,
12+
13+ hasClass : function ( elem , className ) {
14+ return new RegExp ( ' ' + className + ' ' ) . test ( ' ' + elem . className + ' ' ) ;
15+ } ,
16+
17+ addEventListeners : function ( ) {
18+ var _this = this ;
19+ //console.log(document.querySelectorAll('.navbar-static-top')[0]);
20+ window . addEventListener ( 'resize' , _this . resizeImage , false ) ;
21+
22+ this . resizeImage ( ) ;
23+ } ,
24+
25+ resizeImage : function ( ) {
26+ console . log ( 'resizeImage' )
27+
28+ var header = document . getElementById ( 'header' ) ,
29+ footer = document . getElementById ( 'footer-wrap' ) ,
30+ main = document . getElementById ( 'main-content' ) ,
31+ vp = window . innerHeight ,
32+ bodyHeight = document . body . clientHeight ,
33+ hHeight = header . clientHeight ,
34+ fHeight = footer . clientHeight ,
35+ withMinHeight = hHeight + fHeight + 830 ;
36+
37+ if ( withMinHeight > bodyHeight ) {
38+ var newHeight = ( vp - ( hHeight + fHeight ) ) + 'px' ;
39+ main . style . height = newHeight ;
40+ }
41+ }
42+
43+ } ;
44+
45+ Init . start ( ) ;
46+
47+ } ) ( ) ;
Original file line number Diff line number Diff line change 2323
2424< script type ="text/javascript " src ="/javascripts/lib/jquery-2.0.3.min.js "> </ script >
2525< script type ="text/javascript " src ="/javascripts/lib/bootstrap.min.js "> </ script >
26+ < script type ="text/javascript " src ="/javascripts/docs.js "> </ script >
2627< script type ="text/javascript " src ="/javascripts/lib/dbg.js "> </ script >
2728< script type ="text/javascript " src ="/javascripts/lib/Function.prototype.bind.js "> </ script >
2829< script type ="text/javascript " src ="/javascripts/lib/Base.js "> </ script >
Original file line number Diff line number Diff line change 33 < div class ="col-md-4 ">
44 <%= yield_content :sidebar %>
55 </ div > <!-- /col-md-4 -->
6- < div class ="col-md-8 " role ="main ">
6+ < div id =" main-content " class ="col-md-8 " role ="main ">
77 < div class ="bs-docs-section ">
88 <%= yield %>
99 </ div >
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ body.layout-inner,
1717body .layout-downloads ,
1818body .layout-intro {
1919 background : @light-black url(' ../images/sidebar-wire.png' ) left 62px no-repeat ;
20-
20+
2121 > .container {
2222 .col-md-8 [role = main]{
2323 min-height : 800px ;
You can’t perform that action at this time.
0 commit comments