]> git.sesse.net Git - wloh/commitdiff
Move CSS out into an external file.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 18 Mar 2012 15:29:54 +0000 (16:29 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 18 Mar 2012 15:29:54 +0000 (16:29 +0100)
www/index.pl
www/rating.pl
www/style.css [new file with mode: 0644]

index b7aa5eabbb0b90522b575958a95978616dedd6cd..4c826086bad28b01f66252c093f8bea7d2d45d13 100755 (executable)
@@ -110,7 +110,7 @@ EOF
                                ($r, $b) = ($b, $r);
                        }
 
-                       printf "        <td style=\"background-color: rgb($r, $g, $b)\">%.1f%%</td>\n", $pn * 100.0;
+                       printf "        <td style=\"background-color: rgb($r, $g, $b)\" class=\"num\">%.1f%%</td>\n", $pn * 100.0;
                }
 
                unless ($lowest_division) {
@@ -119,7 +119,7 @@ EOF
                        my $r = color(1.0);
                        my $g = color(1.0 - $pn / 3);
                        my $b = color(1.0 - $pn / 3);
-                       printf "        <td style=\"background-color: rgb($r, $g, $b)\">%.1f%%</td>\n", $pn * 100.0;
+                       printf "        <td style=\"background-color: rgb($r, $g, $b)\" class=\"num\">%.1f%%</td>\n", $pn * 100.0;
                }
                print "      </tr>\n";
        }
@@ -150,24 +150,7 @@ printf <<"EOF", $match_stddev;
 <html>
   <head>
     <title>WLoH-plasseringsannsynlighetsberegning</title>
-    <style type="text/css">
-body {
-       color: black;
-       background: white;
-       font-family: sans-serif;
-}
-table {
-       border-collapse: collapse;
-       border: 1px solid black;
-}
-td, th {
-       border: 1px solid black;
-       padding: 5px;
-}
-td {
-       text-align: right;
-}
-    </style>
+    <link rel="stylesheet" href="/style" type="text/css" />
   </head>
   <body>
     <h1>WLoH-plasseringsannsynlighetsberegning</h1>
index 81030d05dc722b0c40ff39aaea469444cc529476..2727534c949e6c03cf14ac205ce142a72505f6d3 100755 (executable)
@@ -35,27 +35,7 @@ printf <<"EOF", $params{-3}, $match_stddev;
 <html>
   <head>
     <title>WLoH-rating</title>
-    <style type="text/css">
-body {
-       color: black;
-       background: white;
-       font-family: sans-serif;
-}
-table {
-       border-collapse: collapse;
-       border: 1px solid black;
-}
-td, th {
-       border: 1px solid black;
-       padding: 5px;
-}
-td.num {
-       text-align: right;
-}
-.even {
-       background-color: #ddd;
-}
-    </style>
+    <link rel="stylesheet" href="/style" type="text/css" />
   </head>
   <body>
     <h1>WLoH-rating</h1>
diff --git a/www/style.css b/www/style.css
new file mode 100644 (file)
index 0000000..993a788
--- /dev/null
@@ -0,0 +1,19 @@
+body {
+       color: black;
+       background: white;
+       font-family: sans-serif;
+}
+table {
+       border-collapse: collapse;
+       border: 1px solid black;
+}
+td, th {
+       border: 1px solid black;
+       padding: 5px;
+}
+td.num {
+       text-align: right;
+}
+.even {
+       background-color: #ddd;
+}