Compare commits

..

16 Commits

Author SHA1 Message Date
4e861ed5de accessibility 2023-10-01 18:46:55 +02:00
85550596e1 change unknown status glyph 2023-08-18 11:11:23 +02:00
44924cf4ca Catch errors in calendar fetching 2023-06-06 15:56:18 +02:00
0adc7964e0 Switch to cccd.ics 2023-06-06 15:54:42 +02:00
iwonder
381c6bc06e Patch anwenden 2023-01-26 14:42:32 +01:00
759d05d47c start using objects 2023-01-26 13:52:00 +01:00
2145491138 move some stuff around 2023-01-23 12:41:45 +01:00
0bc2c726f5 migrate to Twig 2023-01-20 18:54:40 +01:00
302d41d09d Updates!! 2022-12-17 00:10:35 +01:00
d170a95469 Wiedereröffnung 2021-10-25 21:43:59 +02:00
52964779e6 Update dependencies 2021-08-01 20:20:54 +02:00
iwonder
130b0f51a2 Ignore HetrixTools monitoring 2021-08-01 20:15:52 +02:00
iwonder
483cf992f7 Change visitors file placement 2021-08-01 20:13:52 +02:00
iwonder
da60e76847 fix event links 2021-07-31 00:31:27 +02:00
Christopher Teutsch
48bb2760dd Cache assets/ on Apache2 2020-12-27 19:08:43 +01:00
Christopher Teutsch
9478c7cecd Visitor counting with bot exclusion 2020-12-27 19:08:21 +01:00
9 changed files with 3182 additions and 397 deletions

20
app/State.php Normal file
View File

@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
namespace DorfJetzt;
class State
{
public string $description;
public string $svg_name;
public string $color;
public function __construct(string $description, string $svg_name, string $color)
{
$this->description = $description;
$this->svg_name = $svg_name;
$this->color = $color;
}
}

3
assets/.htaccess Normal file
View File

@ -0,0 +1,3 @@
<IfModule mod_expires.c>
ExpiresDefault "access plus 2 week"
</IfModule>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path d="M12,1A5,5 0 0,0 7,6V8H6A2,2 0 0,0 4,10V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V10A2,2 0 0,0 18,8H17V6A5,5 0 0,0 12,1M12,2.9C13.71,2.9 15.1,4.29 15.1,6V8H8.9V6C8.9,4.29 10.29,2.9 12,2.9M12.19,10.5C13.13,10.5 13.88,10.71 14.42,11.12C14.96,11.54 15.23,12.1 15.23,12.8C15.23,13.24 15.08,13.63 14.79,14C14.5,14.36 14.12,14.64 13.66,14.85C13.4,15 13.23,15.15 13.14,15.32C13.05,15.5 13,15.72 13,16H11C11,15.5 11.1,15.16 11.29,14.92C11.5,14.68 11.84,14.4 12.36,14.08C12.62,13.94 12.83,13.76 13,13.54C13.14,13.33 13.22,13.08 13.22,12.8C13.22,12.5 13.13,12.28 12.95,12.11C12.77,11.93 12.5,11.85 12.19,11.85C11.92,11.85 11.7,11.92 11.5,12.06C11.34,12.2 11.24,12.41 11.24,12.69H9.27C9.22,12 9.5,11.4 10.05,11.04C10.59,10.68 11.3,10.5 12.19,10.5M11,17H13V19H11V17Z" /></svg>

After

Width:  |  Height:  |  Size: 851 B

View File

@ -1,6 +1,21 @@
{ {
"autoload": {
"psr-4": {
"DorfJetzt\\": "app/"
}
},
"require": { "require": {
"johngrogg/ics-parser": "^2.1.17", "johngrogg/ics-parser": "^3",
"twbs/bootstrap": "4.3.1" "symfony/http-client": "^6.2",
"symfony/http-kernel": "^6.2",
"twig/twig": "^3.5",
"twig/intl-extra": "^3.5"
},
"require-dev": {
"vimeo/psalm": "^5.4"
},
"config": {
"apcu-autoloader": true,
"classmap-authoritative": true
} }
} }

2984
composer.lock generated

File diff suppressed because it is too large Load Diff

