From: Mischa POSLAWSKY Date: Fri, 18 Dec 2009 01:16:13 +0000 (+0000) Subject: use html5 elements (section, footer) X-Git-Tag: v1.3~71 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/9a4d89685edcb4399aa500d38de84b0101ad09b2 use html5 elements (section, footer) --- diff --git a/base.css b/base.css index 139c94c..b22c038 100644 --- a/base.css +++ b/base.css @@ -36,19 +36,22 @@ hr { 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 */ } @@ -58,10 +61,10 @@ p { p.aside { font-size: 80%; } -p.footer { +footer p { margin: 1em 0 0; } -.help + .footer { +.help + footer p { margin: 0; } @@ -241,7 +244,7 @@ table.glyphs.dimap { .diinfo { -moz-column-width: 24em; } -.diinfo > div { +.diinfo > section { overflow: hidden; } diff --git a/charset.plp b/charset.plp index e2b2e27..e84ae82 100644 --- a/charset.plp +++ b/charset.plp @@ -99,7 +99,7 @@ for my $cp437 (grep {$request[$_]->{set} eq 'cp437'} 0 .. $#request) { my @nibble = (0..9, 'A'..'F'); for my $row (@request) { - printf '
', !$row->{cell} && ' charmap'; + printf '
', !$row->{cell} && ' charmap'; printf '', $row->{set}; print '' x 17; for my $section (qw{thead}) { @@ -144,7 +144,7 @@ for my $row (@request) { } print "\n"; } - print "
%s
\n"; + print "\n"; } :> diff --git a/common.inc.plp b/common.inc.plp index fb1d54a..e48cd2c 100644 --- a/common.inc.plp +++ b/common.inc.plp @@ -57,6 +57,7 @@ sub Html { 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' ? '•' : ' -- '; @@ -65,8 +66,7 @@ sub Html { # leading output $header{content_type} = "text/html; charset=$meta->{charset}"; print <<"EOT"; - + @@ -76,14 +76,14 @@ sub Html { EOT - print stylesheet(@$_), "\n" for $meta->{stylesheet} || (); + print $_, "\n" for $meta->{stylesheet} || (); print $_, "\n" for $meta->{raw} || (); print qq{\n\n\n}; # prepare trailing output PLP_END { print <<"EOT"; - EOT diff --git a/index.plp b/index.plp index 839392d..1a48c15 100644 --- a/index.plp +++ b/index.plp @@ -23,7 +23,7 @@ Originally created by Mischa Poslawsky -
+

Keyboard maps

  • readline @@ -33,22 +33,22 @@ but you're free to use, print, alter, and redistribute under the AGPL license.
  • nethack
  • mplayer
-
+ -
+

Unicode characters

-
+ -
+

Other references

-
+ diff --git a/red.css b/red.css index e953f5b..fabe9a6 100644 --- a/red.css +++ b/red.css @@ -20,7 +20,7 @@ h1 { 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; diff --git a/termcol.plp b/termcol.plp index 4b91032..ad6ae77 100644 --- a/termcol.plp +++ b/termcol.plp @@ -18,7 +18,7 @@ use List::Util 'min'; :>

Terminal colours

-
+
<: sub luminance { # perceived brightness (using ITU-R recommendation 601 luma co-efficients) @@ -83,11 +83,11 @@ for my $term (qw/html cga xterm tango/) { } print "\n\n"; } -:>
+:>
-
+

88-colour space

<: for my $r (0 .. 3) { @@ -107,11 +107,11 @@ print ''; print colcell(80+$_, (($_ + 2 + ($_>0)) * 255/11) x 3) for 0 .. 7; print "
\n\n"; -:>
+:> <: if ($ENV{PATH_INFO} =~ /256/) { :>
-
+

256-colour space

<: for my $r (0 .. 5) { @@ -134,7 +134,7 @@ for my $row (0, 12) { } print "\n"; -:>
+:> <: } :>
diff --git a/unicode.plp b/unicode.plp index 4a6856e..a2e834a 100644 --- a/unicode.plp +++ b/unicode.plp @@ -119,11 +119,11 @@ sub glyph_table { sub print_glyph_tables { while (@_) { - printf '

%s

'."\n\n", shift; + printf '

%s

'."\n\n", shift; while (ref $_[0] and $_ = shift) { print glyph_table($_); } - print '
'; + print ''; } }