keys: move key definitions into translation includes
[sheet.git] / mutt.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'mutt cheat sheet',
5         version => '1.2',
6         description => [
7                 "Cheat sheet for the Mutt e-mail client,",
8                 "showing the default binding for each key.",
9         ],
10         keywords => [qw'
11                 mutt MUA email client sheet cheat reference overview commands keyboard
12         '],
13         stylesheet => [qw( light dark circus mono red )],
14         keys => 1,
15 });
16
17 :>
18 <h1>Mutt cheat sheet</h1>
19
20 <h2>index (default)</h2>
21
22 <:
23 use Shiar_Sheet::Keyboard 2;
24 my $info = do 'mutt.eng.inc.pl' or die $@;
25 my $keys = Shiar_Sheet::Keyboard->new($info);
26 $keys->map($get{map}) or undef $get{map};
27 $keys->print_rows($get{rows});
28 :>
29
30 <hr>
31
32 <div class="help">
33         <div class="left">
34 <: $keys->print_legend('legend-types', ['g1' .. 'g4', 'g6' .. 'g9']) :>
35         </div>
36
37         <div class="right">
38 <: $keys->print_legend('legend-options', [qw( arg )]) :>
39
40                 <ul class="legend legend-set">
41                 <li>keyboard <strong>map</strong> is
42                         <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
43                 <li><strong>keys</strong> are
44                         <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
45                                 !exists $get{keys} && ' by default' :>
46                 <li>default <strong>style</strong> is
47                         <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
48                 </ul>
49         </div>
50 </div>
51