445
index.php
View File

@ -1,257 +1,204 @@
<?php <?php
require_once 'vendor/autoload.php';
declare(strict_types=1);
require __DIR__ . '/vendor/autoload.php';
use ICal\ICal; use ICal\ICal;
static $DATE_FORMAT = 'd.m.Y H:i'; use Symfony\Component\HttpClient\CachingHttpClient;
static $VISITORS_FILE = 'C:\\Users\\Christopher Teutsch\\dorf_visitors.txt'; use Symfony\Component\HttpClient\HttpClient;
static $DORF_IN_LOCKDOWN = false; use Symfony\Component\HttpKernel\HttpCache\Store;
static $DORF_VIRTUAL_EVENTS = true; use Twig\TwigFilter;
static $ICAL_URL = 'https://chaosdorf.de/~derf/cccd_all.ics'; use Twig\NodeVisitor\OptimizerNodeVisitor;
static $ICAL_STALE_SECONDS = 60 * 15; use DorfJetzt\State;
static $ICAL_CACHE_FILE = 'C:\\Users\\Christopher Teutsch\\cccd_all.ics';
//static $STATE_FILE = '/media/sg/dorf.jetzt_state'; #region Configuration
static $STATE_FILE = 'C:\\Users\\Christopher Teutsch\\dorf_state.txt'; const VISITORS_FILE = '/opt/dorf.jetzt_visitors';
static $STATE_STALE_SECONDS = 60; const ICAL_URL = 'https://chaosdorf.de/~derf/cccd.ics';
if ($DORF_VIRTUAL_EVENTS || ! $DORF_IN_LOCKDOWN){ const HTTP_CACHE = '/tmp/dorf.jetzt/http_cache';
$ical = new ICal(false, array( const TMPL_CACHE = '/tmp/dorf.jetzt/twig_cache';
'defaultSpan' => 2, const ROOM_STATE_URL = 'https://chaosdorf.de/raumstatus/status.png';
'defaultTimeZone' => 'Europe/Berlin', const DEFAULT_TZ = 'Europe/Berlin';
'defaultWeekStart' => 'MO', #endregion
'filterDaysBefore' => '1',
));
if (is_file($ICAL_CACHE_FILE)){ const INVALID_UAS = [
error_log('is file'); "AhrefsBot",
$mtime = filemtime($ICAL_CACHE_FILE); "Googlebot",
$time_diff = time() - $mtime; "Yahoo",
error_log(sprintf('%d',$time_diff)); "Go-http-client/",
if ($time_diff >= $ICAL_STALE_SECONDS){ "bingbot",
$data = file_get_contents($ICAL_URL); "CheckMarkNetwork",
file_put_contents($ICAL_CACHE_FILE); "SemrushBot",
$ical->initString($data); "BingPreview",
} "facebookexternalhit",
else { "hetrix.tools",
$ical->initFile() ];
}
// Else get state from network every time (inefficient!) const HASH_TO_STATE = [
} else { 'bff0167ed8aba031c49122ef4046cf1b' => 'closed',
$state = get_state('https://chaosdorf.de/raumstatus/status.png'); 'd8ec899c69283bc775952a767db9d5f5' => 'maybe_open',
} '2c2672c641425e5b2acd6ee74f39ae60' => 'open',
if () '66aece8ae27ffd3a656d42005fa3efbd' => 'private',
$ical->initUrl($ICAL_URL, $acceptLanguage = 'de'); '86c75c0ad413b06ff8291673162d0b64' => 'unknown',
$events = $ical->eventsFromInterval('2 week'); '0' => 'error',
$first_event = $events[0]; ];
$events = array_slice($events, 1);
} function stateMap(string $state): State
/**
* @param $url
* @return int
*/
function get_state($url): int
{ {
$hash = hash('crc32b', file_get_contents($url)); return match ($state) {
switch($hash){ 'closed' => new State(
case '1ac9394d': 'Das Dorf ist gerade <em>geschlossen</em>.',
return State::STATE_UNKNOWN; 'lock',
case 'bf48d8e5': 'red',
return State::STATE_OPEN; ),
case 'beab4306': 'maybe_open' => new State(
return State::STATE_MAYBE_OPEN; 'Das Dorf ist gerade <em>vielleicht geöffnet</em>: </p><p>Der Clubraum ist offen, aber es findet keine Veranstaltung statt.</p><p>
case '4e7e398a': Der Status kann sich also kurzfristig ändern.',
return State::STATE_CLOSED; 'done',
case '5503654a': 'brown',
return State::STATE_PRIVATE; ),
default: 'open' => new State(
error_log('Default state called in get_state(): hash '. $hash); 'Das Dorf ist gerade <em>geöffnet</em>.</p><p>
return State::STATE_ERROR; Komm gerne vorbei.',
} 'done',
} 'green',
abstract class State{ // php doesn't have enums ),
const STATE_CLOSED = 0; 'private' => new State(
const STATE_OPEN = 1; 'Das Dorf ist gerade <em>privat</em>: </p><p>Es sind Leute da, aber der Clubraum ist nicht geöffnet.</p><p>
const STATE_MAYBE_OPEN = 2; Komm gerne vorbei (aber frag lieber vorher, wie lange noch Leute da sind).',
const STATE_PRIVATE = 3; 'lock',
const STATE_UNKNOWN = 4; 'fdd835',
const STATE_ERROR = -1; ),
} 'unknown' => new State(
class FormattingInfo{ 'Der Status vom Dorf ist gerade <em>unbekannt</em>',
function __construct($state) 'lock-question',
{ 'orange',
switch($state){ ),
case State::STATE_CLOSED: 'error' => new State(
$this->color = 'red'; 'Der Server konnte den Status vom Dorf nicht abrufen.',
$this->svg = 'lock'; 'error',
$this->state_string = 'Das Dorf ist gerade <em>geschlossen</em>.'; 'blue',
$this->img_alt = 'geschlossen'; ),
break; };
case State::STATE_MAYBE_OPEN:
$this->color = 'brown';
$this->svg = 'done';
$this->state_string = 'Das Dorf ist gerade <em>vielleicht geöffnet</em>: </p><p>Der Clubraum ist offen, aber es findet keine Veranstaltung statt.</p><p>
Der Status kann sich also kurzfristig ändern.';
$this->img_alt = 'vielleicht geöffnet';
break;
case State::STATE_OPEN:
$this->color = 'green';
$this->svg = 'done';
$this->state_string = 'Das Dorf ist gerade <em>geöffnet</em>.</p><p>
Komm gerne vorbei.';
$this->img_alt = 'geöffnet';
break;
case State::STATE_PRIVATE:
$this->color = 'fdd835';
$this->svg = 'lock';
$this->state_string = 'Das Dorf ist gerade <em>privat</em>: </p><p>Es sind Leute da, aber der Clubraum ist nicht geöffnet.</p><p>
Komm gerne vorbei (aber frag lieber vorher, wie lange noch Leute da sind).';
$this->img_alt = 'privat';
break;
case State::STATE_UNKNOWN:
$this->color = 'orange';
$this->svg = 'warning';
$this->state_string = 'Der Status vom Dorf ist gerade <em>unbekannt</em>';
$this->img_alt = 'unbekannt';
case State::STATE_ERROR:
$this->color = 'blue';
$this->svg = 'error';
$this->state_string = 'Der Server konnte den Status vom Dorf nicht ermitteln. Sorry.';
$this->img_alt = 'konnte nicht abgerufen werden';
break;
}
}
public $svg;
public $img_alt;
public $state_string;
public $color;
}
if (! $DORF_IN_LOCKDOWN){
// Try to acquire state locally, but *only* if STATE_FILE exists
if (is_file($STATE_FILE)){
error_log('is file');
$mtime = filemtime($STATE_FILE);
$time_diff = time() - $mtime;
error_log(sprintf('%d',$time_diff));
if ($time_diff >= $STATE_STALE_SECONDS){
$state = get_state('https://chaosdorf.de/raumstatus/status.png');
$result = file_put_contents($STATE_FILE, sprintf('%d',$state));
}
else {
$state = sscanf(file_get_contents($STATE_FILE),'%d')[0];
}
// Else get state from network every time (inefficient!)
} else {
$state = get_state('https://chaosdorf.de/raumstatus/status.png');
}
$fmt = new FormattingInfo($state);
} }
function format_event($event): string{ function hasValidUa(): bool
global $DATE_FORMAT, $ical; {
$startdate_loop = $ical->iCalDateToDateTime($event->dtstart_array[3]); if (isset($_SERVER['HTTP_USER_AGENT'])) {
$startdate_str = $startdate_loop->format($DATE_FORMAT); if (in_array(true, array_map(fn ($ua) => str_contains($_SERVER['HTTP_USER_AGENT'], $ua), INVALID_UAS))) {
$interval_loop = new DateInterval($event->duration); return false;
if ($interval_loop->d != 0 || $interval_loop->h >= 24){ }
$enddate_str = $startdate_loop->add($interval_loop)->format($DATE_FORMAT); return true;
}else{
$enddate_str = $startdate_loop->add($interval_loop)->format('H:i');
} }
return $startdate_str . ' &ndash; ' . $enddate_str; return false;
} }
$v = file_get_contents($VISITORS_FILE);
?>
<!DOCTYPE html>
<html lang="de">
<head>
<title>Was geht im Dorf.jetzt?</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<link rel="stylesheet" href="assets/css/bootstrap.min.css" crossorigin="anonymous">
<meta charset="UTF-8" />
</head>
<body>
<div class="container">
<nav class="navbar">
<h1 class="text-center">Was geht im Dorf.jetzt?</h1><hr />
</nav>
<?php if($DORF_IN_LOCKDOWN): ?>
<div class="card mb-3 text-center">
<div class="card-body">
<h2 class="card-title">Das Chaosdorf ist geschlossen</h2>
<img src="assets/svg/ic_lock_48px.svg" style="filter:url(assets/css/filter.svg#red);height:16rem;width:auto;" />
<p class="card-text font-weight-normal">Das Chaosdorf ist aufgrund eines Beschlusses des Vereins geschlossen.</p>
<p class="card-text font-weight-normal">Das gilt <span class="font-weight-bold">bis auf Weiteres</span>.</p>
<p class="card-text font-weight-normal">Natürlich hört das Chaosdorfleben nicht auf, <span class="font-weight-bold">kommt uns gerne im <a href="https://wiki.chaosdorf.de/VirtualSpace">VirtualSpace</a> besuchen.</span></p>
</div>
</div>
<?php else: ?> function dateTimeFromEvent(ICal $ical, object $event): DateTimeImmutable
<div class="card mb-3 text-center"> {
<div class="card-body"> return DateTimeImmutable::createFromMutable($ical->iCalDateToDateTime($event->dtstart_array[3]));
<h2 class="card-title">Türstatus</h2> }
<img alt="<?= $fmt->img_alt ?>" src="assets/svg/ic_<?= $fmt->svg ?>_48px.svg" style="filter:url(assets/css/filter.svg#<?= $fmt->color ?>);height:16rem;width:auto;" />
<p class="card-text"><?= $fmt->state_string ?></p> /**
<div class="btn-wrapper"> * @return array{summary: string, url: string, start: DateTimeImmutable, end: DateTimeImmutable}[]
<a href="https://wiki.chaosdorf.de/Raumstatus" class="btn btn-lg btn-block btn-primary">What's this?</a> */
</div> function prepareEvents(ICal $ical, array $events): array
</div> {
</div> $returns = [];
<?php endif ?> foreach ($events as $index => $event) {
<?php if($DORF_VIRTUAL_EVENTS || !$DORF_IN_LOCKDOWN): ?> $start = dateTimeFromEvent($ical, $event);
<div class="card mb-3 text-center"> $end = $start->add(new DateInterval($event->duration));
<div class="card-body"> $url = strval($event->url);
<h2 class="card-title">Events</h2> $summary = strval($event->summary);
<?php if (!empty($events)) : ?> $returns[] = [
<h3 class="card-subtitle mb-2 text-muted">Nächste Veranstaltung</h3> 'summary' => $summary,
<p class="card-text"> 'url' => $url,
<h4 class="font-weight-bold"><?= htmlspecialchars($first_event->summary, ENT_QUOTES, 'UTF-8') ?></h4> 'start' => $start,
<div class="font-weight-normal"><?= format_event($first_event) ?></div> 'end' => $end,
<div class="font-weight-normal"><a href="<?= $first_event->url ?>">Details zur Veranstaltung</a></div> ];
</p> }
<h3 class="card-title">Danach:</h3> return $returns;
<table class="table"> }
<tbody>
<?php foreach ($events as $event) : ?> function getState(\Symfony\Contracts\HttpClient\HttpClientInterface $http): State
<tr> {
<th scope="row"><?=format_event($event)?></th> try {
<td><?= htmlspecialchars($event->summary) ?></td> $response = $http->request('GET', ROOM_STATE_URL);
<td><a href="<?= $first_event->url ?>">Details</a></td> $hash = md5($response->getContent());
</tr> if (!array_key_exists($hash, HASH_TO_STATE)){
<?php endforeach ?> error_log("Encountered unknown state hash $hash");
</tbody> }
</table> return stateMap(HASH_TO_STATE[$hash]);
<a href="https://wiki.chaosdorf.de/Chaosdorf_Wiki:Current_events" class="btn btn-lg btn-block btn-primary">Event-Kalender</a> } catch (\Exception $e) {
<?php else: ?> return stateMap('error');
<h4 class="card-subtitle mb-2 text-muted">Aktuell keine Veranstaltungen.</h4> }
<p class="card-text"> }
<span class="font-weight-normal">
Es stehen aktuell keine Veranstaltungen an.
</span> $store = new Store(HTTP_CACHE);
</p> $client = HttpClient::create();
<?php endif ?> $client = new CachingHttpClient($client, $store, ['default_ttl' => 60, 'allow_revalidate' => true]);
</div>
</div> $state_obj = getState($client);
<?php endif ?>
</div>
<footer class="page-footer font-small text-center">
<div> $ical = new ICal(options: [
Du bist Besucher #<?= $v ?> 'defaultSpan' => 2,
</div> 'defaultTimeZone' => DEFAULT_TZ,
<div> 'defaultWeekStart' => 'MO',
<a href="https://git.iwonder.name/iwonder/dorf.jetzt">Sieh dir den Code hier an</a> 'filterDaysBefore' => '1',
</div> ]);
<div> try {
Melde Fehler bitte an <a href="mailto:help@dorf.jetzt">help@dorf.jetzt</a> $ical->initUrl(ICAL_URL, userAgent: 'dorf.jetzt', acceptLanguage: 'de');
</div> $events = $ical->eventsFromInterval('2 week');
<div> } catch (\Exception $e){
Dies ist kein offizieller Auftritt des <a href="https://chaosdorf.de">Chaos Computer Club Düsseldorf / Chaosdorf e.V.</a>. $events = [];
</div> }
</footer> if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
<?php $locale = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
// These are actually not needed, see https://getbootstrap.com/docs/4.0/getting-started/introduction/#js setlocale(LC_TIME, $locale);
// <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> $visitors = file_get_contents(VISITORS_FILE);
// <script src="assets/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> if (is_string($visitors)) {
?> $visitors = intval($visitors);
</body> } else {
</html> $visitors = 0;
<?php }
if(!$v) $v=0;
$v++;
file_put_contents($VISITORS_FILE, $v);
$loader = new \Twig\Loader\FilesystemLoader('templates');
$twig = new \Twig\Environment($loader, [
'cache' => TMPL_CACHE,
'auto_reload' => true,
// The 'raw' optimizer sometimes eats the only 'raw' that is used
'optimizations' => OptimizerNodeVisitor::OPTIMIZE_ALL ^ OptimizerNodeVisitor::OPTIMIZE_RAW_FILTER,
]);
function formatEndDt(?DateTimeImmutable $end, ?DateTimeImmutable $start, string $timezone = 'Europe/Berlin'): string
{
if ($end == null || $start == null) return "ERROR";
$tz = new DateTimeZone($timezone);
$daySame = $end->setTimeZone($tz)->format('d.m.Y') == $start->setTimeZone($tz)->format('d.m.Y');
$endIsMidnight = $end->setTimeZone($tz)->format('H:i') == '00:00' && $start->setTimeZone($tz)->format('H:i') != '00:00';
if ($daySame || $endIsMidnight) {
return $end->format('H:i');
} else {
return $end->format('d.m.Y H:i');
}
}
$twig->addFilter(new TwigFilter('end_datetime', 'formatEndDt'));
$twig->getExtension(\Twig\Extension\CoreExtension::class)->setTimezone(DEFAULT_TZ);
echo ($twig->render("Main.twig", [
'visitors' => $visitors,
'state_svg' => $state_obj->svg_name,
'state_color' => $state_obj->color,
'state_string' => $state_obj->description,
'events' => prepareEvents($ical, $events),
]));
/* Initialising values */
if (hasValidUa()) {
$visitors++;
file_put_contents(VISITORS_FILE, strval($visitors));
}

