[FRONT] additional day/night styling, layout values as tables
This commit is contained in:
parent
d29232cb3c
commit
153d48f8ef
3 changed files with 50 additions and 19 deletions
45
index.php
45
index.php
|
@ -69,30 +69,41 @@ if (isset($_GET['action'])) {
|
|||
<link rel="stylesheet" href="style.css">
|
||||
|
||||
</head>
|
||||
<body class="container">
|
||||
<body class="container <?php echo ($light->isNight) ? 'dark' : 'light' ?>">
|
||||
<h1>Garagenlicht</h1>
|
||||
|
||||
<?php if ($error_string != '') : ?>
|
||||
<div class="alert alert-danger" role="alert"><?php echo $error_string ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2>Aktueller Status</h2>
|
||||
<p>
|
||||
<?php if ($light->state) : ?>
|
||||
Licht: <span class="label label-success">AN</span><br>
|
||||
<?php else : ?>
|
||||
Licht: <span class="label label-default">AUS</span><br>
|
||||
<?php endif; ?>
|
||||
Zeit bis nächste Änderung: <span class="label label-default"><?php echo ($light->changeTime === 1) ? $light->changeTime." Minute" : $light->changeTime." Minuten" ?></span>
|
||||
</p>
|
||||
<a class="btn btn-success" href="index.php?action=enlighten">Licht temporär an (15 Min)</a>
|
||||
<table class="big">
|
||||
<tr>
|
||||
<td>Licht:</td>
|
||||
<td><?php echo ($light->state) ? '<span class="label label-success">EINGESCHALTET</span>'
|
||||
: '<span class="label label-default">AUSGESCHALTET</span>';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Änderung in:</td>
|
||||
<td><span class="label label-primary"><?php echo ($light->changeTime === 1) ? $light->changeTime." Minute" : $light->changeTime." Minuten" ?></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="btn btn-primary" href="index.php?action=enlighten">Licht temporär an (15 Min)</a>
|
||||
|
||||
<h5>weitere Informationen:</h5>
|
||||
<p>
|
||||
Sonnenaufgang: <?php echo $light->sunrise ?><br>
|
||||
Sonnenuntergang: <?php echo $light->sunset ?><br>
|
||||
Aktuelle Zeit: <?php echo date("Y-m-d H:i",time()) ?><br>
|
||||
</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Sonnenaufgang:</td><td><?php echo $light->sunrise ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sonnenuntergang:</td><td><?php echo $light->sunset ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Aktuelle Zeit:</td><td><?php echo date("H:i, Y-m-d",time()) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Nacht (ja/nein):</td><td><?php echo ($light->isNight) ? "ja" : "nein" ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Einstellungen</h2>
|
||||
<form class="form-horizontal" action="index.php?action=update" method="post">
|
||||
|
@ -117,7 +128,7 @@ if (isset($_GET['action'])) {
|
|||
<input type="time" class="form-control" name="time3-stop" value="<?php echo $light->times['time3']['off'] ?>">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-warning">Zeiten ändern</button>
|
||||
<button type="submit" class="btn btn-primary">Zeiten ändern</button>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
|
|
Reference in a new issue