margin: 0;
}
-.section ul {
+section {
+ display: block;
+}
+section ul {
margin-bottom: 1ex;
}
-.section h2 {
+section h2 {
margin: 0 1ex;
clear: both;
}
-.section table {
+section table {
float: left;
position: relative; /* prevents buggy hovering in table if caption present in gecko */
margin: 1ex 1ex 2ex;
}
-#charset .section table {
+#charset section table {
margin: -0.5ex 0 1ex; /* headers provide sufficient spacing already */
}
p.aside {
font-size: 80%;
}
-p.footer {
+footer p {
margin: 1em 0 0;
}
-.help + .footer {
+.help + footer p {
margin: 0;
}
.diinfo {
-moz-column-width: 24em;
}
-.diinfo > div {
+.diinfo > section {
overflow: hidden;
}
my @nibble = (0..9, 'A'..'F');
for my $row (@request) {
- printf '<div class="section"><table class="glyphs%s">', !$row->{cell} && ' charmap';
+ printf '<section><table class="glyphs%s">', !$row->{cell} && ' charmap';
printf '<caption>%s</caption>', $row->{set};
print '<col>' x 17;
for my $section (qw{thead}) {
}
print "\n";
}
- print "</table></div>\n";
+ print "</table></section>\n";
}
:>
ref $_ eq 'ARRAY' and $_ = join ' ', @$_ for $meta->{description};
ref $_ eq 'ARRAY' and $_ = join ', ', @$_ for $meta->{keywords};
ref $_ eq 'ARRAY' and $_ = join "\n", @$_ for $meta->{rawstyle}, $meta->{raw};
+ ref $_ eq 'ARRAY' and $_ = stylesheet(@$_)."\n" for $meta->{stylesheet};
# other vars
my $sep = $meta->{charset} eq 'utf-8' ? '•' : ' -- ';
# leading output
$header{content_type} = "text/html; charset=$meta->{charset}";
print <<"EOT";
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML>
<html lang="en">
<head>
<meta name="keywords" content="$meta->{keywords}">
<link rel="icon" type="image/png" href="/clip.png">
EOT
- print stylesheet(@$_), "\n" for $meta->{stylesheet} || ();
+ print $_, "\n" for $meta->{stylesheet} || ();
print $_, "\n" for $meta->{raw} || ();
print qq{</head>\n\n<body id="$file">\n};
# prepare trailing output
PLP_END {
print <<"EOT";
-<p class="footer">
+<footer><p>
<a href="/" rel="home">sheet.shiar.nl</a>/$file.<a href="/source/$file.plp"
rel="code" title="Written in Perl">plp</a>
<a href="http://git.shiar.nl/sheet.git/history/HEAD:/$file.plp"
created by <a href="http://shiar.nl/" rel="author">Shiar</a> $sep
<a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>
-</p>
+</p></footer>
</html>
EOT
but you're free to use, print, alter, and redistribute under the AGPL license.
</p>
-<div class="section">
+<section>
<h2>Keyboard maps</h2>
<ul>
<li><a href="/readline">readline</a>
<li><a href="/nethack">nethack</a>
<li><a href="/mplayer">mplayer</a>
</ul>
-</div>
+</section>
-<div class="section">
+<section>
<h2>Unicode characters</h2>
<ul>
<li><a href="/charset">charsets</a>
<li><a href="/unicode">common glyphs</a>
<li><a href="/digraphs">digraphs</a>
</ul>
-</div>
+</section>
-<div class="section">
+<section>
<h2>Other references</h2>
<ul>
<li><a href="/countries">country codes</a>
<li><a href="/termcol">terminal colours</a>
</ul>
-</div>
+</section>
h2, caption {
text-shadow: #F00 0 0 1em, #F00 0 0 1ex;
}
-p.footer {
+footer p {
border: 1px dashed #600;
border-width: 1px 0 0;
margin-top: 1.5em;
:>
<h1>Terminal colours</h1>
-<div class="section">
+<section>
<:
sub luminance {
# perceived brightness (using ITU-R recommendation 601 luma co-efficients)
}
print "</table>\n\n";
}
-:></div>
+:></section>
<hr>
-<div class="section">
+<section>
<h2>88-colour space</h2>
<:
for my $r (0 .. 3) {
print colcell(80+$_, (($_ + 2 + ($_>0)) * 255/11) x 3) for 0 .. 7;
print "</table>\n\n";
-:></div>
+:></section>
<: if ($ENV{PATH_INFO} =~ /256/) { :>
<hr>
-<div class="section">
+<section>
<h2>256-colour space</h2>
<:
for my $r (0 .. 5) {
}
print "\n";
-:></div>
+:></section>
<: } :>
<hr>
sub print_glyph_tables {
while (@_) {
- printf '<div class="section"><h2>%s</h2>'."\n\n", shift;
+ printf '<section><h2>%s</h2>'."\n\n", shift;
while (ref $_[0] and $_ = shift) {
print glyph_table($_);
}
- print '</div>';
+ print '</section>';
}
}