diff --git a/assets/css/src/calendar-strip.css b/assets/css/src/calendar-strip.css index 941bdf8..367f4c3 100644 --- a/assets/css/src/calendar-strip.css +++ b/assets/css/src/calendar-strip.css @@ -22,6 +22,10 @@ width: 100%; } +.calendar-strip__change-week { + display: none; +} + .calendar-strip__days .week, .calendar-strip__days .week > ul { display: contents; @@ -99,7 +103,15 @@ } .calendar-strip__selector { - width: 7rem; + width: 6rem; + } + .calendar-strip__selector span { + margin: auto; + } + + .calendar-strip__change-week { + font-size: 1.5rem; + display: block; } .calendar-strip__calendar-btn { diff --git a/site/snippets/calendar-strip.php b/site/snippets/calendar-strip.php index 675522e..87bf99e 100644 --- a/site/snippets/calendar-strip.php +++ b/site/snippets/calendar-strip.php @@ -79,6 +79,24 @@ } }, + prevWeek() { + if (this.currentWeekIndex === 0) { + this.prevMonth() + this.currentWeekIndex = this.currentWeeks.length - 1 + } else { + this.currentWeekIndex-- + } + }, + + nextWeek() { + if (this.currentWeekIndex === this.currentWeeks.length - 1) { + this.nextMonth() + this.currentWeekIndex = 0 + } else { + this.currentWeekIndex++ + } + }, + nextMonth() { if (this.currentMonthIndex == 12) { this.currentMonthIndex = 1 @@ -103,6 +121,8 @@ + + + + calendrier diff --git a/site/snippets/callout.php b/site/snippets/callout.php index 838715c..346fd8d 100644 --- a/site/snippets/callout.php +++ b/site/snippets/callout.php @@ -1,4 +1,4 @@ -
-

+
+

calloutText()->inline() ?>

Billetterie
\ No newline at end of file diff --git a/site/templates/event.php b/site/templates/event.php index 5ea0445..99a784d 100644 --- a/site/templates/event.php +++ b/site/templates/event.php @@ -153,4 +153,7 @@
'Pour aller plus loin', 'events' => $page->linkedPages()->toPages()]) ?> + + + \ No newline at end of file diff --git a/site/templates/home.php b/site/templates/home.php index 0777375..9b2fc2b 100644 --- a/site/templates/home.php +++ b/site/templates/home.php @@ -32,6 +32,6 @@ 'Prochainement', 'events' => $orderedEvents->slice(2, 3)]) ?> - $site->calloutText()->inline(), 'color' => $site->calloutColor()]) ?> + \ No newline at end of file