web: team-related fixes

At some point we added several team categories (national, computer type, etc.)
but there were a couple of places in the code where the # of categories
was hardwired, so the new categories weren't shown.

Also, for white-backbround color schemes,
in table headers with bg-default,
links were invisible because the text color was same as background.
Fix this in custom.css.
This commit is contained in:
David Anderson 2017-08-18 13:44:05 -07:00
parent 61c3c64b3d
commit 5114f5fe0e
4 changed files with 8 additions and 4 deletions

View File

@ -18,10 +18,9 @@
include_once("../inc/translation.inc");
global $team_types;
$team_types = array(
"",
tra("None"),
tra("Other"),
tra("Company"),
tra("Primary school"),
tra("Secondary school"),

View File

@ -11,3 +11,8 @@ table a:hover, .table a:hover, a:hover {
blockquote {
font-size: 15px;
}
.bg-primary a {
color: white;
text-decoration: underline;
}

View File

@ -49,7 +49,7 @@ echo "
<li> <a href=\"top_teams.php\">" . tra("All teams") . "</a>
";
for ($i=1; $i<8; $i++) {
for ($i=1; $i<count($team_types); $i++) {
echo "<li> <a href=\"top_teams.php?type=".$i."\">".tra("%1 teams", team_type_name($i))."</a>
";
}

View File

@ -57,7 +57,7 @@ default:
}
$type = get_int("type", true);
if ($type < 1 || $type > 7) {
if ($type < 0 || $type >= count($team_types)) {
$type = 0;
}
$type_url="";