Skip to content

A live bird collage card for your Home Assistant dashboard.

more tweaks of course

mcguirepr89f843d28521cf
diff --git a/homepage/images/version.svg b/homepage/images/version.svg
index 3cc111f0..df1dcf84 100644
--- a/homepage/images/version.svg
+++ b/homepage/images/version.svg
@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35" height="20" role="img" aria-label="0.13"><title>0.13</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="35" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="0" height="20" fill="pink"/><rect x="0" width="35" height="20" fill="pink"/><rect width="35" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="175" y="150" fill="#ccc" fill-opacity=".3" transform="scale(.1)" textLength="250">0.13</text><text x="175" y="140" transform="scale(.1)" fill="#333" textLength="250">0.13</text></g></svg>
\ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="86" height="20" role="img" aria-label="Version: 0.13"><title>Version: 0.13</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="86" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="51" height="20" fill="#555"/><rect x="51" width="35" height="20" fill="pink"/><rect width="86" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="265" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="410">Version</text><text x="265" y="140" transform="scale(.1)" fill="#fff" textLength="410">Version</text><text aria-hidden="true" x="675" y="150" fill="#ccc" fill-opacity=".3" transform="scale(.1)" textLength="250">0.13</text><text x="675" y="140" transform="scale(.1)" fill="#333" textLength="250">0.13</text></g></svg>
\ No newline at end of file
diff --git a/homepage/style.css b/homepage/style.css
index a006676f..ed9f3b59 100644
--- a/homepage/style.css
+++ b/homepage/style.css
@@ -53,6 +53,10 @@ audio, video{
width: 100%;
}
+label {
+ font-weight: bold;
+}
+
button {
background-color: transparent;
border: none;
@@ -61,16 +65,18 @@ button {
}
button:hover {
+ font-weight: bold;
color: blue;
}
.banner {
- height: 5%;
+ padding-top: 1px;
+ height: 8%;
text-align: center;
}
.banner h1 {
- font-size: x-large;
+ letter-spacing: 5px;
}
.banner audio,.banner form {
@@ -80,11 +86,10 @@ button:hover {
margin-right: auto;
}
-.logo img {
- position: absolute;
- top: 0;
- left: 0;
- padding: 10px;
+.banner button {
+ padding-top: 8px;
+ font-weight: bold;
+ letter-spacing: 1px;
}
.banner a {
@@ -93,6 +98,21 @@ button:hover {
font-size: x-large;
}
+.italic {
+ -moz-transform: scale(1) rotate(0deg) translate(0px, 0px) skew(20deg, 0deg);
+ -webkit-transform: scale(1) rotate(0deg) translate(0px, 0px) skew(20deg, 0deg);
+ -o-transform: scale(1) rotate(0deg) translate(0px, 0px) skew(20deg, 0deg);
+ -ms-transform: scale(1) rotate(0deg) translate(0px, 0px) skew(20deg, 0deg);
+ transform: scale(1) rotate(0deg) translate(0px, 0px) skew(20deg, 0deg);
+}
+
+.logo img {
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 10px;
+}
+
.topnav, .topnav form {
background-color: rgb( 159, 226, 155);
display: block;
@@ -115,7 +135,7 @@ button:hover {
}
.topnav button:hover {
- background-color: #ddd;
+ background-color: rgb(219, 295, 235);
color: black;
}
@@ -174,6 +194,35 @@ button:hover {
margin-right: auto;
}
+.views .centered button {
+ border: 2px solid black;
+ background-color: rgb(219, 255, 235);
+ padding: 12px;
+}
+
+.views .centered button:hover {
+ background-color: rgb(159, 226, 155);
+ color: black;
+}
+
+.settings {
+ padding: 12px;
+}
+
+.settings h3 {
+ text-align: left;
+}
+
+.settings button {
+ border: 2px solid black;
+ background-color: rgb(219, 255, 235);
+ padding: 12px;
+}
+
+.settings button:hover {
+ background-color: rgb(159, 226, 155);
+ color: black;
+}
.spectrogram {
width:50%
diff --git a/homepage/views.php b/homepage/views.php
index 0d629089..8a28d51f 100644
--- a/homepage/views.php
+++ b/homepage/views.php
@@ -17,6 +17,7 @@
</form>
<button href="javascript:void(0);" class="icon" onclick="myFunction()"><img src="images/menu.png"></button>
</div>
+<div class="views">
<?php
if(isset($_POST['view'])){
if($_POST['view'] == "System"){header('location:phpsysinfo/index.php');}
@@ -41,14 +42,17 @@ if(isset($_POST['view'])){
$submittedpwd = $_SERVER['PHP_AUTH_PW'];
$submitteduser = $_SERVER['PHP_AUTH_USER'];
if($submittedpwd == $caddypwd && $submitteduser == 'birdnet'){
- echo "<form action=\"\" method=\"POST\">
+ echo "<div class=\"centered\">
+ <form action=\"\" method=\"POST\">
<button type=\"submit\" name=\"view\" value=\"Settings\">Settings</button>
<button type=\"submit\" name=\"view\" value=\"System\">System Info</button>
<button type=\"submit\" name=\"view\" value=\"File\">File Manager</button>
+ <button type=\"submit\" name=\"view\" value=\"Database\">Database Maintenance</button>
<button type=\"submit\" name=\"view\" value=\"Webterm\">Web Terminal</button>
<button type=\"submit\" name=\"view\" value=\"Included\">Custom Species List</button>
<button type=\"submit\" name=\"view\" value=\"Excluded\">Excluded Species List</button>
- </form>";
+ </form>
+ </div>";
} else {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
@@ -115,6 +119,9 @@ if(isset($_POST['view'])){
if($_POST['view'] == "File"){
header('Location: scripts/filemanager/filemanager.php');
}
+ if($_POST['view'] == "Database"){
+ header('Location: scripts/adminer.php');
+ }
if($_POST['view'] == "Webterm"){
if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
$config = parse_ini_file('/home/pi/BirdNET-Pi/thisrun.txt');
@@ -161,4 +168,5 @@ function myFunction() {
}
}
</script>
+</div>
</body>
diff --git a/scripts/advanced.php b/scripts/advanced.php
index 4dbfbf2b..42072b6c 100644
--- a/scripts/advanced.php
+++ b/scripts/advanced.php
@@ -169,6 +169,7 @@ if(isset($_POST['submit'])) {
<style>
</style>
</head>
+<div class="settings">
<?php
if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
$newconfig = parse_ini_file('/home/pi/BirdNET-Pi/thisrun.txt');
@@ -177,7 +178,6 @@ if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
}
?>
<h2>Advanced Settings</h2>
- <body>
<form action="" method="POST">
<h3>Defaults</h3>
<label>Full Disk Behavior: </label>
@@ -256,4 +256,4 @@ if(isset($_POST['submit'])){
<form action="" method="POST">
<button type="submit" name="view" value="Settings">Basic Settings</button>
</form>
-</body>
+</div>
diff --git a/scripts/config.php b/scripts/config.php
index 33118f26..24decd95 100644
--- a/scripts/config.php
+++ b/scripts/config.php
@@ -41,10 +41,8 @@ if ($language != "none"){
<style>
</style>
</head>
+<div class="settings">
<h2>Basic Settings</h2>
- <body>
- <div class="row">
- <div class="column first">
<form action="" method="POST">
<?php
if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
@@ -131,6 +129,4 @@ if(isset($_POST['status'])){
<form action="" method="POST">
<button type="submit" name="view" value="Advanced">Advanced Settings</button>
</form>
- </div>
- </div>
-</body>
+</div>
diff --git a/scripts/viewdb.php b/scripts/viewdb.php
index ec925e37..c4055b39 100644
--- a/scripts/viewdb.php
+++ b/scripts/viewdb.php
@@ -102,7 +102,7 @@ $sciname = preg_replace('/ /', '_', $todaytable['Sci_Name']);
<td><?php echo $todaytable['Time'];?><br>
<b><a class="a2" href="https://allaboutbirds.org/guide/<?php echo $comname;?>" target="top"><?php echo $todaytable['Com_Name'];?></a></b><br>
<a class="a2" href="https://wikipedia.org/wiki/<?php echo $sciname;?>" target="top"><i><?php echo $todaytable['Sci_Name'];?></i></a><br>
- <?php echo $todaytable['Confidence'];?><br>
+ <b>Confidence:</b> <?php echo $todaytable['Confidence'];?><br>
<video controls poster="<?php echo $filename.".png";?>"><source src="<?php echo $filename;?>"></video></td>
<?php }?>
</tr>