Skip to content

Commit 820a21c

Browse files
committed
Tweaks
1 parent 77ff87b commit 820a21c

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

index.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
$dataPoints3 = array();
77
$dataPoints4 = array();
88

9-
$airconon = -1;
9+
$airconon = '';
1010
$query = "SELECT UNIX_TIMESTAMP(whentime) * 1000 as whentime,temperature,humidity,feelslike,rssi,airconon FROM sensibo WHERE whentime >= now() - INTERVAL 2 DAY ORDER BY whentime ASC";
1111
$res = mysqli_query($link, $query);
1212
while($row = mysqli_fetch_assoc($res))
1313
{
14-
if($row['airconon'] != $airconon)
14+
if($row['airconon'] != $airconon && $airconon != '')
1515
{
1616
$airconon = $row['airconon'];
1717

@@ -21,6 +21,7 @@
2121
$dataPoints1[] = array('x' => $row['whentime'], 'y' => $row['temperature'], 'inindexLabel' => $ac, 'markerType' => 'cross', 'markerSize' => 20,'markerColor' => '#4F81BC');
2222
} else {
2323
$dataPoints1[] = array('x' => $row['whentime'], 'y' => $row['temperature']);
24+
$airconon = $row['airconon'];
2425
}
2526

2627
$dataPoints2[] = array('x' => $row['whentime'], 'y' => $row['humidity']);
@@ -50,6 +51,7 @@
5051
/* Create two columns/boxes that floats next to each other */
5152
nav {
5253
float: left;
54+
height: 100vh;
5355
width: 350px;
5456
background: #ccc;
5557
padding: 20px;
@@ -73,14 +75,6 @@
7375
display: table;
7476
clear: both;
7577
}
76-
77-
/* Responsive layout - makes the two columns/boxes stack on top of each other instead of next to each other, on small screens */
78-
@media (max-width: 600px) {
79-
nav, article {
80-
width: 100%;
81-
height: auto;
82-
}
83-
}
8478
</style>
8579
<script>
8680
window.onload = function () {

0 commit comments

Comments
 (0)