common: include light stylesheet in favour over base
[sheet.git] / sample.plp
1 <(common.inc.plp)><:
2
3 my $textinc = 'data/unicode-sampler/unicode.txt';
4
5 Html({
6         title => "unicode sampler",
7         version => '2.0',
8         stylesheet => [qw'light dark mono red'],
9         data => $textinc,
10 });
11
12 open my $source, '<', $textinc
13         or die "Could not open text at $textinc: $!\n";
14 local $/ = "\n\n";
15
16 my $top = readline $source;
17 my ($title, $hr, $intro) = split /\n(\H)$1+\n/, $top, 2;
18 say "<h1>$title</h1>";
19
20 say '<pre>';
21 print $intro;
22
23 while (my $p = readline $source) {
24         EscapeHTML($p);
25         $p =~ s{ \A (\N+:) \n\Z }{<h2>$1</h2>}x;
26         print $p;
27 }
28
29 say "</pre>\n";