change panel colors
This commit is contained in:
parent
57751f78fc
commit
bb1ff96462
2 changed files with 25 additions and 13 deletions
|
|
@ -16,7 +16,9 @@ body,
|
|||
|
||||
:root {
|
||||
--color-salmon: #ff4f4b;
|
||||
--color-yellow: #faff82;
|
||||
--color-yellow: #d6ff00;
|
||||
--color-brown: #d6cfbe;
|
||||
--color-grey: #c4c9cc;
|
||||
}
|
||||
|
||||
.k-panel-menu {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,24 @@ function sortByMonth($sessions) {
|
|||
return $orderedSessions;
|
||||
}
|
||||
|
||||
function createArraySession($event, $session) {
|
||||
$isMapadoEvent = $event->isMapadoEvent() == 'true';
|
||||
$arraySession = $session->toArray();
|
||||
|
||||
$arraySession['title'] = $event->title()->value();
|
||||
$arraySession['authors'] = $event->authors();
|
||||
$arraySession['place'] = $event->place();
|
||||
$arraySession['public'] = $event->public();
|
||||
$arraySession['event-url'] = $event->url();
|
||||
$arraySession['duration'] = $isMapadoEvent ? $event->remoteDuration() : $event->duration();
|
||||
$arraySession['ticketingUrl'] = $isMapadoEvent ? $session->ticketingUrl() : false;
|
||||
$arraySession['bookableStock'] = $isMapadoEvent ? $session->bookableStock()->value() : 'free';
|
||||
$arraySession['color'] = $event->color();
|
||||
|
||||
return $arraySession;
|
||||
|
||||
}
|
||||
|
||||
return function($page) {
|
||||
$currentSeason = $page->children()->first();
|
||||
$today = date('Ymd');
|
||||
|
|
@ -33,6 +51,7 @@ return function($page) {
|
|||
$nextEvents = new Pages();
|
||||
|
||||
$currentSeasonSessions = [];
|
||||
$previousSeasons = $page->children()->without($currentSeason);
|
||||
|
||||
foreach ($currentSeason->children() as $event) {
|
||||
$sessions = $event->isMapadoEvent() == 'true' ? $event->remoteSessions() : $event->sessions();
|
||||
|
|
@ -40,18 +59,8 @@ return function($page) {
|
|||
$isStillShowing = false;
|
||||
|
||||
foreach ($sessions->toStructure() as $session) {
|
||||
$arraySession = $session->toArray();
|
||||
$arraySession['title'] = $event->title()->value();
|
||||
$arraySession['authors'] = $event->authors();
|
||||
$arraySession['place'] = $event->place();
|
||||
$arraySession['public'] = $event->public();
|
||||
$arraySession['event-url'] = $event->url();
|
||||
$arraySession['duration'] = $event->isMapadoEvent() == 'true' ? $event->remoteDuration() : $event->duration();
|
||||
$arraySession['ticketingUrl'] = $event->isMapadoEvent() == 'true' ? $session->ticketingUrl() : false;
|
||||
$arraySession['bookableStock'] = $event->isMapadoEvent() == 'true' ? $session->bookableStock()->value() : 'free';
|
||||
$arraySession['color'] = $event->color();
|
||||
$arraySession = createArraySession($event, $session);
|
||||
$currentSeasonSessions[] = $arraySession;
|
||||
|
||||
$sessionDate = str_replace('-', '', $session->date()->toDate('YMMdd'));
|
||||
|
||||
if ($sessionDate >= $today) {
|
||||
|
|
@ -69,6 +78,7 @@ return function($page) {
|
|||
return [
|
||||
'previousEvents' => $previousEvents,
|
||||
'nextEvents' => $nextEvents,
|
||||
'currentSeasonSessions' => sortByMonth($currentSeasonSessions)
|
||||
'currentSeasonSessions' => sortByMonth($currentSeasonSessions),
|
||||
'previousSeasons' => $previousSeasons,
|
||||
];
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue