Skip to content

Commit 5dd52a4

Browse files
author
jordanmccullough
committed
Merge remote-tracking branch 'origin/master' into curriculum-help-feature
2 parents e833d2a + 722839a commit 5dd52a4

File tree

3 files changed

+10
-47
lines changed

3 files changed

+10
-47
lines changed

_javascript/curriculum.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,14 @@ $(function(){
111111
}
112112

113113
// 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);
119122

120123
// Render the TOC
121124
buildToc();

_layouts/curriculum.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,6 @@ <h4 class="modal-title" id="myModalLabel">Help / Shortcuts</h4>
5757
</div>
5858
</div>
5959

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-
6960
<div class="col-content deck col-md-12 col-sm-12 col-xs-12 materials curriculum shift-left">
7061
<div id="teacher" class="hidden">
7162
<div class="alignment">
@@ -113,6 +104,7 @@ <h4 class="modal-title" id="myModalLabel">Help / Shortcuts</h4>
113104
<div class="col-toc col-md-2 col-sm-2 col-xs-2 shift-left">
114105
<div id="toc-wrapper">
115106
<div id="toc" data-spy="affix" data-offset-top="145">
107+
<h4>Table of Contents</h4>
116108
<ul id="toc-list" class="nav nav-pills nav-stacked" role="tablist">
117109
<li></li>
118110
</ul>

_stylesheets/curriculum.scss

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -42,38 +42,6 @@ table{
4242
}
4343
}
4444

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-
}
7745

7846
#toc-wrapper{
7947
opacity: .5;
@@ -361,7 +329,7 @@ table{
361329
}
362330

363331
.affix{
364-
margin-top: -130px;
332+
margin-top: -165px;
365333
position: fixed;
366334
}
367335

0 commit comments

Comments
 (0)