Skip to content
This repository was archived by the owner on Nov 16, 2020. It is now read-only.

Commit 17f43e8

Browse files
committed
minor updates to xhtml/css.
add unicode +/- symbol.
1 parent c37acce commit 17f43e8

File tree

2 files changed

+39
-18
lines changed

2 files changed

+39
-18
lines changed

process.pl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use 5.010;
22
use strict;
33
use warnings;
4-
use utf8;
54
use autodie;
65

76

87
use Data::Dumper;
98
my $comment = qr{^\s*(?:\#.*)?$};
109

1110
open my $f, '<:encoding(UTF-8)', 'features.txt';
11+
binmode(STDOUT, ":encoding(UTF-8)");
1212
my %abbr_name;
1313
my %abbr_index;
1414
my $index = 0;
@@ -44,6 +44,7 @@
4444
die "Multiple data points for abbr '$abbr' at line $. -- possible typo?"
4545
if $sections[-1][-1][$i];
4646
# TODO: don't throw away the comments;
47+
$rating = "\N{U+00B1}" if $rating eq "+-";
4748
$sections[-1][-1][$i] = $rating;
4849
}
4950
}
@@ -70,10 +71,10 @@ sub write_html {
7071
$t->param(columns => 1 + @compilers);
7172

7273
my %status_map = (
73-
'+' => 'implemented',
74-
'+-' => 'partial',
75-
'-' => 'missing',
76-
'' => 'unknown',
74+
'+' => 'implemented',
75+
"\N{U+00B1}" => 'partial',
76+
'-' => 'missing',
77+
'' => 'unknown',
7778
);
7879

7980
my @rows;

template.html

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,31 @@
44
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
55
<head>
66
<title>Feature comparison blah</title>
7+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
78
<style type="text/css">
8-
.implemented { background-color: green }
9-
.partial { background-color: yellow }
10-
.missing { background-color: red }
9+
.implemented {
10+
background-color: #11AA11;
11+
color: white;
12+
}
13+
.partial {
14+
background-color: #fff8dc;
15+
color: black;
16+
}
17+
.missing {
18+
background-color: #ff7f50;
19+
color: black;
20+
}
1121
.implemented, .partial, .missing {
12-
text-align: center
22+
text-align: center;
23+
width: 150px;
24+
font-weight: bold;
25+
font-family: monospace;
26+
font-size: 18px;
27+
}
28+
29+
.subsection {
30+
padding-top: 1em;
31+
text-align: left;
1332
}
1433
</style>
1534

@@ -18,11 +37,14 @@
1837
<h1>Feature comparison of Perl 6 compilers</h1>
1938

2039
<h2>Legend</h2>
21-
<table>
22-
<tr><td class="implemented">+</td> <td>implemented</td></tr>
23-
<tr><td class="partial">+-</td><td>partially implemented</td></tr>
24-
<tr><td class="missing">-</td> <td>not yet implemented</td></tr>
25-
</table>
40+
<dl>
41+
<dt class="implemented">+</dt>
42+
<dd>implemented</dd>
43+
<dt class="partial">&#177;</dt>
44+
<dd>partially implemented</dd>
45+
<dt class="missing">-</dt>
46+
<dd>not yet implemented</dd>
47+
</dl>
2648

2749
<h2>Features</h2>
2850
<table>
@@ -38,13 +60,11 @@ <h2>Features</h2>
3860
<%loop rows%>
3961
<tr>
4062
<%if section%>
41-
<th colspan="<%var columns%>"><%var section%></th>
63+
<th class="subsection"><%var section%></th>
4264
<%else%>
4365
<td><%var feature%></td>
4466
<%loop compilers%>
45-
<td class="<%var class%>">
46-
<%var status%>
47-
</td>
67+
<td class="<%var class%>"><%var status%></td>
4868
<%/loop%>
4969
<%/if%>
5070
</tr>

0 commit comments

Comments
 (0)