From 6a7291e67793074388c5ff157e59a354bb172694 Mon Sep 17 00:00:00 2001 From: Matt Way Date: Mon, 19 Aug 2024 00:07:08 +1000 Subject: [PATCH] Improve wrapping of candidate rating ticks --- php-template/template.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/php-template/template.php b/php-template/template.php index ca7f55a..86c6d71 100644 --- a/php-template/template.php +++ b/php-template/template.php @@ -56,6 +56,14 @@ } else { $candidate_image = $media['default.png']; } + + $candidate_rating = str_repeat("✔️", min(5, $candidate['Rating'])); + $candidate_rating_colour = "green"; + + // If string is 5 ticks, insert a zero width space between the 3rd and 4th ticks so that it wraps nicer + if ($candidate_rating == "✔️✔️✔️✔️✔️") { + $candidate_rating = "✔️✔️✔️​✔️✔️"; + } ?> @@ -67,7 +75,7 @@ -

+