From 550161bba28b9e01b60175146446850fe809e796 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 20 Feb 2018 19:36:06 +0100 Subject: [PATCH] Add colors to each event in hendelse --- src/pvv/side/event.php | 1 + src/pvv/side/simpleevent.php | 4 ++++ src/pvv/side/social/animekveldevent.php | 4 ++++ src/pvv/side/social/brettspillevent.php | 4 ++++ src/pvv/side/social/nerdepitsaevent.php | 4 ++++ www/hendelser/index.php | 8 ++++---- 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/pvv/side/event.php b/src/pvv/side/event.php index c7b635a..05f7c5f 100644 --- a/src/pvv/side/event.php +++ b/src/pvv/side/event.php @@ -49,4 +49,5 @@ abstract class Event { public abstract function getDescription(); /* : string */ + public abstract function getColor(); /* : string */ } diff --git a/src/pvv/side/simpleevent.php b/src/pvv/side/simpleevent.php index a38f0f8..dc151ac 100644 --- a/src/pvv/side/simpleevent.php +++ b/src/pvv/side/simpleevent.php @@ -56,4 +56,8 @@ class SimpleEvent extends Event { return $this->isDBEvent; } + public function getColor() { + return "#3b7"; + } + } diff --git a/src/pvv/side/social/animekveldevent.php b/src/pvv/side/social/animekveldevent.php index 09a9d91..01c28fc 100644 --- a/src/pvv/side/social/animekveldevent.php +++ b/src/pvv/side/social/animekveldevent.php @@ -41,4 +41,8 @@ class AnimekveldEvent extends Event { ]; } + public function getColor() { + return "#35a"; + } + } diff --git a/src/pvv/side/social/brettspillevent.php b/src/pvv/side/social/brettspillevent.php index d01d29e..41137b5 100644 --- a/src/pvv/side/social/brettspillevent.php +++ b/src/pvv/side/social/brettspillevent.php @@ -60,4 +60,8 @@ class BrettspillEvent extends Event { ]; } + public function getColor() { + return "#000"; + } + } diff --git a/src/pvv/side/social/nerdepitsaevent.php b/src/pvv/side/social/nerdepitsaevent.php index 1c3a2ad..a1566f1 100644 --- a/src/pvv/side/social/nerdepitsaevent.php +++ b/src/pvv/side/social/nerdepitsaevent.php @@ -43,4 +43,8 @@ class NerdepitsaEvent extends Event { ]; } + public function getColor() { + return "#c35"; + } + } diff --git a/www/hendelser/index.php b/www/hendelser/index.php index 9941ac3..df94dab 100644 --- a/www/hendelser/index.php +++ b/www/hendelser/index.php @@ -5,14 +5,14 @@ $translation = ['I dag', 'I morgen', 'Denne uka', 'Neste uke', 'Denne måneden', ?> -Aktivitetsverkstedet +Hendelsesverkstedet -
Aktivitets­verk­stedet
+
Hendelses­verk­stedet
@@ -24,7 +24,7 @@ foreach($agenda->getNextDays() as $period => $events) {

    -
  • +
  • getURL()) { ?> getName() ?> @@ -52,6 +52,6 @@ foreach($agenda->getNextDays() as $period => $events) {