X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/26a71f36c68773b18095911e99be7294cbd66f39..f70fa87182a51b1fdaa8b1592f54dc2c83343f70:/keyboard.plp?ds=sidebyside
diff --git a/keyboard.plp b/keyboard.plp
index 4a49ebb..e4ba72d 100644
--- a/keyboard.plp
+++ b/keyboard.plp
@@ -1,7 +1,8 @@
<(common.inc.plp)><:
-my $mode = lc($Request || 'altgr');
-my $include = "$mode.eng";
+$Request ||= 'altgr/windows';
+my $mode = lc $Request;
+my $include = "keyboard/$mode.eng";
my $info = eval { Data($include) } || {};
warn "error in $include: ", @{$@} if ref $@;
@@ -16,15 +17,22 @@ 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",
version => $info->{version} || '0.1',
+ canonical => -e "$Request.plp" ? "/$Request" : undef, # historic shorthand
description => $info->{description} //
["Keyboard cheat sheet for the default controls of $mode."],
keywords => [@{ $info->{keywords} // [] }, qw'
sheet cheat reference overview keyboard control commands shortkey
'],
+ image => $info->{image},
stylesheet => [qw( light dark circus mono red )],
data => ["$include.inc.pl"],
raw => \@keystyle,