This commit is contained in:
mcguirepr89
2022-02-27 15:27:57 -05:00
parent 79caccafb3
commit 7fa41cdc28
7 changed files with 71 additions and 139 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

+46 -10
View File
@@ -2,6 +2,7 @@
font-family: 'Arial', 'Gill Sans', 'Gill Sans MT', font-family: 'Arial', 'Gill Sans', 'Gill Sans MT',
' Calibri', 'Trebuchet MS', 'sans-serif'; ' Calibri', 'Trebuchet MS', 'sans-serif';
box-sizing: border-box; box-sizing: border-box;
font-size: large;
} }
.banner { .banner {
@@ -11,6 +12,7 @@
.banner h1 { .banner h1 {
float: top; float: top;
font-size: x-large;
} }
.banner audio { .banner audio {
@@ -27,7 +29,7 @@
} }
.topnav { .topnav {
background-color: rgb(119, 196, 135); background-color: rgb( 159, 226, 155);
display: block; display: block;
} }
@@ -54,6 +56,28 @@
display: none; display: none;
} }
.play table {
width:50%;
margin-right: auto;
margin-left: auto;
}
.overview td {
width:20%;
}
.overview table {
width: 75%;
}
.stats table {
width: 100%;
}
a {
text-decoration: none;
}
h3 { h3 {
text-align: center; text-align: center;
} }
@@ -71,7 +95,6 @@ body {
table { table {
background-color: transparent; background-color: transparent;
margin: 0 auto; margin: 0 auto;
font-size: large;
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
width: 100%; width: 100%;
@@ -79,6 +102,8 @@ table {
} }
td { td {
padding: 10px;
vertical-align: top;
background-color: rgb(219, 255, 235); background-color: rgb(219, 255, 235);
font-weight: lighter; font-weight: lighter;
border: 2px solid black; border: 2px solid black;
@@ -100,20 +125,28 @@ audio, video{
} }
.centered { .centered {
text-align: center;
display: block; display: block;
width: auto; width: auto;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.full {
width:100%;
}
button { button {
font-size: large;
background-color: transparent; background-color: transparent;
border: none; border: none;
color: black; color: black;
cursor: pointer; cursor: pointer;
} }
button:hover {
color: blue;
}
.logbutton, .navbuttons { .logbutton, .navbuttons {
float: left; float: left;
} }
@@ -140,15 +173,17 @@ body::-webkit-scrollbar {
@media screen and (max-width: 1000px) { @media screen and (max-width: 1000px) {
.topnav.responsive {position: relative;} .topnav.responsive {position: relative;}
.topnav.responsive button { .topnav.responsive button {
float: left;
display: block; display: block;
text-align: center; text-align: center;
} }
} }
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
.top.nav button { .play table,.overview table {
font-size: 16px; width: 100%;
}
.topnav button {
font-size: xx-large;
} }
.topnav button {display: none;} .topnav button {display: none;}
/*.topnav button:not(:first-child) {display: none;}*/ /*.topnav button:not(:first-child) {display: none;}*/
@@ -161,13 +196,14 @@ body::-webkit-scrollbar {
} }
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
.play table,.overview table {
width: 100%;
}
.topnav button { .topnav button {
font-size: 16px; font-size: x-large;
} }
.topnav.responsive {position: relative;} .topnav.responsive {position: relative;}
.topnav.responsive button { .topnav.responsive button {
float: left;
display: block; display: block;
text-align: center; text-align: center;
} }}
}
+1 -1
View File
@@ -26,7 +26,7 @@ if(isset($_POST['view'])){
if($_POST['view'] == "Spectrogram"){include('spectrogram.php');} if($_POST['view'] == "Spectrogram"){include('spectrogram.php');}
if($_POST['view'] == "Overview"){include('overview.php');} if($_POST['view'] == "Overview"){include('overview.php');}
if($_POST['view'] == "Today's Detections"){include('viewdb.php');} if($_POST['view'] == "Today's Detections"){include('viewdb.php');}
if($_POST['view'] == "Species Stats"){include('stats.php');} if($_POST['view'] == "Species Stats"){echo "<br><br>";include('stats.php');}
if($_POST['view'] == "Daily Charts"){include('history.php');} if($_POST['view'] == "Daily Charts"){include('history.php');}
if($_POST['view'] == "Tools"){ if($_POST['view'] == "Tools"){
if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) { if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
+4 -8
View File
@@ -68,8 +68,7 @@ $speciestally = $result5->fetchArray(SQLITE3_ASSOC);
</style> </style>
</head> </head>
<body> <body>
<div> <div class="overview">
</div>
<table> <table>
<tr> <tr>
<th>Total</th> <th>Total</th>
@@ -88,9 +87,6 @@ $speciestally = $result5->fetchArray(SQLITE3_ASSOC);
</form> </form>
</tr> </tr>
</table> </table>
</div>
<div>
<table> <table>
<tr> <tr>
<th>Most Recent Detection</th> <th>Most Recent Detection</th>
@@ -112,7 +108,7 @@ $speciestally = $result5->fetchArray(SQLITE3_ASSOC);
<td><?php echo $mostrecent['Confidence'];?></td> <td><?php echo $mostrecent['Confidence'];?></td>
</tr> </tr>
</table> </table>
</div> </div>
<?php <?php
if (file_exists('/home/pi/BirdSongs/Extracted/Charts/'.$chart)) { if (file_exists('/home/pi/BirdSongs/Extracted/Charts/'.$chart)) {
echo "<img class=\"centered\" src=\"/Charts/$chart?nocache=time()\">"; echo "<img class=\"centered\" src=\"/Charts/$chart?nocache=time()\">";
@@ -120,6 +116,6 @@ if (file_exists('/home/pi/BirdSongs/Extracted/Charts/'.$chart)) {
echo "<p>No Detections For Today</p>"; echo "<p>No Detections For Today</p>";
} }
?> ?>
<h3>Currently Analyzing</h3> <h3 class="centered">Currently Analyzing</h3>
<img class="centered" style="width:100%;" src='/spectrogram.png?nocache=<?php echo time();?>' > <img class="full" src='/spectrogram.png?nocache=<?php echo time();?>' >
</html> </html>
-99
View File
@@ -1,99 +0,0 @@
/* style sheet */
* {
font-family: 'Arial', 'Gill Sans', 'Gill Sans MT',
' Calibri', 'Trebuchet MS', 'sans-serif';
box-sizing: border-box;
}
a {
text-decoration:none;
}
body {
background-color: rgb(119, 196, 135);
}
.column {
display:block;
width:33%;
margin-left:auto;
margin-right:auto;
}
.left {
float:left;
}
.right {
float:right;
width:66%;
}
table {
background-color: rgb(219, 255, 235);
margin: 0 auto;
font-size: large;
border-collapse: collapse;
border-spacing: 0;
width: 100%;
border: 1px solid black;
}
h1 {
text-align: center;
color: black;
font-size: xx-large;
}
h2 {
margin-left: -150px;
text-align: center;
color: black;
font-size: large;
}
h3 {
text-align: center;
color: black;
font-size: large;
}
td {
background-color: rgb(219, 255, 235);
font-weight: lighter;
border: 1px solid black;
padding: 10px;
text-align: center;
}
th {
background-color: rgb(219, 255, 235);
font-weight: bold;
border: 1px solid black;
padding: 10px;
text-align: center;
}
button {
background-color: transparent;
font-size: large;
border:none;
cursor:pointer;
}
@media screen and (max-width: 1000px) {
h2 {
margin-left: 0;
text-align: center;
color: black;
font-size: large;
}
.column {
width: 80%;
}
}
body::-webkit-scrollbar {
display:none
}
+7 -6
View File
@@ -56,6 +56,7 @@ if(isset($_POST['bydate'])){
</style> </style>
</head> </head>
<body> <body>
<div class="play">
<table> <table>
<?php <?php
if(!isset($_POST['species'])){ if(!isset($_POST['species'])){
@@ -86,20 +87,20 @@ while($results=$result->fetchArray(SQLITE3_ASSOC))
$comname = preg_replace('/\'/', '', $comname); $comname = preg_replace('/\'/', '', $comname);
$file = $results['File_Name']; $file = $results['File_Name'];
$filename = "/By_Date/".$date."/".$comname."/".$results['File_Name']; $filename = "/By_Date/".$date."/".$comname."/".$results['File_Name'];
echo "<table> echo "<table >
<tr> <tr>
<th>$name</th> <th colspan=\"2\">$name</th>
<th>Max Confidence: $maxconf</th> <th></th>
</tr> </tr>
<tr> <tr>
<th>Most confident recording: </th> <td class=\"spectrogram\">Best Recording<br>$maxconf<br><video controls poster=\"$filename.png\"><source src=\"$filename\"></video></td>
<td class=\"spectrogram\"><video controls poster=\"$filename.png\"><source src=\"$filename\"></video></td>
</tr></table>"; </tr></table>";
};};?> };};?>
</td> </td>
</form> </form>
</tr> </tr>
</table> </table>
</div>
<?php <?php
if(isset($_POST['species'])){ if(isset($_POST['species'])){
$name = $_POST['species']; $name = $_POST['species'];
@@ -109,7 +110,7 @@ while($results=$result->fetchArray(SQLITE3_ASSOC))
header("refresh: 0;"); header("refresh: 0;");
} }
$result2 = $statement2->execute(); $result2 = $statement2->execute();
echo "<table> echo "<table >
<tr> <tr>
<th>When</th> <th>When</th>
<th>Listen</th> <th>Listen</th>
+13 -15
View File
@@ -32,23 +32,24 @@ if(isset($_POST['species'])){
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>BirdNET-Pi DB</title> <title>BirdNET-Pi DB</title>
<link rel="stylesheet" href="../style.css">
<style> <style>
</style> </style>
</head> </head>
<body> <body>
<section>
<div class="row">
<div class="column first">
<?php if(!isset($_POST['species'])){ <?php if(!isset($_POST['species'])){
echo "<p style=\"text-align:center\">Choose a species below to load images from Wikimedia Commons.</p>"; ?><p class="centered">Choose a species below to load images from Wikimedia Commons.</p>
<?php
};?> };?>
<table> <table>
<tr> <tr>
<th>Common Name</th> <th>Common Name</th>
<th>Occurrences</th> <th>Occurrences</th>
<th>Max Confidence Score</th> <th>Max Confidence Score</th>
<th>Best Recording</th> <th>Best Recording</th>
</tr> </tr>
<?php <?php
while($results=$result->fetchArray(SQLITE3_ASSOC)) while($results=$result->fetchArray(SQLITE3_ASSOC))
@@ -65,17 +66,15 @@ $filename = "/By_Date/".$results['Date']."/".$comname."/".$results['File_Name'];
</form> </form>
<td><?php echo $results['COUNT(*)'];?></td> <td><?php echo $results['COUNT(*)'];?></td>
<td><?php echo $results['MAX(Confidence)'];?></td> <td><?php echo $results['MAX(Confidence)'];?></td>
<td class="spectrogram"><video controls poster="<?php echo $filename.".png";?>"><source src="<?php echo $filename;?>" type="audio/mp3"></video></td> <td style="width:50%"><video controls poster="<?php echo $filename.".png";?>"><source src="<?php echo $filename;?>" type="audio/mp3"></video></td>
</tr> </tr>
<?php <?php
} }
?> ?>
</table> </table>
</div>
<?php if(isset($_POST['species'])){ <?php if(isset($_POST['species'])){
$species = $_POST['species']; $species = $_POST['species'];
$str = "<div class=\"column second\"> $str = "<h3>$species</h3>
<h3>$species</h3>
<table> <table>
<tr> <tr>
<th>Scientific Name</th> <th>Scientific Name</th>
@@ -123,7 +122,6 @@ while($results=$result3->fetchArray(SQLITE3_ASSOC)){
} }
}} }}
?> ?>
</body>
</section>
</html> </html>