Debian Codegraph @

share/templates/help.html

raw
1 ? my $app = shift;
2
3 <div id="help" style="display:none">
4 <h1>Alice Help</h1>
5 <div id="helpclose">close</div>
6 <div id="topics">
7 <dl>
8 <h2>Commands</h2>
9 <? for my $command (@{$app->commands->handlers }) { ?>
10 <? next unless $command->{eg} and $command->{desc}; ?>
11 <dt><?= $command->{eg} ?></dt>
12 <dd><?= $command->{desc} ?></dd>
13 <? } ?>
14 </dl>
15 <dl id="shortcuts">
16 <h2>Shortcuts</h2>
17 <dt>Tab</dt>
18 <dd>Cycle to next nick completion</dd>
19 <dt>[Mod1] K</dt>
20 <dd>Clear current tab</dd>
21 <dt>[Mod1] B</dt>
22 <dd>Previous tab</dd>
23 <dt>[Mod1] F</dt>
24 <dd>Next tab</dd>
25 <dt>[Meta] [Up]</dt>
26 <dd>Cycle through previous message</dd>
27 <dt>[Meta] [Down]</dt>
28 <dd>Cycle to next message</dd>
29 <dt>[Meta] [Return]</dt>
30 <dd>Insert a newline</dd>
31 <dt >[Mod1] [Shift] M</dt>
32 <dd>Mark all tabs as read</dd>
33 <dt>[Mod1] [Shift] J</dt>
34 <dd>Jump to bottom of tab</dd>
35 <dt>[Mod1] [Shift] K</dt>
36 <dd>Show timestamps and nicks</dd>
37 <dt>[Mod1] [Shift] H</dt>
38 <dd>Toggle this help dialog</dd>
39 </dl>
40 <script type="text/javascript">
41 var isMac = navigator.platform.match(/mac/i);
42 var modmap = {
43 "[Meta]": isMac ? "⌥" : "&lt;Alt&gt;",
44 "[Mod1]": isMac ? "⌘" : "&lt;Ctrl&gt;",
45 "[Shift]": isMac ? "⇧" : "&lt;Shift&gt;",
46 "[Up]": isMac ? "↑" : "&lt;Up&gt;",
47 "[Down]": isMac ? "↓" : "&lt;Down&gt;",
48 "[Return]": isMac ? "↵" : "&lt;Return&gt;",
49 };
50 $('shortcuts').select("dt").each(function(dt) {
51 var terms = dt.innerHTML.split(" ");
52 terms = terms.map(function(term) {
53 return modmap[term] ? modmap[term] : term;
54 });
55 dt.innerHTML = terms.join(isMac ? "" : " ");
56 });
57 </script>
58 </div>
59 </div>