fix info-banner
This commit is contained in:
parent
1c8e47d810
commit
646c5ab65f
4 changed files with 39 additions and 49 deletions
|
|
@ -11,12 +11,12 @@
|
|||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
border-bottom: var(--border);
|
||||
background-color: var(--color-mint);
|
||||
}
|
||||
|
||||
.info-banner ul {
|
||||
box-sizing: border-box;
|
||||
padding: 1rem var(--space-m);
|
||||
background-color: var(--color-mint);
|
||||
display: inline-block;
|
||||
animation: scroll-left 12s linear infinite;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ 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();
|
||||
|
|
@ -78,7 +77,6 @@ return function($page) {
|
|||
return [
|
||||
'previousEvents' => $previousEvents,
|
||||
'nextEvents' => $nextEvents,
|
||||
'currentSeasonSessions' => sortByMonth($currentSeasonSessions),
|
||||
'previousSeasons' => $previousSeasons,
|
||||
'currentSeasonSessions' => sortByMonth($currentSeasonSessions)
|
||||
];
|
||||
};
|
||||
|
|
@ -1,43 +1,41 @@
|
|||
<div class="info-banner">
|
||||
<ul>
|
||||
<?php foreach($site->infoBanner()->toStructure() as $info): ?>
|
||||
<li>
|
||||
<?php if ($info->link()->isNotEmpty()): ?>
|
||||
<a href="<?= $info->link()->toUrl() ?>">
|
||||
<?= $info->message() ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<p>
|
||||
<?= $info->message() ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php foreach($site->infoBanner()->toStructure() as $info): ?>
|
||||
<li>
|
||||
<?php if ($info->link()->isNotEmpty()): ?>
|
||||
<a href="<?= $info->link()->toUrl() ?>">
|
||||
<?= $info->message() ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<p>
|
||||
<?= $info->message() ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php foreach($site->infoBanner()->toStructure() as $info): ?>
|
||||
<li>
|
||||
<?php if ($info->link()->isNotEmpty()): ?>
|
||||
<a href="<?= $info->link()->toUrl() ?>">
|
||||
<?= $info->message() ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<p>
|
||||
<?= $info->message() ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php
|
||||
$repeat = 3;
|
||||
$infosCount = (int) $site->infoBanner()->toStructure()->count();
|
||||
|
||||
switch ($infosCount) {
|
||||
case 1:
|
||||
$repeat = 6;
|
||||
break;
|
||||
case 2:
|
||||
$repeat = 4;
|
||||
break;
|
||||
case 3:
|
||||
$repeat = 3;
|
||||
break;
|
||||
case 4:
|
||||
$repeat = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
for ($i=0; $i < $repeat; $i++):
|
||||
?>
|
||||
<?php foreach($site->infoBanner()->toStructure() as $info): ?>
|
||||
<li>
|
||||
<?php if ($info->link()->isNotEmpty()): ?>
|
||||
<a href="<?= $info->link()->toUrl() ?>">
|
||||
<?= $info->message() ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<p>
|
||||
<?= $info->message() ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
<?php endfor ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -62,12 +62,6 @@
|
|||
:class="tab === filterTitle ? 'strong' : ''"
|
||||
@click="if (tab === filterTitle) { tab = 'Programme' } else { tab = filterTitle; filter = title }"
|
||||
></button>
|
||||
<button
|
||||
x-data="{title: 'Saisons précédentes'}"
|
||||
x-text="title"
|
||||
:class="tab === title ? 'strong' : ''"
|
||||
@click="if (tab === title) { tab = 'Programme' } else { tab = title }"
|
||||
></button>
|
||||
</section>
|
||||
<section class="page-title">
|
||||
<h1 x-text="tab"></h1>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue