Add colors to each event in hendelse
This commit is contained in:
parent
f6174706f8
commit
550161bba2
|
@ -49,4 +49,5 @@ abstract class Event {
|
|||
|
||||
public abstract function getDescription(); /* : string */
|
||||
|
||||
public abstract function getColor(); /* : string */
|
||||
}
|
||||
|
|
|
@ -56,4 +56,8 @@ class SimpleEvent extends Event {
|
|||
return $this->isDBEvent;
|
||||
}
|
||||
|
||||
public function getColor() {
|
||||
return "#3b7";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -41,4 +41,8 @@ class AnimekveldEvent extends Event {
|
|||
];
|
||||
}
|
||||
|
||||
public function getColor() {
|
||||
return "#35a";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -60,4 +60,8 @@ class BrettspillEvent extends Event {
|
|||
];
|
||||
}
|
||||
|
||||
public function getColor() {
|
||||
return "#000";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -43,4 +43,8 @@ class NerdepitsaEvent extends Event {
|
|||
];
|
||||
}
|
||||
|
||||
public function getColor() {
|
||||
return "#c35";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,14 +5,14 @@ $translation = ['I dag', 'I morgen', 'Denne uka', 'Neste uke', 'Denne måneden',
|
|||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<title>Aktivitetsverkstedet</title>
|
||||
<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">
|
||||
|
||||
<header>Aktivitets­verk­stedet</header>
|
||||
<header>Hendelses­verk­stedet</header>
|
||||
|
||||
<main>
|
||||
<article>
|
||||
|
@ -24,7 +24,7 @@ foreach($agenda->getNextDays() as $period => $events) {
|
|||
<h2><?= $translation[$period] ?></h2>
|
||||
<ul class="events">
|
||||
<?php foreach($events as $event) {?>
|
||||
<li>
|
||||
<li style="border-color: <?= $event->getColor() ?>">
|
||||
<h4><strong>
|
||||
<?php if ($event->getURL()) { ?>
|
||||
<a href="<?= $event->getURL() ?>"><?= $event->getName() ?></a>
|
||||
|
@ -52,6 +52,6 @@ foreach($agenda->getNextDays() as $period => $events) {
|
|||
</main>
|
||||
|
||||
<nav>
|
||||
<?= navbar(1, 'aktiviteter'); ?>
|
||||
<?= navbar(1, 'hendelser'); ?>
|
||||
<?= loginbar($sp, $pdo); ?>
|
||||
</nav>
|
||||
|
|
Loading…
Reference in New Issue