X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/d22e7febda8720bc38069f7061adb43b98143c48..fd25d20e6ae7a77338a781934aa72f04251ee745:/keyboard.plp?ds=sidebyside diff --git a/keyboard.plp b/keyboard.plp index 8060fa6..36ccaca 100644 --- a/keyboard.plp +++ b/keyboard.plp @@ -1,67 +1,37 @@ <(common.inc.plp)><: +my $mode = lc($Request || 'keyboard'); +my $include = "$mode.eng"; + +my $info = eval { Data($include) } || {}; +$mode = $info->{title} // $mode; + Html({ - title => 'keyboard cheat sheet', - version => '1.1', + title => "\L$mode\E keyboard cheat sheet", + version => $info->{version} || '0.1', + description => $info->{description} // + ["Keyboard cheat sheet for the default controls of $mode."], + keywords => [@{ $info->{keywords} // [] }, qw' + sheet cheat reference overview keyboard control commands shortkey + '], stylesheet => [qw( light dark circus mono red )], keys => 1, + data => ["$include.inc.pl"], }); -:> -
$modenot available", + '404 request not found', ); -my $keys = Shiar_Sheet::Keyboard->new({ - def => { - '' => { - map { - my @row = @{$_}; - my $class = ( - !defined $row[2] || $row[0] eq $row[2] ? 1 # identical - : NFKD($row[2]) =~ $row[0] ? 2 # decomposed equivalent - : $row[2] =~ /^\p{Latin}/ ? 4 # latin script - : unidecode($row[2]) =~ /^\W*\Q$row[0]/ ? 5 # transliterated - : $row[2] =~ /^\p{Mn}/ ? 8 # combining accent - : 7 - ); - $row[0] => "g$class" - } @usint - }, - }, - key => { - map { - $_->[0] => "$_->[1]
$_
" for $info->{intro} // (); +say "