Skip to content

Commit 2e40ef4

Browse files
author
jordanmccullough
committed
Replace custom help with Bootstrap modal
1 parent 3613a91 commit 2e40ef4

File tree

2 files changed

+35
-19
lines changed

2 files changed

+35
-19
lines changed

_javascript/curriculum.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ $(function(){
1313
var help = {};
1414
help.toggle = function(event){
1515
if(event.shiftKey && event.keyCode === 191){
16-
console.log("Toggle help");
17-
18-
$("#help").toggle();
16+
$('#help').modal('toggle');
1917
}
2018
};
2119

_layouts/curriculum.html

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,43 @@
33
leadingpath: ../
44
---
55

6+
<!-- Modal -->
7+
<div class="modal fade" id="help" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
8+
<div class="modal-dialog">
9+
<div class="modal-content">
10+
<div class="modal-header">
11+
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
12+
<h4 class="modal-title" id="myModalLabel">Help / Shortcuts</h4>
13+
</div>
14+
<div class="modal-body">
15+
<table>
16+
<tr>
17+
<th>Command</th>
18+
<th>Feature</th>
19+
</tr>
20+
21+
<tr>
22+
<td><code>?</code></td>
23+
<td>Hide/show help</td>
24+
</tr>
25+
26+
<tr>
27+
<td><code>?teacher=[github-user]</code></td>
28+
<td>Auto-generated teacher slide</td>
29+
</tr>
30+
</table>
31+
</div>
32+
</div>
33+
</div>
34+
</div>
35+
36+
37+
38+
639

740
<div id="help" class="help">
841
<div class="content">
9-
<table>
10-
<tr>
11-
<th>Command</th>
12-
<th>Feature</th>
13-
</tr>
14-
15-
<tr>
16-
<td><code>?</code></td>
17-
<td>Hide/show help</td>
18-
</tr>
19-
20-
<tr>
21-
<td><code>?teacher=[github-user]</code></td>
22-
<td>Auto-generated teacher slide</td>
23-
</tr>
24-
</table>
42+
2543
</div>
2644
</div>
2745

0 commit comments

Comments
 (0)