File tree Expand file tree Collapse file tree 3 files changed +10
-47
lines changed Expand file tree Collapse file tree 3 files changed +10
-47
lines changed Original file line number Diff line number Diff line change @@ -111,11 +111,14 @@ $(function(){
111
111
}
112
112
113
113
// Bind checkbox toggle for TOC
114
- $ ( ".toc-toggle-check" ) . change ( function ( ) {
115
- console . log ( "shiftleft on both." ) ;
116
- $ ( ".col-content" ) . toggleClass ( "shift-left" ) ;
117
- $ ( ".col-toc" ) . toggleClass ( "shift-left" ) ;
118
- } ) ;
114
+ var toc = { } ;
115
+ toc . toggle = function ( event ) {
116
+ if ( event . shiftKey && event . keyCode === 84 ) {
117
+ $ ( ".col-content" ) . toggleClass ( "shift-left" ) ;
118
+ $ ( ".col-toc" ) . toggleClass ( "shift-left" ) ;
119
+ }
120
+ }
121
+ document . addEventListener ( "keydown" , toc . toggle , false ) ;
119
122
120
123
// Render the TOC
121
124
buildToc ( ) ;
Original file line number Diff line number Diff line change @@ -57,15 +57,6 @@ <h4 class="modal-title" id="myModalLabel">Help / Shortcuts</h4>
57
57
</ div >
58
58
</ div >
59
59
60
-
61
- < div id ="toc-toggle ">
62
- < input type ="checkbox " class ="toc-toggle-check " id ="toc-toggle-check " name ="toc-toggle-check " value ="true " checked ="checked ">
63
- < label class ="toc-toggle-label " for ="toc-toggle-check ">
64
- < span class ="octicon octicon-list-unordered "> </ span >
65
- <!-- <span class="toc-header">Table of Contents</span> -->
66
- </ label >
67
- </ div >
68
-
69
60
< div class ="col-content deck col-md-12 col-sm-12 col-xs-12 materials curriculum shift-left ">
70
61
< div id ="teacher " class ="hidden ">
71
62
< div class ="alignment ">
@@ -113,6 +104,7 @@ <h4 class="modal-title" id="myModalLabel">Help / Shortcuts</h4>
113
104
< div class ="col-toc col-md-2 col-sm-2 col-xs-2 shift-left ">
114
105
< div id ="toc-wrapper ">
115
106
< div id ="toc " data-spy ="affix " data-offset-top ="145 ">
107
+ < h4 > Table of Contents</ h4 >
116
108
< ul id ="toc-list " class ="nav nav-pills nav-stacked " role ="tablist ">
117
109
< li > </ li >
118
110
</ ul >
Original file line number Diff line number Diff line change @@ -42,38 +42,6 @@ table{
42
42
}
43
43
}
44
44
45
- #toc-toggle {
46
- position : fixed ;
47
- top : 15px ;
48
- right : 24px ;
49
- padding : 0 ;
50
- margin : 0 ;
51
- z-index :1000 ;
52
- }
53
- .toc-toggle-check {
54
- visibility : hidden ;
55
- width : 0 ;
56
- height : 0 ;
57
-
58
- & + .toc-toggle-label {
59
- color : $gray-darker ;
60
- opacity : .3 ;
61
-
62
- .toc-header {
63
- margin-left : 1em ;
64
- display : none ;
65
- }
66
- }
67
-
68
- & :checked + .toc-toggle-label {
69
- opacity : 1 ;
70
- // right: 16.66667%;
71
-
72
- .toc-header {
73
- display : inline ;
74
- }
75
- }
76
- }
77
45
78
46
#toc-wrapper {
79
47
opacity : .5 ;
@@ -361,7 +329,7 @@ table{
361
329
}
362
330
363
331
.affix {
364
- margin-top : -130 px ;
332
+ margin-top : -165 px ;
365
333
position : fixed ;
366
334
}
367
335
You can’t perform that action at this time.
0 commit comments