layout fixes, visitor counting
This commit is contained in:
parent
a55992a7f0
commit
2130199951
23
index.php
23
index.php
@ -61,6 +61,7 @@ $locale = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
if ($locale !== null){
|
||||
setlocale(LC_TIME, $locale);
|
||||
}
|
||||
$v = file_get_contents('/media/sg/dorf.jetzt_visitors');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
@ -76,21 +77,20 @@ if ($locale !== null){
|
||||
<nav class="navbar">
|
||||
<h1 class="text-center">Was geht im Dorf.jetzt?</h1><hr />
|
||||
</nav>
|
||||
<div class="card-deck mb-3 text-center">
|
||||
<div class="card" style="width: 18rem;">
|
||||
<div class="card-img-top">
|
||||
|
||||
</div>
|
||||
<div class="card mb-3 text-center">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Türstatus</h5>
|
||||
<i class="material-icons" id="state-icn" style="color:<?= $state_map[$state]->color ?>;font-size:16rem;">
|
||||
<?= $state_map[$state]->svg ?>
|
||||
</i>
|
||||
<p class="card-text"><?= $state_map[$state]->state_string ?></p>
|
||||
<a href="https://wiki.chaosdorf.de/Raumstatus" class="btn btn-block btn-lg btn-primary">What's this?</a>
|
||||
<div class="btn-wrapper">
|
||||
<a href="https://wiki.chaosdorf.de/Raumstatus" class="btn btn-lg btn-block btn-primary">What's this?</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card" style="width: 18rem;">
|
||||
<div class="card mb-3 text-center">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Events</h5>
|
||||
<h6 class="card-subtitle mb-2 text-muted">Nächste Veranstaltung</h6>
|
||||
@ -109,12 +109,10 @@ if ($locale !== null){
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="https://wiki.chaosdorf.de/Chaosdorf_Wiki:Current_events" class="btn btn-block btn-lg btn-primary">Event-Kalender</a>
|
||||
<a href="https://wiki.chaosdorf.de/Chaosdorf_Wiki:Current_events" class="btn btn-lg btn-block btn-primary">Event-Kalender</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="page-footer font-small text-center">
|
||||
<div>
|
||||
Look at the code <a href="https://git.iwonder.name/iwonder/dorf.jetzt">here</a>
|
||||
@ -122,9 +120,14 @@ Look at the code <a href="https://git.iwonder.name/iwonder/dorf.jetzt">here</a>
|
||||
<div>
|
||||
Report issues to <a href="mailto:help@dorf.jetzt">help@dorf.jetzt</a>
|
||||
</div>
|
||||
<div>You are visitor #<?= $v ?>
|
||||
</footer>
|
||||
<script src="assets/js/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||
<script src="assets/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
if(!$v) $v=0;
|
||||
$v++;
|
||||
file_put_contents('/media/sg/dorf.jetzt_visitors', $v);
|
||||
|
Loading…
Reference in New Issue
Block a user