2021-08-14 01:42:49 -07:00
|
|
|
<template>
|
2022-04-08 05:12:18 -07:00
|
|
|
<section v-if="config.calendar && config.calendar.enabled && events !== undefined" class="alert alert-light border">
|
2021-12-29 09:24:30 -08:00
|
|
|
<div class="d-flex flex-column-reverse flex-md-row justify-content-between">
|
|
|
|
<p class="h3">
|
|
|
|
<Icon v="calendar-star"/>
|
|
|
|
<T>calendar.banner</T><T>quotation.colon</T>
|
|
|
|
</p>
|
|
|
|
<p class="small">
|
|
|
|
<DateWords :day="day" inline/>
|
|
|
|
</p>
|
|
|
|
</div>
|
2021-08-14 01:42:49 -07:00
|
|
|
<ul class="list-unstyled my-3 ms-3">
|
2021-10-15 09:26:21 -07:00
|
|
|
<li v-for="event in events" class="mb-2">
|
|
|
|
<CalendarEvent :event="event" :key="event.name"/>
|
|
|
|
</li>
|
2021-08-14 01:42:49 -07:00
|
|
|
</ul>
|
|
|
|
<nuxt-link v-if="link" :to="`/${config.calendar.route}`" class="small">
|
|
|
|
<Icon v="angle-right"/>
|
|
|
|
<T>calendar.headerLong</T>
|
|
|
|
</nuxt-link>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2021-10-03 07:37:00 -07:00
|
|
|
import { calendar } from '../src/calendar/calendar';
|
2021-08-14 07:22:30 -07:00
|
|
|
import { Day } from '../src/calendar/helpers';
|
2021-08-14 01:42:49 -07:00
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
2021-10-03 07:37:00 -07:00
|
|
|
day: { 'default': () => Day.today() },
|
2021-08-14 01:42:49 -07:00
|
|
|
link: { type: Boolean },
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2021-10-03 07:37:00 -07:00
|
|
|
events: calendar.getCurrentYear().eventsByDate[this.day.toString()],
|
2021-08-14 01:42:49 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|