A live bird collage card for your Home Assistant dashboard.
Fixing style.css again
ehpersonal38209b4e86ff08
diff --git a/homepage/style.css b/homepage/style.cssindex 2aba4fe1..c497065f 100644--- a/homepage/style.css+++ b/homepage/style.css@@ -496,10 +496,11 @@ button:hover {}.copyimage {- position:sticky;- float:right;- width:27px !important;- height:27px !important;+ position:absolute;+ top:7px;+ right:7px;+ width:25px !important;+ height:25px !important;}.relative {position:relative;diff --git a/scripts/overview.php b/scripts/overview.phpindex 78ac7a61..0a719540 100644--- a/scripts/overview.php+++ b/scripts/overview.php@@ -96,8 +96,8 @@ if(isset($_GET['ajax_detections']) && $_GET['ajax_detections'] == "true" && isse</style><table class="<?php echo ($_GET['previous_detection_identifier'] == 'undefined') ? '' : 'fade-in'; ?>"><h3>Most Recent Detection: <span style="font-weight: normal;"><?php echo $mostrecent['Date']." ".$mostrecent['Time'];?></span></h3>- <tr class="relative">- <td><a target="_blank" href="index.php?filename=<?php echo $mostrecent['File_Name']; ?>"><img class="copyimage" width="25" height="25" src="images/copy.png"></a>+ <tr>+ <td><form action="" method="GET"><input type="hidden" name="view" value="Species Stats"><button type="submit" name="species" value="<?php echo $mostrecent['Com_Name'];?>"><?php echo $mostrecent['Com_Name'];?>: </button>diff --git a/scripts/play.php b/scripts/play.phpindex 14533ad7..bc16fd19 100644--- a/scripts/play.php+++ b/scripts/play.php@@ -152,8 +152,8 @@ if(isset($_GET['species'])){$sci_name = $results['Sci_Name'];$time = $results['Time'];$confidence = $results['Confidence'];- echo "<tr class='relative'>- <td><a target=\"_blank\" href=\"index.php?filename=".$results['File_Name']."\"><img class=\"copyimage\" width=25 src=\"images/copy.png\"></a>$date $time<br>$confidence<br>+ echo "<tr>+ <td class=\"relative\"><a target=\"_blank\" href=\"index.php?filename=".$results['File_Name']."\"><img class=\"copyimage\" width=25 src=\"images/copy.png\"></a>$date $time<br>$confidence<br><video onplay='setLiveStreamVolume(0)' onended='setLiveStreamVolume(1)' onpause='setLiveStreamVolume(1)' controls poster=\"$filename.png\" preload=\"none\" title=\"$filename\"><source src=\"$filename\"></video></td></tr>";diff --git a/scripts/stats.php b/scripts/stats.phpindex dba98329..c20bf51b 100644--- a/scripts/stats.php+++ b/scripts/stats.php@@ -89,8 +89,8 @@ while($results=$result3->fetchArray(SQLITE3_ASSOC)){$linkname = preg_replace('/_/', '+', $dbsciname);$filename = "/By_Date/".$date."/".$comname."/".$results['File_Name'];echo str_pad("<h3>$species</h3>- <table><tr class=\"relative\">- <td><a target=\"_blank\" href=\"index.php?filename=".$results['File_Name']."\"><img class=\"copyimage\" width=25 src=\"images/copy.png\"></a> <a href=\"https://wikipedia.org/wiki/$dbsciname\" target=\"top\"/><i>$sciname</i></a><br>+ <table><tr>+ <td class=\"relative\"><a target=\"_blank\" href=\"index.php?filename=".$results['File_Name']."\"><img class=\"copyimage\" width=25 src=\"images/copy.png\"></a> <a href=\"https://wikipedia.org/wiki/$dbsciname\" target=\"top\"/><i>$sciname</i></a><br><b>Occurrences: </b>$count<br><b>Max Confidence: </b>$maxconf<br><b>Best Recording: </b>$date $time<br>@@ -124,9 +124,9 @@ $comname = preg_replace('/ /', '_', $results['Com_Name']);$comname = preg_replace('/\'/', '', $comname);$filename = "/By_Date/".$results['Date']."/".$comname."/".$results['File_Name'];?>- <tr class="relative">+ <tr><form action="" method="GET">- <td><a target="_blank" href="index.php?filename=<?php echo $results['File_Name']; ?>"><img class="copyimage" width=25 src="images/copy.png"></a><input type="hidden" name="view" value="Species Stats">+ <td class="relative"><a target="_blank" href="index.php?filename=<?php echo $results['File_Name']; ?>"><img class="copyimage" width=25 src="images/copy.png"></a><input type="hidden" name="view" value="Species Stats"><button type="submit" name="species" value="<?php echo $results['Com_Name'];?>"><?php echo $results['Com_Name'];?></button><br><b>Occurrences:</b> <?php echo $results['COUNT(*)'];?><br><b>Max Confidence:</b> <?php echo $results['MAX(Confidence)'];?><br><b>Best Recording:</b> <?php echo $results['Date']." ".$results['Time'];?><br><video onplay='setLiveStreamVolume(0)' onended='setLiveStreamVolume(1)' onpause='setLiveStreamVolume(1)' controls poster="<?php echo $filename.".png";?>" preload="none" title="<?php echo $filename;?>"><source src="<?php echo $filename;?>" type="audio/mp3"></video></td>