Skip to content

Commit e142563

Browse files
committed
Add a keyboard help panel to the index page.
1 parent 762cbb4 commit e142563

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

coverage/htmlfiles/coverage_html.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ coverage.index_ready = function ($) {
9595
});
9696

9797
coverage.assign_shortkeys();
98+
coverage.wire_up_help_panel();
9899

99100
// Watch for page unload events so we can save the final sort settings:
100101
$(window).unload(function () {

coverage/htmlfiles/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@
1919
<h1>Coverage report:
2020
<span class='pc_cov'>{{totals.pc_covered_str}}%</span>
2121
</h1>
22+
<img id='keyboard_icon' src='keybd_closed.png'>
23+
</div>
24+
</div>
25+
26+
<div class='help_panel'>
27+
<img id='panel_icon' src='keybd_open.png'>
28+
<p class='legend'>Hot-keys on this page</p>
29+
<div>
30+
<p class='keyhelp'>
31+
<span class='key'>n</span>
32+
<span class='key'>s</span>
33+
<span class='key'>m</span>
34+
<span class='key'>x</span>
35+
{% if arcs %}
36+
<span class='key'>b</span>
37+
<span class='key'>p</span>
38+
{% endif %}
39+
<span class='key'>c</span> &nbsp; change column sorting
40+
</p>
2241
</div>
2342
</div>
2443

coverage/htmlfiles/style.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ h2.stats {
114114
padding: .5em;
115115
border: 1px solid #883;
116116
display: none;
117+
}
118+
119+
#indexfile .help_panel {
120+
width: 20em; height: 4em;
121+
}
122+
123+
#pyfile .help_panel {
117124
width: 16em; height: 8em;
118125
}
119126

0 commit comments

Comments
 (0)