digraphs: link to xorg variant, adapt title and intro
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 22 Mar 2017 18:04:30 +0000 (19:04 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 22 Mar 2017 21:28:04 +0000 (22:28 +0100)
digraphs.plp

index e5003b684e14aff99e2d75c0d41855c11b50daf8..887d1abc24e3a0e2759f4caf8ad33addfa6b2dc5 100644 (file)
@@ -2,33 +2,41 @@
 use 5.010;  # state
 
 my $mode = ($ENV{PATH_INFO} // '') eq '/xorg' || exists $get{xorg};
+my $modename = $mode ? 'X.Org' : 'RFC-1345';
 
 Html({
        title => 'digraph cheat sheet',
        version => '1.1',
        description => [
-               "Complete table of digraph characters from RFC-1345.",
+               "Complete table of digraph characters from $modename.",
        ],
        keywords => [qw'
                digraph mnemonic compose composition pair
-               character char glyph table unicode vim
+               character char glyph table unicode vim xorg x11 x
        '],
        stylesheet => [qw'light'],
        data => [qw( digraphs.inc.pl )],
 });
 
 :>
-<h1>RFC-1345 Digraphs</h1>
-
-<p>Character mnemonics
-following composition key ⎄:
-i^k in <a href="/vi">Vim</a>,
-^u^\ in <a href="/readline">Emacs</a>,
-^a^v in <a href="/screen">Screen</a>.
-Also see <a href="/unicode">common Unicode</a>.</p>
-
-<p class="aside">Unofficial <span class="u-prop ex">proposals</span>
-are available as <a href="/digraphs.vim">ex commands</a>.</p>
+<h1><:= $modename :> Digraphs</h1>
+
+<p>Character mnemonics following compose key ⎄<:
+say join("\n",
+       $mode ? (
+               ' in the X Window System (Shift+AltGr by default).',
+               'Differences from <a href="/digraphs">RFC-1345</a> are indicated.',
+       ) : (':',
+               'i^k in <a href="/vi">Vim</a>,',
+               '^u^\ in <a href="/readline">Emacs</a>,',
+               '^a^v in <a href="/screen">Screen</a>.',
+               'Similar but different from <a href="/digraphs/xorg">X.Org</a>.',
+       ),
+       'Also see <a href="/unicode">common Unicode</a>.</p>',
+);
+say '<p class="aside">Unofficial <span class="u-prop ex">proposals</span>',
+       ' are available as <a href="/digraphs.vim">ex commands</a>.' if not $mode;
+:>
 
 <:
 my $di = do 'digraphs.inc.pl'