vi: rename vim page to generic /vi
[sheet.git] / unicode.plp
index b55e7715fa2e838d065b60fc01f4eacac77e6e4e..e2c3c11ac5814315e57a9b2d0744f754b1d3b56b 100644 (file)
@@ -1,34 +1,23 @@
-<:
-use utf8;
-use strict;
-use warnings;
-no  warnings 'qw';  # that's not a comment, it's a NUMBER SIGN
-use open IO => ':utf8';
-
-our $VERSION = 'v1.0';
-
-$header{content_type} = 'text/html; charset=utf-8';
+<(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>
+<html lang="en">
 
 <head>
 <meta http-equiv="content-type" content="utf-8">
 <title>digraph cheat sheet</title>
-<link rel="stylesheet" type="text/css" media="all" href="/base.css"><:
-       my %styles = map {$_ => $_} qw(dark circus mono red terse);
-       our $style = exists $get{style} && $styles{$get{style}} || 'light';
-       printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
-       ) for keys %styles;
-:>
+<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 uncommon Unicode</h1>
 
-<p>i^k in <a href="/">Vim</a>.
+<p>i^k in <a href="/vi">Vim</a>.
 Also see the <a href="/digraphs">complete digraphs table</a>.</p>
 
 <div class="diinfo">
@@ -38,14 +27,6 @@ my $diinfo = do 'digraphs.inc.pl';
 my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
        sort { length $a <=> length $b } keys %$diinfo;
 
-sub quote {
-       local $_ = shift;
-       s/"/&quot;/g;
-       s/</&lt;/g;
-       s/>/&gt;/g;
-       return $_;
-}
-
 sub glyph_table {
        my ($digraphs) = @_;
 
@@ -123,8 +104,8 @@ sub glyph_table {
                        defined $name  ? qq{ title="$name"}  : '',
                        @class ? sprintf(' class="%s"', join ' ', @class) : '',
                        $colspan > 1 && qq{ colspan="$colspan"},
-                       $cell eq '' ? '&nbsp;' : quote($cell),
-                       defined $code ? sprintf(' <small class="digraph">%s</small>', quote($code))
+                       $cell eq '' ? '&nbsp;' : EscapeHTML($cell),
+                       defined $code ? sprintf(' <small class="digraph">%s</small>', EscapeHTML($code))
                                : length($cell) == 1 && $cell !~ /[a-z]/
                                        ? sprintf(' <small class="%s">%04X</small>', 'value', ord $cell)
                                        : '',
@@ -139,7 +120,7 @@ sub glyph_table {
 
 sub print_glyph_tables {
        while (@_) {
-               printf "<div><h2>%s</h2>\n\n", shift;
+               printf '<div class="section"><h2>%s</h2>'."\n\n", shift;
                while (ref $_[0] and $_ = shift) {
                        print glyph_table($_);
                }
@@ -154,7 +135,7 @@ print_glyph_tables(
        [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}],
        [qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}],
        [qw{. ⚋ ⚊ . ⚐ ⚑ . ☺ ☹ . ✓ ✗ . ✔ ✘ . ◄ ► }],
-       [qw{. å ä ö ü ß . Å æ ø ű ſ}],
+       [qw{. å ä ö ü ß . ā æ ø ű ſ}],
        [qw{. ¿ ç ñ é ê è}],
        [qw{. α β}], [qw{. א}],
 
@@ -297,11 +278,13 @@ $verbose ? (
 </div>
 
 <p class="footer">
-       <a href="/" rel="home">sheet.shiar.nl</a>/unicode
-       <a href="git://git.shiar.nl/sheet" rel="vcs-git" title="Git repository"><:= $VERSION :></a>
+       <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 title="Licensed under the GNU Affero General Public License, version 3" rel="copyright"
-          href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPLv3</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>