diff options
author | BlueRaja <BlueRaja.admin@gmail.com> | 2013-01-13 15:57:36 -0600 |
---|---|---|
committer | BlueRaja <BlueRaja.admin@gmail.com> | 2013-01-13 15:57:36 -0600 |
commit | 994998fcca96e69bfbd7eed09e3c0023aadc2ce1 (patch) | |
tree | e73e84461776da5091d6e0c6f8bb07b500924fc0 | |
parent | 28dab5d36ab1b593ef395e64973d40d24f574dcd (diff) | |
download | pathery-994998fcca96e69bfbd7eed09e3c0023aadc2ce1.tar.xz |
Updated CSS of leaderboard page to not get ridiculously large with long names, and not make the points-string off-center
-rw-r--r-- | css/stats.css | 26 | ||||
-rw-r--r-- | pages/leaderboard.php | 12 |
2 files changed, 29 insertions, 9 deletions
diff --git a/css/stats.css b/css/stats.css index d262a75..28d6842 100644 --- a/css/stats.css +++ b/css/stats.css @@ -9,7 +9,7 @@ margin-right: 0px; margin-left: 12px; float: left; - width: 300px; + max-width: 340px; height: auto; } .col { @@ -37,6 +37,26 @@ table { td, th { padding: 3px; } + +.leaderboardHeaders .leaderboardHeadersRank, +.leaderboardHeaders .leaderboardHeadersName, +.leaderboardHeaders .leaderboardHeadersMoves, +.leaderboardHeaders .leaderboardHeadersTime +{ + border:1px solid #ccc; +} + +.leaderboardHeaders .leaderboardHeadersRank { width: 40px; } +.leaderboardHeaders .leaderboardHeadersName, +.leaderboardName +{ + max-width: 140px; + text-overflow: ellipsis; + overflow: hidden; +} +.leaderboardHeaders .leaderboardHeadersMoves { width: 45px; } +.leaderboardHeaders .leaderboardHeadersTime { width: 85px; } + .lbrow { /* Temporary adjust for font changes */ font-size:105%; @@ -112,13 +132,13 @@ td, th { white-space:nowrap; } -.wrapper .col1 .myPoints +.myPoints { text-align: center; color: #00DDFF; } -.wrapper .col1 .myPoints .myPointsValue +.myPoints .myPointsValue { font-weight: bold; }
\ No newline at end of file diff --git a/pages/leaderboard.php b/pages/leaderboard.php index 4636429..1c6ef89 100644 --- a/pages/leaderboard.php +++ b/pages/leaderboard.php @@ -256,11 +256,11 @@ function displayPastMaze($mapType, $name, $daysAgo = 1) { function displaystats($result, $caption = NULL) {
//Get names.
- $headers = "<tr>";
- $headers .= "<th style='border:1px solid #ccc'>Rank</th>";
- $headers .= "<th style='border:1px solid #ccc'>Name</th>";
- $headers .= "<th style='border:1px solid #ccc'>Moves</th>";
- $headers .= "<th style='border:1px solid #ccc'>Time taken</th>";
+ $headers = "<tr class='leaderboardHeaders'>";
+ $headers .= "<th class='leaderboardHeadersRank'>Rank</th>";
+ $headers .= "<th class='leaderboardHeadersName'>Name</th>";
+ $headers .= "<th class='leaderboardHeadersMoves'>Moves</th>";
+ $headers .= "<th class='leaderboardHeadersTime'>Time taken</th>";
$headers .= "</th>";
//Start table
//$r .= "<table style='border:1px solid #FFF'>";
@@ -288,7 +288,7 @@ function displaystats($result, $caption = NULL) { $x = "<tr class='lbrow' onmouseover='changeWallEmblem(\"$wallEmblem\"); changeWallColor(\"$wallColor\"); loadSol(\"$mapid:$solution\");'>\n";
$x .= "<td>$i</td>";
- $x .= "<td><span title='UserID: $userID'><a href='achievements?id=$userID' style='color:$displayColor'>$displayName</a></span></td>";
+ $x .= "<td class='leaderboardName'><span title='UserID: $userID'><a href='achievements?id=$userID' style='color:$displayColor'>$displayName</a></span></td>";
//$x .= "<td style='color:$displayColor';>" . $row['Name'] . '</td>';
$x .= '<td><a href="javascript:void(0)">' . $row['Moves'] . '</a></td>';
$x .= '<td>' . $row['Timetaken'] . '</td>';
|