From 05b96f1d0e64293580fd10484092d339b14b56a2 Mon Sep 17 00:00:00 2001
From: Mischa POSLAWSKY
Date: Thu, 31 Dec 2009 17:11:21 +0000
Subject: [PATCH] revert html5 elements usage
Breaks styling in MSIE upto version 8 (hurray). Not worth it (yet) as
classes are nearly as descriptive.
Completely reverts v1.2-135-g9a4d896 [use html5 elements (section, footer)].
---
base.css | 17 +++++++----------
charset.plp | 4 ++--
common.inc.plp | 10 +++++-----
index.plp | 12 ++++++------
red.css | 2 +-
termcol.plp | 12 ++++++------
unicode.plp | 4 ++--
7 files changed, 29 insertions(+), 32 deletions(-)
diff --git a/base.css b/base.css
index b22c038..139c94c 100644
--- a/base.css
+++ b/base.css
@@ -36,22 +36,19 @@ hr {
margin: 0;
}
-section {
- display: block;
-}
-section ul {
+.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 */
}
@@ -61,10 +58,10 @@ p {
p.aside {
font-size: 80%;
}
-footer p {
+p.footer {
margin: 1em 0 0;
}
-.help + footer p {
+.help + .footer {
margin: 0;
}
@@ -244,7 +241,7 @@ table.glyphs.dimap {
.diinfo {
-moz-column-width: 24em;
}
-.diinfo > section {
+.diinfo > div {
overflow: hidden;
}
diff --git a/charset.plp b/charset.plp
index e84ae82..e2b2e27 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 '%s', $row->{set};
print '' x 17;
for my $section (qw{thead}) {
@@ -144,7 +144,7 @@ for my $row (@request) {
}
print "\n";
}
- print "
\n";
+ print "
\n";
}
:>
diff --git a/common.inc.plp b/common.inc.plp
index e48cd2c..fb1d54a 100644
--- a/common.inc.plp
+++ b/common.inc.plp
@@ -57,7 +57,6 @@ 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' ? 'â¢' : ' -- ';
@@ -66,7 +65,8 @@ sub Html {
# leading output
$header{content_type} = "text/html; charset=$meta->{charset}";
print <<"EOT";
-
+
@@ -76,14 +76,14 @@ sub Html {
EOT
- print $_, "\n" for $meta->{stylesheet} || ();
+ print stylesheet(@$_), "\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 1a48c15..839392d 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
-
+
-
+
-
+
diff --git a/red.css b/red.css
index fabe9a6..e953f5b 100644
--- a/red.css
+++ b/red.css
@@ -20,7 +20,7 @@ h1 {
h2, caption {
text-shadow: #F00 0 0 1em, #F00 0 0 1ex;
}
-footer p {
+p.footer {
border: 1px dashed #600;
border-width: 1px 0 0;
margin-top: 1.5em;
diff --git a/termcol.plp b/termcol.plp
index ad6ae77..4b91032 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 a2e834a..4a6856e 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 '';
}
}
--
2.30.0