countries: script to create include from geonames data
[sheet.git] / vimperator.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'vimperator cheat sheet',
5         version => 'v1.2',
6         description => [
7                 "Interactive cheat sheet for the Vimperator Firefox extension,",
8                 "describing the function of each key.",
9         ],
10         keywords => [qw'
11                 vimperator firefox vim iceweasel sheet cheat reference overview
12                 commands keyboard browser
13         '],
14         charset => $sign{charset},
15         stylesheet => [qw'light dark circus mono red terse'],
16         keys => 1,
17 });
18
19 :>
20 <h1>Vimperator cheat sheet</h1>
21
22 <h2>normal mode (default)</h2>
23
24 <:
25 use Shiar_Sheet::Keyboard 2;
26 my $info = do 'vimperator.eng.inc.pl' or die $@;
27 $info->{def} = do 'vimperator.inc.pl';
28 $_->{"\e"} = ['mv mode', "normal mode"] for values %{ $info->{def} };
29 delete $info->{def}->{''}->{"\e"};
30 my $keys = Shiar_Sheet::Keyboard->new($info);
31 $keys->map($get{map}) or undef $get{map};
32 $keys->print_rows($get{rows});
33 :>
34
35 <hr>
36
37 <div class="help">
38         <div class="left">
39 <: $keys->print_legend('legend-types', [qw( ci pm po co cp mi mo mv me )]) :>
40         </div>
41
42         <div class="right">
43 <: $keys->print_legend('legend-options', [qw( arg args )]) :>
44
45                 <ul class="legend legend-set">
46                 <li>keyboard <strong>map</strong> is
47                         <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
48                 <li><strong>ascii</strong> mode is
49                         <:= defined $sign{-ascii} && 'forced ' :><em><:=
50                                 $sign{-ascii} ? 'on' : 'off' :></em>
51                 <li><strong>keys</strong> are
52                         <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
53                                 !exists $get{keys} && ' by default' :>
54                 <li>default <strong>style</strong> is
55                         <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
56                 </ul>
57         </div>
58 </div>
59