Dynamic layout vs screen size
This commit is contained in:
+11
-7
@@ -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 = "<br><i>Last: {$months_ago}mo ago</i>";
|
||||
$last_seen_text = "<br><i><span class='text left'>Last seen: </span>{$months_ago}mo ago</i>";
|
||||
} else {
|
||||
$last_seen_text = "<br><i>Last: {$days_ago}d ago</i>";
|
||||
$last_seen_text = "<br><i><span class='text left'>Last seen: </span>{$days_ago}d ago</i>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$time_occurrence_text = "<br>{$todaytable['Time']}";
|
||||
$occurrence_text = "";
|
||||
if (isset($todaytable['OccurrenceCount']) && $todaytable['OccurrenceCount'] > 1) {
|
||||
$time_occurrence_text .= " ({$todaytable['OccurrenceCount']}x)";
|
||||
$occurrence_text = " ({$todaytable['OccurrenceCount']}x)";
|
||||
}
|
||||
?>
|
||||
<tr class="relative" id="<?php echo $iterations; ?>">
|
||||
@@ -434,8 +434,12 @@ function display_species($species_list, $title, $show_last_seen=false) {
|
||||
</i>
|
||||
</form></div>
|
||||
</td>
|
||||
<td style="white-space: nowrap;">Confidence: <?php echo round($todaytable['Confidence'] * 100 ) . '%'; echo $last_seen_text; echo $time_occurrence_text; ?><br></td>
|
||||
</tr>
|
||||
<td style="white-space: nowrap;"><?php
|
||||
echo '<span class="text left">Max Confidence: </span>' . round($todaytable['Confidence'] * 100 ) . '%' . $occurrence_text;
|
||||
echo "<br><span class='text left'>First detection: </span>{$todaytable['Time']}";
|
||||
echo $last_seen_text;
|
||||
?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user