16
psalm.xml Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<psalm
errorLevel="3"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<file name="index.php" />
<directory name="app" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>

89
templates/Main.twig Normal file
View File

@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="de">
<head>
<title>Was geht im Dorf.jetzt?</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="preload" as="style" href="assets/css/filter.svg" />
<meta charset="UTF-8" />
</head>
<body>
<div class="container">
<header>
<h1 class="text-center">Was geht im Dorf.jetzt?</h1>
</header>
<div class="card mb-3 text-center">
<div class="card-body">
<h2 class="card-title">Türstatus</h2>
<figure>
<img src="assets/svg/ic_{{ state_svg }}_48px.svg"
style="filter:url(assets/css/filter.svg#{{ state_color }});height:16rem;width:auto;" alt="" />
<figcaption>
<p class="card-text">{{ state_string | raw }}</p>
</figcaption>
</figure>
<div class="btn-wrapper">
<a href="https://wiki.chaosdorf.de/Raumstatus" class="btn btn-lg btn-block btn-primary">Was bedeutet
das?</a>
</div>
</div>
</div>
<div class="card mb-3 text-center">
<div class="card-body">
<h2 class="card-title">Events</h2>
{% if events|length > 0 %}
<h3 class="card-subtitle mb-2 text-muted">Nächste Veranstaltung</h3>
<p class="card-text">
<h4 class="font-weight-bold">{{ events[0].summary|e }}</h4>
<span class="font-weight-normal">{{ events[0].start|date('d.m.Y H:i', 'Europe/Berlin') }} &ndash; {{
events[0].end|end_datetime(events[0].start, 'Europe/Berlin') }}</span>
<span class="font-weight-normal"><a href="{{ events[0].url }}">Details zur Veranstaltung</a></span>
</p>
<h3 class="card-title">Danach:</h3>
<table class="table">
<tbody>
{% for event in events %}
{% if loop.index0 > 0 %}
<tr>
<th scope="row"> {{ event.start|date('d.m.Y H:i', 'Europe/Berlin') }} &ndash; {{
event.end|end_datetime(event.start, 'Europe/Berlin') }}</th>
<td>{{ event.summary|e }}</td>
<td><a href="{{ event.url }}">Details</a></td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
<a href="https://wiki.chaosdorf.de/Chaosdorf_Wiki:Current_events"
class="btn btn-lg btn-block btn-primary">Event-Kalender</a>
{% else %}
<h3 class="card-subtitle mb-2 text-muted">Aktuell keine Veranstaltungen.</h6>
<p class="card-text">
<span class="font-weight-normal">
Es stehen aktuell keine Veranstaltungen an.
</span>
</p>
{% endif %}
</div>
</div>
</div>
<footer class="page-footer font-small text-center">
<div>
Du bist Besucher #{{ visitors }}
</div>
<div>
<a href="https://git.iwonder.name/iwonder/dorf.jetzt">Sieh dir den Code hier an</a>
</div>
<div>
Melde Fehler bitte an <a href="mailto:help@dorf.jetzt">help@dorf.jetzt</a>
</div>
<div>
Dies ist kein offizieller Auftritt des <a href="https://chaosdorf.de">Chaos Computer Club Düsseldorf /
Chaosdorf e.V.</a>.
</div>
</footer>
</body>
</html>