You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.6 KiB
69 lines
2.6 KiB
<?php if (!defined('INIT')) exit; ?>
|
|
<!DOCTYPE html>
|
|
<html lang>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Phedder</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
</head>
|
|
<body>
|
|
<h1><?=e($DATA['city'])?></h1>
|
|
<h2><small><?=e($DATA['sunrise'])?> / <?=e($DATA['sunset'])?></small></h2>
|
|
|
|
<table class="forecast">
|
|
<thead>
|
|
<tr>
|
|
<th>Datum</th>
|
|
<th>Regen</th>
|
|
<th colspan="3"></th>
|
|
<th>Wind</th>
|
|
<th>Temp</th>
|
|
</tr>
|
|
</thead>
|
|
<?php foreach($grouped as $group): ?>
|
|
<tbody>
|
|
<?php $first = true; ?>
|
|
<?php foreach($group as $line): ?>
|
|
<tr>
|
|
<td>
|
|
<?php if ($first): ?>
|
|
<?=e(substr($line['date'], 0, 11))?>
|
|
<?php $first = false; ?>
|
|
<?php else: ?>
|
|
<?=e(substr($line['date'], 12, 5))?>
|
|
<?php endif; ?>
|
|
</td>
|
|
<td><?=e(round($line['rain'], 1))?>mm</td>
|
|
<td class="pictogram"><?=($line['icon'])?></td>
|
|
<td class="pictogram">
|
|
<?php $class = $line['riding'] === 'Y' ? 'flying-weather'
|
|
: $line['riding'] === 'M' ? 'maybe-flying-weather'
|
|
: '' ?>
|
|
<span class="<?=$class?>"><?=e($line['ridingIcon'])?></span>
|
|
</td>
|
|
<td class="pictogram">
|
|
<?php $class = $line['flying'] === 'Y' ? 'flying-weather'
|
|
: $line['flying'] === 'M' ? 'maybe-flying-weather'
|
|
: '' ?>
|
|
<span class="<?=$class?>"><?=e($line['flyingIcon'])?></span>
|
|
</td>
|
|
<td><?=e($line['wind'])?>m/s</td>
|
|
<td><?=e(round($line['temp'], 1))?>°C</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
|
|
<form action="<?=wc()?>">
|
|
<label>
|
|
Ort
|
|
<input name="location" required value="<?=e($_GET['location'] ?? '')?>">
|
|
</label>
|
|
<button type="submit">
|
|
Suche
|
|
</button>
|
|
</form>
|
|
</body>
|
|
</html>
|