X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/b55f16d857eb0de23413f042f61462c06f7f14e7..HEAD:/keyboard.plp diff --git a/keyboard.plp b/keyboard.plp index a2c2f2e..3a40a4d 100644 --- a/keyboard.plp +++ b/keyboard.plp @@ -4,6 +4,11 @@ $Request ||= 'altgr/windows'; my $mode = lc $Request; my $include = "keyboard/$mode.eng"; +if (-e (my $page = "keyboard/$Request/index.inc.plp")) { + Include $page; + exit; +} + my $info = eval { Data($include) } || {}; warn "error in $include: ", @{$@} if ref $@; $mode = $info->{title} // $mode; @@ -17,11 +22,6 @@ my @keystyle = ( $showkeys eq 'ghost' ? '' : (), '', ); -if ($Request =~ /^altgr/ and open my $cssinc, '<', 'keyboard/altgr.css') { - local $/; - my $data = readline $cssinc; - push @keystyle, ""; -} Html({ title => "\L$mode\E keyboard cheat sheet", @@ -48,7 +48,7 @@ say "

$_

" for $info->{intro} // (); say "

", $info->{mode}->{''}, " (default)

" if $info->{mode} and %{ $info->{mode} } > 1; -use Shiar_Sheet::Keyboard 2.08; +use Shiar_Sheet::Keyboard 3.00; my $keys = Shiar_Sheet::Keyboard->new($info); $keys->map($get{map}) or undef $get{map}; $keys->print_rows($get{rows} || $info->{moderows}, $info->{rows});