layout fixes, visitor counting
This commit is contained in:
parent
a55992a7f0
commit
2130199951
65
index.php
65
index.php
@ -61,6 +61,7 @@ $locale = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
|||||||
if ($locale !== null){
|
if ($locale !== null){
|
||||||
setlocale(LC_TIME, $locale);
|
setlocale(LC_TIME, $locale);
|
||||||
}
|
}
|
||||||
|
$v = file_get_contents('/media/sg/dorf.jetzt_visitors');
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
@ -76,21 +77,20 @@ if ($locale !== null){
|
|||||||
<nav class="navbar">
|
<nav class="navbar">
|
||||||
<h1 class="text-center">Was geht im Dorf.jetzt?</h1><hr />
|
<h1 class="text-center">Was geht im Dorf.jetzt?</h1><hr />
|
||||||
</nav>
|
</nav>
|
||||||
<div class="card-deck mb-3 text-center">
|
<div class="card mb-3 text-center">
|
||||||
<div class="card" style="width: 18rem;">
|
|
||||||
<div class="card-img-top">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Türstatus</h5>
|
<h5 class="card-title">Türstatus</h5>
|
||||||
<i class="material-icons" id="state-icn" style="color:<?= $state_map[$state]->color ?>;font-size:16rem;">
|
<i class="material-icons" id="state-icn" style="color:<?= $state_map[$state]->color ?>;font-size:16rem;">
|
||||||
<?= $state_map[$state]->svg ?>
|
<?= $state_map[$state]->svg ?>
|
||||||
</i>
|
</i>
|
||||||
<p class="card-text"><?= $state_map[$state]->state_string ?></p>
|
<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>
|
</div>
|
||||||
<div class="card" style="width: 18rem;">
|
<div class="card mb-3 text-center">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Events</h5>
|
<h5 class="card-title">Events</h5>
|
||||||
<h6 class="card-subtitle mb-2 text-muted">Nächste Veranstaltung</h6>
|
<h6 class="card-subtitle mb-2 text-muted">Nächste Veranstaltung</h6>
|
||||||
@ -100,31 +100,34 @@ if ($locale !== null){
|
|||||||
</p>
|
</p>
|
||||||
<h5 class="card-title">Danach:</h5>
|
<h5 class="card-title">Danach:</h5>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($events as $event) : ?>
|
<?php foreach ($events as $event) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?= $ical->iCalDateToDateTime($event->dtstart_array[3])->format('Y-m-d H:i') ?></th>
|
<th scope="row"><?= $ical->iCalDateToDateTime($event->dtstart_array[3])->format('Y-m-d H:i') ?></th>
|
||||||
<td><?= htmlspecialchars($event->summary) ?></td>
|
<td><?= htmlspecialchars($event->summary) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
<footer class="page-footer font-small text-center">
|
Report issues to <a href="mailto:help@dorf.jetzt">help@dorf.jetzt</a>
|
||||||
<div>
|
</div>
|
||||||
Look at the code <a href="https://git.iwonder.name/iwonder/dorf.jetzt">here</a>
|
<div>You are visitor #<?= $v ?>
|
||||||
</div>
|
</footer>
|
||||||
<div>
|
<script src="assets/js/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
|
||||||
Report issues to <a href="mailto:help@dorf.jetzt">help@dorf.jetzt</a>
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||||
</div>
|
<script src="assets/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
|
||||||
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
<?php
|
||||||
|
if(!$v) $v=0;
|
||||||
|
$v++;
|
||||||
|
file_put_contents('/media/sg/dorf.jetzt_visitors', $v);
|
||||||
|
Loading…
Reference in New Issue
Block a user