Only use ticks under candidates

This commit is contained in:
2024-08-19 14:20:52 +10:00
parent 8cd1463fef
commit 019090089b

View File

@@ -57,13 +57,8 @@
$candidate_image = $media['default.png']; $candidate_image = $media['default.png'];
} }
if ($candidate['Rating'] > 1) { $candidate_rating = str_repeat("✔️", max(0, min(5, $candidate['Rating'])));
$candidate_rating = str_repeat("✔️", min(5, $candidate['Rating']));
$candidate_rating_colour = "green"; $candidate_rating_colour = "green";
} else {
$candidate_rating = "❌";
$candidate_rating_colour = "red";
}
// If string is 5 ticks, insert a zero width space between the 3rd and 4th ticks so that it wraps nicer // If string is 5 ticks, insert a zero width space between the 3rd and 4th ticks so that it wraps nicer
if ($candidate_rating == "✔️✔️✔️✔️✔️") { if ($candidate_rating == "✔️✔️✔️✔️✔️") {