<(common.inc.plp)><:
- our $VERSION = 'v1.0';
-
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>charset cheat sheet</title>
-<meta name="description" content="Reference sheet with all glyphs in common character encoding tables, and an overview of Unicode ranges and UTF-8 bytes.">
-<meta name="keywords" content="charset, codepage, unicode, ascii, utf8, latin, glyph, character, encoding, reference, common, overview, table">
-<:= stylesheet(qw'light') :>
-<link rel="icon" type="image/png" href="/clip.png">
-</head>
-
-<body id="charset">
+
+Html({
+ title => 'charset cheat sheet',
+ version => 'v1.0',
+ description => [
+ "Reference sheet with all glyphs in common character encoding tables,",
+ "and an overview of Unicode ranges and UTF-8 bytes.",
+ ],
+ keywords => [qw'
+ charset codepage unicode ascii utf8 latin glyph character encoding
+ reference common overview table
+ '],
+ stylesheet => [qw'light'],
+});
+
+:>
<h1>Character encoding</h1>
<:
</table>
</div>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/charset.<a href="/source/charset.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/charset.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
-</html>
no warnings 'uninitialized'; # save some useless checks for more legible code
use open IO => ':utf8';
+use Shiar_Sheet::KeySigns qw(%sign); # dependant on $get{ascii}
+
our $style;
+our $showkeys = !exists $get{keys} ? undef :
+ ($get{keys} ne '0' && ($get{keys} || 'always'));
$header{content_type} = 'text/html; charset=utf-8';
) } @_;
}
+sub Html {
+ my ($meta) = @_;
+
+ # default fallbacks
+ $meta->{stylesheet} ||= [qw'light dark circus mono red terse'];
+ $meta->{charset} ||= 'utf-8';
+
+ # optional amends
+ push @{ $meta->{raw} }, (
+ '<!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->',
+ '<!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]-->',
+ !$showkeys ? '<style type="text/css"> .no {visibility:hidden} </style>'
+ : $showkeys eq 'ghost' ? '<style type="text/css"> .no, .alias {opacity:.5} </style>'
+ : (),
+ '<script type="text/javascript" src="/keys.js"></script>',
+ ) if $meta->{keys};
+
+ # flatten arrays
+ ref $_ eq 'ARRAY' and $_ = join ' ', @$_ for $meta->{description};
+ ref $_ eq 'ARRAY' and $_ = join ', ', @$_ for $meta->{keywords};
+ ref $_ eq 'ARRAY' and $_ = join "\n", @$_ for $meta->{rawstyle}, $meta->{raw};
+
+ # other vars
+ my $sep = $meta->{charset} eq 'utf-8' ? '•' : ' -- ';
+ my ($file) = $ENV{SCRIPT_FILENAME} =~ m{ ([^/]+) \.plp$ }x;
+
+ # leading output
+ $header{content_type} = "text/html; charset=$meta->{charset}";
+ print <<"EOT";
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+
+<head>
+<meta http-equiv="content-type" content="$header{content_type}">
+<title>$meta->{title}</title>
+<meta name="description" content="$meta->{description}">
+<meta name="keywords" content="$meta->{keywords}">
+<link rel="icon" type="image/png" href="/clip.png">
+EOT
+ print stylesheet(@$_), "\n" for $meta->{stylesheet} || ();
+ print $_, "\n" for $meta->{raw} || ();
+ print qq{</head>\n\n<body id="$file">\n};
+
+ # prepare trailing output
+ PLP_END {
+ print <<"EOT";
+<p class="footer">
+ <a href="/" rel="home">sheet.shiar.nl</a>/$file.<a href="/source/$file.plp"
+ rel="code" title="Written in Perl">plp</a>
+ <a href="http://git.shiar.nl/sheet.git/history/HEAD:/$file.plp"
+ rel="vcs-git" title="Git repository">$meta->{version}</a>
+ created by <a href="http://shiar.nl/" rel="author">Shiar</a> $sep
+ <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
+ title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
+</p>
+
+</html>
+EOT
+ };
+}
+
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
+Html({
+ title => 'country code cheat sheet',
+ version => 'v1.0',
+ description =>
+ "Table of ISO-3166-2 country codes with the names of reserved territories.",
+ keywords => [qw'country code cc tld territory land table'],
+ stylesheet => [qw'light dark mono red'],
+});
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>country code cheat sheet</title>
-<meta name="description" content="Table of ISO-3166-2 country codes with the names of reserved territories.">
-<meta name="keywords" content="country, code, cc, tld, territory, land, table">
-<:= stylesheet(qw'light dark mono red') :>
-<link rel="icon" type="image/png" href="/clip.png">
-</head>
-
-<body>
+:>
<h1>Country codes</h1>
<:
</div>
</div>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/countries.<a href="/source/countries.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/countries.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
-</html>
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
+Html({
+ title => 'digraph cheat sheet',
+ version => 'v1.0',
+ description => [
+ "Complete table of digraph characters from RFC-1345.",
+ ],
+ keywords => [qw'
+ digraph compose character char glyph table unicode vim
+ '],
+ stylesheet => [qw'light'],
+});
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>digraph cheat sheet</title>
-<meta name="description" content="Complete table of digraph characters from RFC-1345.">
-<meta name="keywords" content="digraph, compose, character, char, glyph, table, unicode, vim">
-<:= stylesheet(qw'light') :>
-<link rel="icon" type="image/png" href="/clip.png">
-</head>
-
-<body id="digraphs">
+:>
<h1>RFC-1345 Digraphs</h1>
<p>i^k in <a href="/">Vim</a>.
</table>
</div>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/digraphs.<a href="/source/digraphs.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/digraphs.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
-</html>
<(common.inc.plp)><:
- our $VERSION = 'v1.3';
-
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>cheat sheets</title>
-<meta name="description" content="Cheat sheets summarising various software programs and standards.">
-<meta name="keywords" content="sheet, cheat, reference, software, overview, summary, help, keyboard, map, unicode">
-<:= stylesheet(qw'light dark red') :>
-<link rel="icon" type="image/png" href="/clip.png">
-</head>
-
-<body id="index">
+Html({
+ title => 'cheat sheets',
+ version => 'v1.3',
+ description => [
+ "Cheat sheets summarising various software programs and standards.",
+ ],
+ keywords => [qw'
+ sheet cheat reference software overview summary help keyboard map unicode
+ '],
+ stylesheet => [qw'light dark red'],
+});
+
+:>
<h1>Shiar's cheat sheets</h1>
<p>
</ul>
</div>
-<p class="footer">
- <a href="http://sheet.shiar.nl/" rel="home">sheet.shiar.nl</a>/index.<a
- href="/source/index.plp" rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git" rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
- use Shiar_Sheet::KeySigns qw(%sign);
+Html({
+ title => 'mplayer cheat sheet',
+ version => 'v1.0',
+ description => [
+ "Keyboard cheat sheet for the MPlayer media player,",
+ "overviewing the default controls."
+ ],
+ keywords => [qw'
+ mplayer video media sheet cheat reference overview control shortkey keyboard
+ '],
+ charset => $sign{charset},
+ stylesheet => [qw'light dark circus mono red terse'],
+ keys => 1,
+});
- $header{content_type} = "text/html; charset=$sign{charset}";
-
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>mplayer cheat sheet</title>
-<meta name="description" content="Keyboard cheat sheet for the MPlayer media player, overviewing the default controls.">
-<meta name="keywords" content="mplayer, video, media, sheet, cheat, reference, overview, control, shortkey, keyboard">
-<:= stylesheet(qw'light dark circus mono red terse') :>
-<!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
-<!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
- our $showkeys = exists $get{keys} && $get{keys} ne '0';
- print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
- unless $showkeys;
- print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
- if $showkeys and $get{keys} eq 'ghost';
:>
-<link rel="icon" type="image/png" href="/clip.png">
-<script type="text/javascript" src="/keys.js"></script>
-
-<body id="mplayer">
-
<h1>MPlayer cheat sheet</h1>
<h2>index (default)</h2>
</div>
</div>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/mplayer.<a href="/source/mplayer.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/mplayer.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> <:= $sign{sep} :>
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
-</html>
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
- use Shiar_Sheet::KeySigns qw(%sign);
+Html({
+ title => 'mutt cheat sheet',
+ version => 'v1.0',
+ description => [
+ "Cheat sheet for the Mutt e-mail client,",
+ "showing the default binding for each key.",
+ ],
+ keywords => [qw'
+ mutt MUA email client sheet cheat reference overview commands keyboard
+ '],
+ charset => $sign{charset},
+ stylesheet => [qw'light dark circus mono red terse'],
+ keys => 1,
+});
- $header{content_type} = "text/html; charset=$sign{charset}";
-
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>mutt cheat sheet</title>
-<meta name="description" content="Cheat sheet for the Mutt e-mail client, showing the default binding for each key.">
-<meta name="keywords" content="mutt, MUA, email, client, sheet, cheat, reference, overview, commands, keyboard">
-<:= stylesheet(qw'light dark circus mono red terse') :>
-<!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
-<!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
- our $showkeys = exists $get{keys} && $get{keys} ne '0';
- print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
- unless $showkeys;
- print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
- if $showkeys and $get{keys} eq 'ghost';
:>
-<link rel="icon" type="image/png" href="/clip.png">
-<script type="text/javascript" src="/keys.js"></script>
-
-<body id="mutt">
-
<h1>Mutt cheat sheet</h1>
<h2>index (default)</h2>
</div>
</div>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/mutt.<a href="/source/mutt.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/mutt.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> <:= $sign{sep} :>
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
-</html>
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
- use Shiar_Sheet::KeySigns qw(%sign);
+Html({
+ title => 'nethack cheat sheet',
+ version => 'v1.0',
+ description => [
+ "Keyboard overview sheet for the Nethack console RPG game,",
+ "describing the default controls.",
+ ],
+ keywords => [qw'
+ nethack rogue game control controls sheet reference overview keyboard
+ '],
+ charset => $sign{charset},
+ stylesheet => [qw'light dark circus mono red terse'],
+ keys => 1,
+});
- $header{content_type} = "text/html; charset=$sign{charset}";
-
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>nethack cheat sheet</title>
-<meta name="description" content="Keyboard overview sheet for the Nethack console RPG game, describing the default controls.">
-<meta name="keywords" content="nethack, rogue, game, control, controls, sheet, reference, overview, keyboard">
-<:= stylesheet(qw'light dark circus mono red terse') :>
-<!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
-<!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
- our $showkeys = exists $get{keys} && $get{keys} ne '0';
- print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
- unless $showkeys;
- print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
- if $showkeys and $get{keys} eq 'ghost';
:>
-<link rel="icon" type="image/png" href="/clip.png">
-<script type="text/javascript" src="/keys.js"></script>
-
-<body id="nethack">
-
<h1>NetHack cheat sheet</h1>
<h2>normal gameplay</h2>
</div>
</div>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/nethack.<a href="/source/nethack.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/nethack.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> <:= $sign{sep} :>
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
-</html>
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
- use Shiar_Sheet::KeySigns qw(%sign); # dependant on $get{ascii}
+Html({
+ title => 'readline cheat sheet',
+ version => 'v1.0',
+ description => [
+ "Reference sheet of default key bindings for GNU readline,",
+ "used in line-editing in most Unix software, notably emacs and bash.",
+ ],
+ keywords => [qw'
+ readline gnu bash emacs sheet cheat reference overview keyboard editing curses
+ '],
+ charset => $sign{charset},
+ stylesheet => [qw'light dark circus mono red terse'],
+ keys => 1,
+});
- $header{content_type} = "text/html; charset=$sign{charset}";
-
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>readline cheat sheet</title>
-<meta name="description" content="Reference sheet of default key bindings for GNU readline, used in line-editing in most Unix software, notably emacs and bash.">
-<meta name="keywords" content="readline, gnu, bash, emacs, sheet, cheat, reference, overview, keyboard, editing, curses">
-<:= stylesheet(qw'light dark circus mono red terse') :>
-<!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
-<!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
- our $showkeys = exists $get{keys} && $get{keys} ne '0';
- print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
- unless $showkeys;
- print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
- if $showkeys and $get{keys} eq 'ghost';
:>
-<link rel="icon" type="image/png" href="/clip.png">
-<script type="text/javascript" src="/keys.js"></script>
-
-<body id="readline">
-
<h1>readline cheat sheet</h1>
<h2>default emacs mode</h2>
</div>
</div>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/readline.<a href="/source/readline.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/readline.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> <:= $sign{sep} :>
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
-</html>
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
- my $source = $ENV{PATH_INFO};
- $source =~ s{^/}{};
+my $source = $ENV{PATH_INFO};
+$source =~ s{^/}{};
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
+Html({
+ title => "$source source code",
+ version => 'v1.0',
+ description => !$source ? 'Index of source files for this site.' : [
+ "Source code of local $source file,",
+ "with syntax highlighted and references linked."
+ ],
+ keywords => [qw'
+ sheet cheat source code perl plp html agpl
+ '],
+ stylesheet => [qw'light dark mono red'],
+});
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title><:= $source :> source code</title>
-<meta name="description" content="<:=
- $source ? "Source code of local $source file"
- . ", with syntax highlighted and references linked."
- : 'Index of source files for this site.'
-:>">
-<meta name="keywords" content="sheet, cheat, source, code, perl, plp, html, agpl">
-<:= stylesheet(qw'light dark mono red') :>
-<link rel="icon" type="image/png" href="/clip.png">
-</head>
-
-<body id="source">
-<:
+print "\n";
if (not $source) {
print "<h1>Source files</h1>";
else {
print "<pre>\n", EscapeHTML(ReadFile($source)), "</pre>\n";
}
+
+ print "\n";
}
-:>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/source.<a href="/source/source.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/source.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-</html>
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
- use List::Util 'min';
-
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
+Html({
+ title => 'terminal colour cheat sheet',
+ version => 'v1.0',
+ description => [
+ "Index of all terminal/console colour codes,",
+ "with an example result of various environments.",
+ ],
+ keywords => [qw'
+ color code terminal console escape table xterm rxvt
+ '],
+ stylesheet => [qw'light dark'],
+});
-<head>
-<meta http-equiv="content-type" content="utf-8">
-<title>terminal colour cheat sheet</title>
-<meta name="description" content="Index of all terminal/console colour codes, with an example result of various environments.">
-<meta name="keywords" content="color, code, terminal, console, escape, table, xterm, rxvt">
-<:= stylesheet(qw'light dark') :>
-<link rel="icon" type="image/png" href="/clip.png">
-</head>
+use List::Util 'min';
-<body id="colour">
+:>
<h1>Terminal colours</h1>
<div class="section">
<: } :>
<hr>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/termcol.<a href="/source/termcol.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/termcol.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
-</html>
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
+Html({
+ title => 'unicode glyph cheat sheet',
+ version => 'v1.0',
+ description => [
+ "Common Unicode characters with digraph or code point, layed out for quick location.",
+ "Includes general signs, arrows, drawing characters, and IPA letters.",
+ ],
+ keywords => [qw'
+ unicode glyph char character reference common ipa sign mark table digraph
+ '],
+ stylesheet => [qw'light dark red'],
+});
-<head>
-<meta http-equiv="content-type" content="utf-8">
-<title>digraph cheat sheet</title>
-<meta name="description" content="Common Unicode characters with digraph or code point, layed out for quick location. Includes general signs, arrows, drawing characters, and IPA letters.">
-<meta name="keywords" content="unicode, glyph, char, character, reference, common, ipa, sign, mark, table, digraph">
-<:= stylesheet(qw'light dark red') :>
-<link rel="icon" type="image/png" href="/clip.png">
-</head>
-
-<body id="unicode">
+:>
<h1>Common Unicode</h1>
<p>i^k in <a href="/vi">Vim</a>.
</table>
</div>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/unicode.<a href="/source/unicode.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/unicode.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
-</html>
<(common.inc.plp)><:
- our $VERSION = 'v1.2';
- use Shiar_Sheet::KeySigns qw(%sign); # dependant on $get{ascii}
+Html({
+ title => 'vi cheat sheet',
+ version => 'v1.2',
+ description => [
+ "Interactive cheat sheet for vi text editors, notably Vim,",
+ "describing each key in various modes.",
+ ],
+ keywords => [qw'
+ vi vim nvi sheet cheat reference overview commands keyboard
+ '],
+ charset => $sign{charset},
+ stylesheet => [qw'light dark circus mono red terse'],
+ keys => 1,
+});
- $header{content_type} = "text/html; charset=$sign{charset}";
-
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>vi cheat sheet</title>
-<meta name="description" content="Interactive cheat sheet for vi text editors, notably Vim, describing each key in various modes.">
-<meta name="keywords" content="vi, vim, nvi, sheet, cheat, reference, overview, commands, keyboard">
-<:= stylesheet(qw'light dark circus mono red terse') :>
-<!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
-<!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
- our $showkeys = exists $get{keys} && $get{keys} ne '0';
- print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
- unless $showkeys;
- print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
- if $showkeys and $get{keys} eq 'ghost';
:>
-<link rel="icon" type="image/png" href="/clip.png">
-<script type="text/javascript" src="/keys.js"></script>
-
-<body id="vi">
-
<h1>vi/vim cheat sheet</h1>
<h2>normal mode (default)</h2>
$sign{-ascii} ? 'on' : 'off' :></em>
<li><strong>keys</strong> are
<em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
- !exists $get{keys} && ' by default' :>
+ !defined $showkeys && ' by default' :>
<li>default <strong>style</strong> is
<:= defined $get{style} && 'set to ' :><em><:= $style :></em>
</ul>
</div>
</div>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/vi.<a href="/source/vi.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/vi.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> <:= $sign{sep} :>
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
-</html>
<(common.inc.plp)><:
- our $VERSION = 'v1.0';
- use Shiar_Sheet::KeySigns qw(%sign);
+Html({
+ title => 'vimperator cheat sheet',
+ version => 'v1.0',
+ description => [
+ "Interactive cheat sheet for the Vimperator Firefox extension,",
+ "describing the function of each key.",
+ ],
+ keywords => [qw'
+ vimperator firefox vim iceweasel sheet cheat reference overview
+ commands keyboard browser
+ '],
+ charset => $sign{charset},
+ stylesheet => [qw'light dark circus mono red terse'],
+ keys => 1,
+});
- $header{content_type} = "text/html; charset=$sign{charset}";
-
-:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-
-<head>
-<meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>vimperator cheat sheet</title>
-<meta name="description" content="Interactive cheat sheet for the Vimperator Firefox extension, describing the function of each key.">
-<meta name="keywords" content="vimperator, firefox, vim, iceweasel, sheet, cheat, reference, overview, commands, keyboard, browser">
-<:= stylesheet(qw'light dark circus mono red terse') :>
-<!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
-<!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
- our $showkeys = exists $get{keys} && $get{keys} ne '0';
- print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
- unless $showkeys;
- print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
- if $showkeys and $get{keys} eq 'ghost';
:>
-<link rel="icon" type="image/png" href="/clip.png">
-<script type="text/javascript" src="/keys.js"></script>
-
-<body id="vimperator">
-
<h1>Vimperator cheat sheet</h1>
<h2>normal mode (default)</h2>
</div>
</div>
-<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/vimperator.<a href="/source/vimperator.plp"
- rel="code" title="Written in Perl">plp</a>
- <a href="http://git.shiar.nl/sheet.git/history/HEAD:/vimperator.plp"
- rel="vcs-git" title="Git repository"><:= $VERSION :></a>
- created by <a href="http://shiar.nl/" rel="author">Shiar</a> <:= $sign{sep} :>
- <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
- title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
-
-</html>