X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/d633423013d3cfb34c674454fa402a11561c2eac..4f067d460821f15ab66522dd9cef5f0342b2dfc3:/keyboard/altgr/index.inc.plp?ds=sidebyside diff --git a/keyboard/altgr/index.inc.plp b/keyboard/altgr/index.inc.plp index e4ed3d8..ccb7fb6 100644 --- a/keyboard/altgr/index.inc.plp +++ b/keyboard/altgr/index.inc.plp @@ -6,7 +6,7 @@ my @incs = glob 'keyboard/altgr/*.eng.inc.pl'; Html({ title => "altgr keyboard cheat sheets", - version => '1.0', + version => '1.1', description => [ "Overview of alternate keyboard modes,", "offering extended Unicode characters if a modifier key", @@ -15,13 +15,41 @@ Html({ keywords => [qw' sheet cheat reference overview keyboard altgr option '], + image => 'data/keyboard/thumb/ibm-m.jpg', stylesheet => [qw( light dark circus mono red )], data => ['keyboard/altgr/index.inc.plp', @incs], raw => <<'.', . @@ -30,25 +58,46 @@ img { :>

Extended keyboards

-

Representative images of available layouts -with AltGr or similar modifier keys.

+

Overview of available key layouts with AltGr or similar modifier keys.

+ +<: +my @sample = split /(?<: +printf '
', @sample ? 'section' : 'gallery'; +if (@sample) { + print ''; + print ''; +} my %idx = map {s/\Q.inc.pl\E$//; ($_ => eval{ Data($_) })} @incs; for my $inc (sort { $idx{$a}{category} cmp $idx{$b}{category} || $a cmp $b } keys %idx) { - print '
'; + print @sample ? '
'; } - printf '
%s
', $inc; - say ''; } +print '
'; + print "$_" for @sample; + say '
' : '
'; printf '', $inc =~ s/\.eng$//r; - if ($table = $idx{$inc}) { - if (my $img = $table->{image}) { + my $table = $idx{$inc}; + my $title = $table && $table->{title} || $inc; + + unless (@sample) { + if ($table and my $img = $table->{image}) { EscapeHTML $name = $table->{imagealt} // $img =~ m{.*/([^/.]*)}; print qq{$name}; } - $inc = $table->{title}; + printf '
%s
', $title; + say '
'; + } + else { + print $title; + print ''; + my $keys = Shiar_Sheet::Keyboard->new($table); + print '
', join(' ', map { $keys->{key}{$_} =~ s/\s.*//r } grep {$_} keys %{$_}) + for $keys->{mode} || (); + $keys->print_key('', $_, $keys->{def}{''}{$_} // 'ni') for @sample; + say '
' if @sample; :>