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

Commit

Permalink
Browse files Browse the repository at this point in the history
minor updates to xhtml/css.
add unicode +/- symbol.
  • Loading branch information
coke committed Jul 25, 2011
1 parent c37acce commit 17f43e8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 18 deletions.
11 changes: 6 additions & 5 deletions process.pl
@@ -1,14 +1,14 @@
use 5.010;
use strict;
use warnings;
use utf8;
use autodie;


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

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

my %status_map = (
'+' => 'implemented',
'+-' => 'partial',
'-' => 'missing',
'' => 'unknown',
'+' => 'implemented',
"\N{U+00B1}" => 'partial',
'-' => 'missing',
'' => 'unknown',
);

my @rows;
Expand Down
46 changes: 33 additions & 13 deletions template.html
Expand Up @@ -4,12 +4,31 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Feature comparison blah</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style type="text/css">
.implemented { background-color: green }
.partial { background-color: yellow }
.missing { background-color: red }
.implemented {
background-color: #11AA11;
color: white;
}
.partial {
background-color: #fff8dc;
color: black;
}
.missing {
background-color: #ff7f50;
color: black;
}
.implemented, .partial, .missing {
text-align: center
text-align: center;
width: 150px;
font-weight: bold;
font-family: monospace;
font-size: 18px;
}

.subsection {
padding-top: 1em;
text-align: left;
}
</style>

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

<h2>Legend</h2>
<table>
<tr><td class="implemented">+</td> <td>implemented</td></tr>
<tr><td class="partial">+-</td><td>partially implemented</td></tr>
<tr><td class="missing">-</td> <td>not yet implemented</td></tr>
</table>
<dl>
<dt class="implemented">+</dt>
<dd>implemented</dd>
<dt class="partial">&#177;</dt>
<dd>partially implemented</dd>
<dt class="missing">-</dt>
<dd>not yet implemented</dd>
</dl>

<h2>Features</h2>
<table>
Expand All @@ -38,13 +60,11 @@ <h2>Features</h2>
<%loop rows%>
<tr>
<%if section%>
<th colspan="<%var columns%>"><%var section%></th>
<th class="subsection"><%var section%></th>
<%else%>
<td><%var feature%></td>
<%loop compilers%>
<td class="<%var class%>">
<%var status%>
</td>
<td class="<%var class%>"><%var status%></td>
<%/loop%>
<%/if%>
</tr>
Expand Down

0 comments on commit 17f43e8

Please sign in to comment.