2018-02-20 18:57:38 +01:00
|
|
|
<?php namespace pvv\side;
|
|
|
|
require_once dirname(dirname(__DIR__)) . implode(DIRECTORY_SEPARATOR, ['', 'inc', 'include.php']);
|
|
|
|
|
|
|
|
$translation = ['I dag', 'I morgen', 'Denne uka', 'Neste uke', 'Denne måneden', 'Neste måned'];
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="no">
|
2018-08-14 02:09:32 +02:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
|
|
|
<link rel="shortcut icon" href="favicon.ico">
|
|
|
|
<link rel="stylesheet" href="../css/normalize.css">
|
|
|
|
<link rel="stylesheet" href="../css/style.css">
|
|
|
|
<link rel="stylesheet" href="../css/events.css">
|
2018-08-14 03:29:10 +02:00
|
|
|
<meta name="theme-color" content="#024" />
|
2018-08-14 02:09:32 +02:00
|
|
|
<title>Hendelsesverkstedet</title>
|
|
|
|
|
|
|
|
<header>Hendelses­verk­stedet</header>
|
|
|
|
|
2018-02-24 17:56:42 +01:00
|
|
|
<body>
|
2018-08-06 23:27:45 +02:00
|
|
|
<nav>
|
|
|
|
<?= navbar(1, 'hendelser'); ?>
|
|
|
|
<?= loginbar($sp, $pdo); ?>
|
|
|
|
</nav>
|
2018-02-24 17:56:42 +01:00
|
|
|
<main>
|
2018-08-14 22:55:36 +02:00
|
|
|
<h1 style="pointer-events:none; text-align: left;">Hendelser</h1>
|
|
|
|
<center>
|
2018-08-06 23:27:45 +02:00
|
|
|
<a style="padding-left: 2em; padding-right: 2em;" class="btn" style="" href="../kalender/">Kalender</a>
|
2018-08-14 22:55:36 +02:00
|
|
|
</center>
|
2018-02-24 17:56:42 +01:00
|
|
|
<?php
|
2018-08-06 23:27:45 +02:00
|
|
|
$description_paragraphs = 2; //description length
|
2018-02-24 17:56:42 +01:00
|
|
|
foreach($agenda->getNextDays() as $period => $events) {
|
|
|
|
if ($events) { ?>
|
2018-08-14 22:47:25 +02:00
|
|
|
<h2 style="text-align: left;"><?= $translation[$period] ?></h2>
|
2018-02-24 17:56:42 +01:00
|
|
|
<ul class="events">
|
|
|
|
<?php foreach($events as $event) {?>
|
|
|
|
<li style="border-color: <?= $event->getColor() ?>">
|
|
|
|
<h4><strong>
|
|
|
|
<?php if ($event->getURL()) { ?>
|
|
|
|
<a href="<?= $event->getURL() ?>"><?= $event->getName() ?></a>
|
|
|
|
<?php } else { ?>
|
|
|
|
<?= $event->getName() ?>
|
|
|
|
<?php } ?>
|
|
|
|
</strong></h4>
|
|
|
|
|
|
|
|
<?php $description = $event->getDescription(); ?>
|
|
|
|
<?php if ($description_paragraphs) array_splice($description, $description_paragraphs); ?>
|
2018-08-12 03:52:55 +02:00
|
|
|
|
|
|
|
<?php
|
|
|
|
$Parsedown = new \Parsedown();
|
|
|
|
echo $Parsedown->text(implode("\n", $description));
|
|
|
|
?>
|
2018-02-24 17:56:42 +01:00
|
|
|
|
|
|
|
<ul class="subtext">
|
|
|
|
<li>Tid: <strong><?= Agenda::getFormattedDate($event->getStart()) ?></strong></li>
|
|
|
|
<li>Sted: <strong><?= $event->getLocation() ?></strong></li>
|
|
|
|
<li>Arrangør: <strong><?= $event->getOrganiser() ?></strong></li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
2018-02-20 18:57:38 +01:00
|
|
|
<?php } ?>
|
2018-02-24 17:56:42 +01:00
|
|
|
</ul>
|
|
|
|
<?php } ?>
|
2018-02-20 18:57:38 +01:00
|
|
|
<?php } ?>
|
2018-08-06 23:27:45 +02:00
|
|
|
|
|
|
|
<div style="text-align: center; margin-bottom: 2em;">
|
|
|
|
<a style="padding-left: 2em; padding-right: 2em;" class="btn" style="" href="../kalender/">Kalender</a>
|
|
|
|
</div>
|
|
|
|
|
2018-02-24 17:56:42 +01:00
|
|
|
</main>
|
|
|
|
</body>
|