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-02-24 17:56:42 +01:00
|
|
|
<head>
|
|
|
|
<title>Hendelsesverkstedet</title>
|
|
|
|
<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="stylesheet" href="../css/normalize.css">
|
|
|
|
<link rel="stylesheet" href="../css/style.css">
|
|
|
|
<link rel="stylesheet" href="../css/events.css">
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<main>
|
|
|
|
<h2>Hendelser</h2>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
$description_paragraphs = 1; //description length
|
|
|
|
foreach($agenda->getNextDays() as $period => $events) {
|
|
|
|
if ($events) { ?>
|
|
|
|
<h2><?= $translation[$period] ?></h2>
|
|
|
|
<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); ?>
|
|
|
|
<p><?= implode($description, "<br>") ?></p>
|
|
|
|
|
|
|
|
<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-02-24 17:56:42 +01:00
|
|
|
</main>
|
|
|
|
</body>
|
2018-02-20 18:57:38 +01:00
|
|
|
|
|
|
|
<nav>
|
2018-02-20 19:36:06 +01:00
|
|
|
<?= navbar(1, 'hendelser'); ?>
|
2018-02-20 18:57:38 +01:00
|
|
|
<?= loginbar($sp, $pdo); ?>
|
|
|
|
</nav>
|