switched CSS to flexbox

This commit is contained in:
mcguirepr89
2022-03-26 15:51:27 -04:00
parent e284babbee
commit 17efeafb98
2 changed files with 112 additions and 162 deletions
+62 -113
View File
@@ -74,6 +74,18 @@ button:hover {
color: blue; color: blue;
} }
.row {
display: flex;
}
.centered {
text-align: center;
display: block;
width: auto;
margin-left: auto;
margin-right: auto;
}
.banner { .banner {
padding-top: 1px; padding-top: 1px;
height: 8%; height: 8%;
@@ -103,14 +115,6 @@ button:hover {
font-size: x-large; 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 { .logo img {
position: absolute; position: absolute;
top: 0; top: 0;
@@ -120,26 +124,25 @@ button:hover {
.topnav { .topnav {
background-color: rgb(159, 226, 155); background-color: rgb(159, 226, 155);
display: block; display: flex;
width: 85%; flex: 65%;
width: 65%;
justify-content: space-between;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.topnav form { .topnav form {
display: block; margin: 0;
width: 80%; padding: 0;
margin-left: auto;
margin-rigth: auto;
} }
.topnav button { .topnav button {
background-color: transparent; background-color: transparent;
display: block;
text-align: center; text-align: center;
padding: 14px 16px; padding: 14px 16px;
float: left;
width: auto; width: auto;
height: auto;
} }
.topnav button:hover { .topnav button:hover {
@@ -152,7 +155,6 @@ button:hover {
color: white; color: white;
} }
/* Hide the link that should open and close the topnav on small screens */
.topnav .icon { .topnav .icon {
display: none; display: none;
} }
@@ -166,10 +168,6 @@ button:hover {
width: 75%; width: 75%;
} }
.overview table {
width: 20%;
}
.overview th { .overview th {
background-color: rgb(219, 255, 235); background-color: rgb(219, 255, 235);
border: 2px solid black; border: 2px solid black;
@@ -181,36 +179,28 @@ button:hover {
vertical-align: middle; vertical-align: middle;
} }
.overview img { .overview div img {
display: block;
max-height: 100%; max-height: 100%;
margin-left: 25%; display: flex;
margin-right: 10%; justify-content: center;
}
.overview span {
width: auto;
margin-right: 20%;
margin-left: auto;
}
.overview span video {
width: 100%;
padding: 0;
}
.overview span table {
width: 50%;
margin-right: 25%;
}
.overview span td {
padding: 1;
}
.overview span img {
margin-left: auto;
margin-right: auto; margin-right: auto;
margin-left: auto;
}
.overview-stats {
display: flex;
justify-content: center;
align-items: baseline;
}
.left-column {
flex: 10%;
padding-left: 10px;
}
.right-column {
flex: 90%;
margin-right: 10%;
} }
.stats td { .stats td {
@@ -221,11 +211,6 @@ button:hover {
height: auto; height: auto;
} }
.column {
width: auto;
height: 100%;
}
.stats button:hover { .stats button:hover {
color: blue; color: blue;
} }
@@ -235,10 +220,6 @@ button:hover {
color: blue; color: blue;
} }
.left {
float: left;
}
.history table,.history img { .history table,.history img {
width: auto; width: auto;
margin-left: auto; margin-left: auto;
@@ -334,14 +315,6 @@ button:hover {
width:50% width:50%
} }
.centered {
text-align: center;
display: block;
width: auto;
margin-left: auto;
margin-right: auto;
}
.full { .full {
width:100%; width:100%;
} }
@@ -365,23 +338,16 @@ button:hover {
width: 20%; width: 20%;
} }
body::-webkit-scrollbar { #body::-webkit-scrollbar {
display:none # display:none
} #}
@media screen and (max-width: 1290px) { @media screen and (max-width: 1290px) {
.overview img {
display: block;
max-height: 100%;
margin-left: 10%;
margin-right: auto;
}
.column1,.column2,.column3,.column4 { .column1,.column2,.column3,.column4 {
height: 90% height: 90%
} }
.left { .overview {
display: none; width: 100%;
} }
} }
@media screen and (max-width: 1000px) { @media screen and (max-width: 1000px) {
@@ -406,8 +372,11 @@ body::-webkit-scrollbar {
padding: 12px; padding: 12px;
background-color: rgb(219, 255, 235); background-color: rgb(219, 255, 235);
} }
.topnav {
flex: 100%;
width: 100%;
}
.topnav button {display: none;} .topnav button {display: none;}
.topnav button {width: 50%;}
.topnav button.icon { .topnav button.icon {
padding: 0; padding: 0;
margin: 0; margin: 0;
@@ -416,23 +385,6 @@ body::-webkit-scrollbar {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.topnav form {
width: 100%;
}
.overview span {
margin-right: auto;
margin-left: auto;
}
.overview span img,.overview span table,.overview img {
margin: 0;
width: 100%;
}
.overview img {
display: block;
max-height: 100%;
margin-left: 5%;
margin-right: auto;
}
.banner { .banner {
height: auto; height: auto;
} }
@@ -452,12 +404,19 @@ body::-webkit-scrollbar {
display: block; display: block;
text-align: center; text-align: center;
} }
.left { .overview span {
display: none; display: none;
} }
.right-column {
flex: 100%;
margin: 0;
}
img {
max-width: 100%;
}
} }
@media screen and (max-width: 600px) { @media screen and (max-width: 800px) {
.column1, .column3 { .column1, .column3 {
width: 100%; width: 100%;
} }
@@ -495,8 +454,9 @@ body::-webkit-scrollbar {
width: 100%; width: 100%;
} }
.topnav { .topnav {
margin-left:auto; flex: 100%;
margin-right:auto; width: 100%;
flex-direction: column;
} }
.topnav button { .topnav button {
font-size: large; font-size: large;
@@ -515,19 +475,8 @@ body::-webkit-scrollbar {
.topnav.responsive button { .topnav.responsive button {
display: block; display: block;
} }
.overview span{ .overview .column .left {
margin-right: auto; display: none;
margin-left: auto;
}
.overview span img,.overview span table,.overview img {
margin: 0;
width: 100%;
}
.overview img {
display: block;
max-height: 100%;
margin-left: 5%;
margin-right: auto;
} }
.version {display:none;} .version {display:none;}
.left { .left {
+9 -8
View File
@@ -70,8 +70,9 @@ $totalspeciestally = $result6->fetchArray(SQLITE3_ASSOC);
<title>Overview</title> <title>Overview</title>
</head> </head>
<div class="overview"> <div class="overview">
<div class="column left"> <div class="overview-stats">
<table style="height: 80%;"><tr><td style="background-color: transparent; border:none;vertical-align: middle;"> <span>
<div class="left-column">
<table> <table>
<tr> <tr>
<th>Total</th> <th>Total</th>
@@ -100,8 +101,9 @@ $totalspeciestally = $result6->fetchArray(SQLITE3_ASSOC);
</form> </form>
</tr> </tr>
</table> </table>
</td></tr></table>
</div> </div>
</span>
<div class="right-column">
<?php <?php
if (file_exists('/home/pi/BirdSongs/Extracted/Charts/'.$chart)) { if (file_exists('/home/pi/BirdSongs/Extracted/Charts/'.$chart)) {
echo "<img src=\"/Charts/$chart?nocache=time()\">"; echo "<img src=\"/Charts/$chart?nocache=time()\">";
@@ -109,7 +111,6 @@ if (file_exists('/home/pi/BirdSongs/Extracted/Charts/'.$chart)) {
echo "<p>No Detections For Today</p>"; echo "<p>No Detections For Today</p>";
} }
?> ?>
<span>
<table> <table>
<h3>Most Recent Detection: <span style="font-weight: normal;"><?php echo $mostrecent['Date']." ".$mostrecent['Time'];?></span></h3> <h3>Most Recent Detection: <span style="font-weight: normal;"><?php echo $mostrecent['Date']." ".$mostrecent['Time'];?></span></h3>
<tr> <tr>
@@ -123,7 +124,7 @@ if (file_exists('/home/pi/BirdSongs/Extracted/Charts/'.$chart)) {
</form> </form>
</tr> </tr>
</table> </table>
<h3 class="centered">Currently Analyzing</h3> <h3>Currently Analyzing</h3>
<img class="centered" src='/spectrogram.png?nocache=<?php echo time();?>' > <img src='/spectrogram.png?nocache=<?php echo time();?>' >
</span> </div>
</html> </div>