This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2021-08-14 01:42:49 -07:00
|
|
|
<template>
|
|
|
|
<section v-if="config.calendar && config.calendar.enabled && events !== undefined" class="alert alert-info">
|
|
|
|
<p class="h3">
|
|
|
|
<Icon v="calendar-star"/>
|
|
|
|
<T>calendar.banner</T>:
|
|
|
|
</p>
|
|
|
|
<ul class="list-unstyled my-3 ms-3">
|
2021-08-17 10:50:49 -07:00
|
|
|
<li v-for="event in events" class="mb-2">
|
2021-08-14 01:42:49 -07:00
|
|
|
<Flag v-if="event.flag" name="" alt="" :img="`/flags/${event.flag}.png`"/>
|
|
|
|
<Icon v-else v="arrow-circle-right"/>
|
2021-08-17 10:50:49 -07:00
|
|
|
<T v-if="$te(`calendar.events.${event.name}`)"></T>
|
|
|
|
<LinkedText v-else :text="event.name"/>
|
2021-08-14 01:42:49 -07:00
|
|
|
</li>
|
|
|
|
</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-08-14 07:22:30 -07:00
|
|
|
import { currentYear } from '../src/calendar/calendar';
|
|
|
|
import { Day } from '../src/calendar/helpers';
|
2021-08-14 01:42:49 -07:00
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
link: { type: Boolean },
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
events: currentYear.eventsByDate[Day.today().toString()],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|