termcol: float tables automatically
[sheet.git] / mutt.plp
1 <:
2 use utf8;
3 use strict;
4 use warnings;
5 no  warnings 'qw';  # you know what you doing
6 no  warnings 'uninitialized';  # save some useless checks for more legible code
7
8 use Shiar_Sheet::KeySigns qw(%sign);
9
10 our $VERSION = 'v1.0';
11
12 $header{content_type} = "text/html; charset=$sign{charset}";
13
14 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
15  "http://www.w3.org/TR/html4/loose.dtd">
16 <html>
17
18 <head>
19 <title>mutt cheat sheet</title>
20 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
21 <link rel="stylesheet" type="text/css" media="all" href="base.css">
22 <!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
23 <!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
24         my %styles = map {$_ => $_} qw(dark circus mono red terse);
25         our $style = exists $get{style} && $styles{$get{style}} || 'light';
26         printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
27                 $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
28         ) for keys %styles;
29
30         our $showkeys = exists $get{keys} && $get{keys} ne '0';
31         print "\n".'<style type="text/css"> .no {visibility:hidden} </style>' unless $showkeys;
32         print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
33                 if $showkeys and $get{keys} eq 'ghost';
34 :>
35 <script type="text/javascript" src="/keys.js"></script>
36
37 <body id="mutt">
38
39 <h1>Mutt cheat sheet</h1>
40
41 <h2>index (default)</h2>
42
43 <ul id="rows">
44
45 <li class="row">
46         <ul class="keys omni">
47         <li class="me chr27" onclick="setmode()"><b>Esc</b> +
48                 <!-- not as static anymore, but never bothered; just see ^[ -->
49         </ul>
50 </li>
51
52 <:
53 use Shiar_Sheet::Keyboard;
54 my $keys = Shiar_Sheet::Keyboard->new({do 'mutt.inc.pl'});
55 $keys->map($get{map}) or undef $get{map};
56 $keys->print_rows($get{rows});
57 :>
58 </ul>
59
60 <hr>
61
62 <div class="help">
63         <div class="left">
64                 <dl class="legend legend-types">
65                 <dt class="ci">aside
66                         <dd>Temporarily display something without changing state.
67                 <dt class="pm">select
68                         <dd>Scroll list and/or select a different line.
69                 <dt class="po">search
70                         <dd>Go to a specific message entry.
71                 <dt class="co">edit
72                         <dd>Modify message flags or contents.
73                 <dt class="mi">command
74                         <dd>Any other action which does not alter an existing message.
75                 <dt class="mo">send
76                         <dd>Prepare and/or send a (new) message.
77                 <dt class="mv">leave
78                         <dd>Exit the opened folder.
79                 <dt class="me">display
80                         <dd>Permanently alter/toggle current view.
81                 </dl>
82         </div>
83
84         <div class="right">
85                 <dl class="legend legend-options">
86                 <dt>key<:= $sign{arg} :>
87                         <dd>Commands with a dot need an argument afterwards.
88                 </dl>
89
90                 <ul class="legend legend-set">
91                 <li>keyboard <strong>map</strong> is
92                         <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
93                 <li><strong>ascii</strong> mode is
94                         <:= defined $sign{-ascii} && 'forced ' :><em><:=
95                                 $sign{-ascii} ? 'on' : 'off' :></em>
96                 <li><strong>keys</strong> are
97                         <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
98                                 !exists $get{keys} && ' by default' :>
99                 <li>default <strong>style</strong> is
100                         <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
101                 </ul>
102         </div>
103 </div>
104
105 <p class="footer">
106         <a href="/" rel="home">sheet.shiar.nl</a>/mutt
107         <a href="git://git.shiar.nl/sheet" rel="vcs-git" title="Git repository"><:= $VERSION :></a>
108         created by <a href="http://shiar.nl/" rel="author">Shiar</a> <:= $sign{sep} :>
109         <a title="Licensed under the GNU Affero General Public License, version 3" rel="copyright"
110            href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPLv3</a>
111 </p>
112
113 </html>