Skip to content

A live bird collage card for your Home Assistant dashboard.

styled exclude species list settings page

mcguirepr8978f502423562
diff --git a/homepage/style.css b/homepage/style.css
index 028f366a..3257729e 100644
--- a/homepage/style.css
+++ b/homepage/style.css
@@ -266,6 +266,55 @@ button:hover {
color: black;
}
+.customlabels {
+ float:left;
+}
+
+.customlabels table {
+ height: 100%;
+}
+
+.customlabels td {
+ border:none;
+ background-color: transparent;
+ vertical-align: middle;
+}
+
+.customlabels button {
+ padding: 12px;
+ background-color: rgb(219, 255, 235);
+ border: 2px solid black;
+ width: 100%;
+}
+
+.column1, .column3 {
+ width: 45%;
+}
+
+.smaller {
+ width: 100%;
+ display: none;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.column2 {
+ text-align: center;
+ width: 10%;
+ height: 80%;
+}
+
+.column1 form,.column3 form {
+ width: 80%;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.column1 select,.column3 select {
+ height: 80%;
+ width: 100%;
+}
+
.spectrogram {
width:50%
}
@@ -305,7 +354,28 @@ body::-webkit-scrollbar {
display:none
}
+@media screen and (max-width: 1290px) {
+ .column1, .column3 {
+ height: 90%
+ }
+}
@media screen and (max-width: 1000px) {
+ .customlabels form {
+ width: 95%;
+ }
+ .column1, .column3 {
+ width: 50%;
+ height: 100%;
+ }
+ .column1 select,.column3 select {
+ height: 70%;
+ }
+ .column2 {
+ display: none;
+ }
+ .smaller{
+ display: block;
+ }
.systemcontrols button,.servicecontrols button {
width: 60%;
padding: 12px;
@@ -354,6 +424,9 @@ body::-webkit-scrollbar {
}
@media screen and (max-width: 600px) {
+ .column1, .column3 {
+ width: 100%;
+ }
.systemcontrols button,.servicecontrols button {
width: 80%;
padding: 12px;
diff --git a/scripts/exclude_list.php b/scripts/exclude_list.php
index ebf46914..280f4c72 100644
--- a/scripts/exclude_list.php
+++ b/scripts/exclude_list.php
@@ -2,41 +2,56 @@
<style>
</style>
-<?php
-error_reporting(E_ALL);
-ini_set('display_errors',1);
-
-$filename = 'scripts/labels.txt';
-$eachline = file($filename, FILE_IGNORE_NEW_LINES);
-
-?>
-
<body>
- <h2>All Species Labels</h2>
- <form action="" method="POST" id="add">
- <select name="species[]" id="species" multiple size="30">
- <option selected value="base">Please Select</option>
-<?php
-foreach($eachline as $lines){
- echo "<option value='".$lines."'>$lines</option>";
-}?>
- </select>
- <input type="hidden" name="add" value="add">
- </form>
+<div class="customlabels column1">
+<form action="" method="POST" id="add">
+ <h3>All Species Labels</h3>
+ <select name="species[]" id="species" multiple size="auto">
+ <option>Choose a species below to add to the Excluded Species List</option>
+ <?php
+ error_reporting(E_ALL);
+ ini_set('display_errors',1);
+
+ $filename = 'scripts/labels.txt';
+ $eachline = file($filename, FILE_IGNORE_NEW_LINES);
+
+ foreach($eachline as $lines){echo
+ "<option value='".$lines."'>$lines</option>";}
+ ?>
+ </select>
+ <input type="hidden" name="add" value="add">
+</form>
+<div class="customlabels smaller">
+ <button type="submit" name="view" value="Excluded" form="add">>>ADD>></button>
+</div>
+</div>
- <button type="submit" name="view" value="Excluded" form="add">Add to list</button><br>
- <button type="submit" name="view" value="Excluded" form="del">Remove from list</button>
+<div class="customlabels column2">
+ <table><td>
+ <button type="submit" name="view" value="Excluded" form="add">>>ADD>></button><br>
+ <br>
+ <button type="submit" name="view" value="Excluded" form="del">REMOVE</button>
+ </td></table>
+</div>
- <h2>Excluded Species List</h2>
- <form action="" method="POST" id="del">
- <select name="species[]" id="value2" multiple size="30">
- <option selected value="base">Please Select</option>
+<div class="customlabels column3">
+<form action="" method="POST" id="del">
+ <h3>Excluded Species List</h3>
+ <select name="species[]" id="value2" multiple size="auto">
<?php
$filename = '/home/pi/BirdNET-Pi/exclude_species_list.txt';
-$eachline = file($filename, FILE_IGNORE_NEW_LINES);
-foreach($eachline as $lines){
- echo "<option value='".$lines."'>$lines</option>";
+ $eachline = file($filename, FILE_IGNORE_NEW_LINES);
+ foreach($eachline as $lines){
+ echo
+ "<option value='".$lines."'>$lines</option>";
}?>
- <input type="hidden" name="del" value="del">
- </form>
+ </select>
+ <input type="hidden" name="del" value="del">
+</form>
+<div class="customlabels smaller">
+ <button type="submit" name="view" value="Excluded" form="del">REMOVE</button>
+</div>
+</div>
+
+
</body>