git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
word: remove obsolete languageless include selection
[sheet.git]
/
keyboard.plp
diff --git
a/keyboard.plp
b/keyboard.plp
index 4a49ebba91a52e64ddc6420a86bfce8d8193d727..62e150a7dd726b75c4d1d9ba0f4898a837b149ef 100644
(file)
--- a/
keyboard.plp
+++ b/
keyboard.plp
@@
-1,7
+1,8
@@
<(common.inc.plp)><:
<(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 $@;
my $info = eval { Data($include) } || {};
warn "error in $include: ", @{$@} if ref $@;
@@
-16,6
+17,11
@@
my @keystyle = (
$showkeys eq 'ghost' ? '<style> .no, .alias {opacity:.5} </style>' : (),
'<script type="text/javascript" src="/keys.js?1.6" async></script>',
);
$showkeys eq 'ghost' ? '<style> .no, .alias {opacity:.5} </style>' : (),
'<script type="text/javascript" src="/keys.js?1.6" async></script>',
);
+if ($Request =~ /^altgr/ and open my $cssinc, '<', 'keyboard/altgr.css') {
+ local $/;
+ my $data = readline $cssinc;
+ push @keystyle, "<style>\n$data</style>";
+}
Html({
title => "\L$mode\E keyboard cheat sheet",
Html({
title => "\L$mode\E keyboard cheat sheet",
@@
-25,6
+31,7
@@
Html({
keywords => [@{ $info->{keywords} // [] }, qw'
sheet cheat reference overview keyboard control commands shortkey
'],
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,
stylesheet => [qw( light dark circus mono red )],
data => ["$include.inc.pl"],
raw => \@keystyle,