2016-08-26 23:16:51 +02:00
|
|
|
<?php
|
|
|
|
date_default_timezone_set('Europe/Oslo');
|
|
|
|
setlocale(LC_ALL, 'no_NO');
|
|
|
|
require __DIR__ . '/../../src/_autoload.php';
|
|
|
|
$agenda = new \pvv\side\Agenda([
|
|
|
|
new \pvv\side\social\NerdepitsaActivity,
|
|
|
|
new \pvv\side\social\AnimekveldActivity,
|
|
|
|
new \pvv\side\social\BrettspillActivity,
|
2016-08-26 23:56:06 +02:00
|
|
|
]);
|
2016-08-26 23:16:51 +02:00
|
|
|
?><!DOCTYPE html>
|
|
|
|
<html lang="no">
|
|
|
|
<title>Sosialverkstedet</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">
|
|
|
|
|
|
|
|
<header>Sosial­verk­stedet</header>
|
|
|
|
|
|
|
|
<main>
|
|
|
|
|
2016-08-26 23:30:32 +02:00
|
|
|
<?php $limit = 0; ?>
|
2016-08-26 23:16:51 +02:00
|
|
|
<?php foreach($agenda->getNextOfEach(new \DateTimeImmutable) as $event) { ?>
|
|
|
|
|
|
|
|
<article>
|
2016-08-26 23:30:32 +02:00
|
|
|
<h2>
|
|
|
|
<?php if ($event->getImageURL()) { ?>
|
|
|
|
<img src="<?= $event->getImageURL() ?>">
|
|
|
|
<?php } ?>
|
2016-08-27 00:14:12 +02:00
|
|
|
<?php if (\pvv\side\Agenda::isToday($event->getStart())) { ?><strong><?php } ?>
|
2016-08-26 23:30:32 +02:00
|
|
|
<em><?= $event->getRelativeDate() ?></em>
|
2016-08-27 00:14:12 +02:00
|
|
|
<?php if (\pvv\side\Agenda::isToday($event->getStart())) { ?></strong><?php } ?>
|
2016-08-26 23:30:32 +02:00
|
|
|
<a href="<?= $event->getURL() ?>"><?= $event->getName() ?></a>
|
|
|
|
</h2>
|
2016-08-26 23:16:51 +02:00
|
|
|
<ul class="subtext">
|
|
|
|
<li>Tid: <strong><?= trim(strftime('%e. %b %H.%M', $event->getStart()->getTimeStamp())) ?></strong>
|
|
|
|
<li>Sted: <strong><?= $event->getLocation() ?></strong>
|
|
|
|
<li>Arrangør: <strong><?= $event->getOrganiser() ?></strong>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<?php $description = $event->getDescription(); ?>
|
2016-08-26 23:30:32 +02:00
|
|
|
<?php if ($limit) array_splice($description, $limit); ?>
|
2016-08-29 18:24:21 +02:00
|
|
|
<?= implode($description, "</p>\n<p>") ?>
|
2016-08-26 23:16:51 +02:00
|
|
|
</article>
|
|
|
|
|
2016-08-26 23:30:32 +02:00
|
|
|
<?php if (!$limit || $limit > 4) {$limit = 4;} else $limit = 2; ?>
|
2016-08-26 23:16:51 +02:00
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
</main>
|
2016-08-29 19:37:49 +02:00
|
|
|
|
|
|
|
<nav><ul>
|
|
|
|
<li><a href="../">hjem</a></li>
|
|
|
|
<li><a href="../kurs/">kurs</a></li>
|
2016-08-30 18:13:31 +02:00
|
|
|
<li><a href="../aktiviteter/">aktiviteter</a></li>
|
2016-08-29 19:37:49 +02:00
|
|
|
<li class="active"><a href="../sosiale/">sosiale</a></li>
|
2016-08-30 18:13:31 +02:00
|
|
|
<li><a href="../pvv/">wiki</a></li>
|
2016-08-29 19:37:49 +02:00
|
|
|
</nav>
|