From f231f5e9dc7a306794d72930bceed173a3ed9c39 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:39:44 +0100 Subject: [PATCH] Dynamic layout vs screen size --- scripts/overview.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/overview.php b/scripts/overview.php index 3d4d14e..a449c2c 100644 --- a/scripts/overview.php +++ b/scripts/overview.php @@ -400,20 +400,20 @@ function display_species($species_list, $title, $show_last_seen=false) { $image_url = $image[1] ?? ""; // Get the image URL if available } + $last_seen_text = ""; if ($show_last_seen && isset($todaytable['DaysAgo'])) { $days_ago = $todaytable['DaysAgo']; if ($days_ago > 30) { $months_ago = floor($days_ago / 30); - $last_seen_text = "
Last: {$months_ago}mo ago"; + $last_seen_text = "
Last seen: {$months_ago}mo ago"; } else { - $last_seen_text = "
Last: {$days_ago}d ago"; + $last_seen_text = "
Last seen: {$days_ago}d ago"; } - } - $time_occurrence_text = "
{$todaytable['Time']}"; + $occurrence_text = ""; if (isset($todaytable['OccurrenceCount']) && $todaytable['OccurrenceCount'] > 1) { - $time_occurrence_text .= " ({$todaytable['OccurrenceCount']}x)"; + $occurrence_text = " ({$todaytable['OccurrenceCount']}x)"; } ?> @@ -434,8 +434,12 @@ function display_species($species_list, $title, $show_last_seen=false) { - Confidence:
- + Max Confidence: ' . round($todaytable['Confidence'] * 100 ) . '%' . $occurrence_text; + echo "
First detection: {$todaytable['Time']}"; + echo $last_seen_text; + ?> +