X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/0ecd498b120e427bd58940919ef05cb8c653ad68..d2de36b8cc74f75b168981c233d31c59f24d3ab0:/keyboard.plp?ds=sidebyside diff --git a/keyboard.plp b/keyboard.plp index 1ad9324..c96977d 100644 --- a/keyboard.plp +++ b/keyboard.plp @@ -1,65 +1,37 @@ <(common.inc.plp)><: +my $mode = lc($Request || 'altgr'); +my $include = "$mode.eng"; + +my $info = eval { Data($include) } || {}; +$mode = $info->{title} // $mode; + Html({ - title => 'keyboard cheat sheet', - version => '1.0', + 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}/ ? 3 # latin script - : $row[2] =~ /^\p{Mn}/ ? 5 # combining accent - : 4 - ); - $row[0] => "g$class" - } @usint - }, - }, - key => { - map { - $_->[0] => "$_->[1]
$_
" for $info->{intro} // (); +say "