From ee347087cc7e6713d4bda1438bd2d139d95b7432 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 21 Oct 2007 01:54:34 +0200 Subject: [PATCH] Made the front page a bit more... different. --- www/foosball.css | 65 ++++++++++ www/index.pl | 6 +- www/index.xml | 329 +++++++++++++++++++++++++---------------------- 3 files changed, 240 insertions(+), 160 deletions(-) create mode 100644 www/foosball.css diff --git a/www/foosball.css b/www/foosball.css new file mode 100644 index 0000000..a552baf --- /dev/null +++ b/www/foosball.css @@ -0,0 +1,65 @@ +html { + background-color: #ffffff; + color: #000000; + font-family: arial; +} + +.box { + border: 3px solid #2a5580; + float: left; + margin: 0.5em; + padding: 0.5em; + text-align: center; +} +#addsingle, #assesssingle { + width: 17em; +} +#adddouble, #assessdouble { + width: 20em; +} +#singleboard, #assesssingle, #lastgames { + clear: left; +} +#addsingle th, #assesssingle th, #adddouble th, #assessdouble th { + padding-right: 1em; +} +h2 { + padding-top: 1em; +} +.box h2 { + margin-top: 0em; + padding-top: 0em; + margin-bottom: 0.5em; + display: block; + text-align: center; +} +#addsingle table, #adddouble table, #assesssingle table, #assessdouble table { + margin-left: auto; + margin-right: auto; +} +#singleboard table, #doubleboard table, #lastgames table { + border-collapse: collapse; +} +#singleboard td, #singleboard th, #doubleboard td, #doubleboard th, #lastgames td, #lastgames th { + border-right: 2px solid #80632a; +} +#singleboard .trend, #doubleboard .trend, #lastgames .rightmost { + border-right: none; +} +#singleboard tr.even, #doubleboard tr.even, #lastgames tr.even { + background-color: #e8d98e; +} +#singleboard th, #doubleboard th, #lastgames th, #singleboard td, #doubleboard td, #lastgames td { + text-align: center; + padding-left: 0.5em; + padding-right: 0.5em; +} +input { + border: 1px solid #285580; + background: transparent; +} +input[type="button"], input[type="submit"] { + border: 2px outset #285580; + background: transparent; + margin-top: 5px; +} diff --git a/www/index.pl b/www/index.pl index 80c874b..a9f2d43 100755 --- a/www/index.pl +++ b/www/index.pl @@ -134,8 +134,8 @@ $dbh->disconnect; print CGI->header(-type=>'application/xhtml+xml'); my $doc = XML::Template::process_file('index.xml', { - '#singletop' => \@single_top, - '#doubletop' => \@double_top, - '#lastgames' => \@last_games, + '#singletop' => XML::Template::alternate('tr/class', \@single_top, 'odd', 'even'), + '#doubletop' => XML::Template::alternate('tr/class', \@double_top, 'odd', 'even'), + '#lastgames' => XML::Template::alternate('tr/class', \@last_games, 'odd', 'even'), }); print $doc->toString; diff --git a/www/index.xml b/www/index.xml index ec45269..fea9212 100644 --- a/www/index.xml +++ b/www/index.xml @@ -6,181 +6,196 @@ Foosball! + -

Foosball!

+

...on a clear day, you can play foosball forever

-

Add a singles result

+
+

Add a singles result

-
- - - - - - - - - - - - - - - - -
User name 1
User name 2
Score - - - -
-
+
+ + + + + + + + + + + + + + + + +
Player 1:
Player 2:
Score: + – + +
+
+
-

Add a doubles result

+
+

Add a doubles result

-
- - - - - - - - - - - - - - - - -
Team 1 (usernames) - and - -
Team 2 (usernames) - and - -
Score - - - -
-
- -

Singles score board

+
+ + + + + + + + + + + + + + + + +
Team 1: + and + +
Team 2: + and + +
Score: + – + +
+
+
+ +
+

Assess a singles match

- - - - - - - - - - - - - - - - - - - -
UsernameRatingRDLower boundSince -1d
+
+ + + + + + + + + + + + +
User name 1
User name 2
+
+
+ +
+

Assess a doubles match

-

Doubles score board

+
+ + + + + + + + + + + + +
Team 1: + and + +
Team 2: + and + +
+
+
- - - - - - - - - - - - - - - - - - - -
UsernameRatingRDLower boundSince -1d
+
+

Singles score board

-

Last ten games

+ + + + + + + + + + + + + + + + + + + +
UsernameRatingRDLower boundSince -1d
+
- - - - - - - - - - - - - - - - - - - - - -
RegisteredTypeOpponentsScoreRating diff.
- -

Assess a singles match

+
+

Doubles score board

-
- - - - - - - - - - - + + + + + + + + + + + + + + + + + +
User name 1
User name 2
UsernameRatingRDLower boundSince -1d
-
- -

Assess a doubles match

+
+ +
+

Last ten games

-
- - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
Team 1 (usernames) - and - -
Team 2 (usernames) - and - -
RegisteredTypeOpponentsScoreRating diff.
-
- -

About the ratings

+
+ +

About the ratings

The rating system in use is called FoosRank, and is specially designed for this site. It is a Bayesian rating system, inspired by -- 2.39.2