2021-10-03 07:37:00 -07:00
|
|
|
<template>
|
2021-10-03 15:19:23 -07:00
|
|
|
<div v-if="year.eventsByDate[day.toString()] || basic" :class="basic ? 'py-5' : ''">
|
2021-10-03 07:56:07 -07:00
|
|
|
<CommunityNav v-if="!basic"/>
|
2021-10-03 07:37:00 -07:00
|
|
|
|
2021-10-03 07:56:07 -07:00
|
|
|
<h2 class="d-flex justify-content-between">
|
|
|
|
<span>
|
|
|
|
<Icon v="calendar-star"/>
|
2021-10-06 06:18:52 -07:00
|
|
|
<nuxt-link :to="`/${config.calendar.route}`"><T>calendar.headerLong</T></nuxt-link>
|
|
|
|
<small class="text-muted">({{day}})</small>
|
2021-10-03 07:56:07 -07:00
|
|
|
</span>
|
|
|
|
<span v-if="basic" class="h4 mt-2">
|
|
|
|
<nuxt-link :to="`/${ config.calendar.route }`">
|
|
|
|
<Icon v="tags"/>
|
|
|
|
<T>domain</T>/{{ config.calendar.route }}
|
|
|
|
</nuxt-link>
|
|
|
|
</span>
|
2021-10-03 07:37:00 -07:00
|
|
|
</h2>
|
|
|
|
|
|
|
|
<section>
|
|
|
|
<div class="d-flex justify-content-evenly flex-column-reverse flex-md-row align-items-center align-items-md-start">
|
|
|
|
<div class="calendar-month my-3">
|
|
|
|
<h3 class="text-center"><T>calendar.months.{{day.month}}</T></h3>
|
2021-10-04 14:41:25 -07:00
|
|
|
<Calendar :year="year" :month="day.month" :mark="day"/>
|
2021-10-03 07:37:00 -07:00
|
|
|
</div>
|
|
|
|
<div class="calendar-events my-3">
|
2021-12-07 05:57:01 -08:00
|
|
|
<h3>
|
|
|
|
{{$t('calendar.date', {year: day.year, date: $t('calendar.dates.' + day.month, {day: day.day})})}}
|
|
|
|
</h3>
|
2021-10-03 07:37:00 -07:00
|
|
|
<ul class="list-unstyled mb-0">
|
2021-10-15 09:26:21 -07:00
|
|
|
<li v-for="event in year.eventsByDate[day.toString()]" class="mb-2">
|
2021-10-27 12:39:56 -07:00
|
|
|
<CalendarEvent :event="event" :year="year.year" :key="event.name" ics/>
|
2021-10-15 09:26:21 -07:00
|
|
|
</li>
|
2021-10-03 07:37:00 -07:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
2021-10-03 07:56:07 -07:00
|
|
|
<template v-if="!basic">
|
|
|
|
<CalendarExtra :day="day"/>
|
2021-10-03 07:37:00 -07:00
|
|
|
|
2021-12-25 15:46:05 -08:00
|
|
|
<Separator icon="heart"/>
|
2021-10-03 07:56:07 -07:00
|
|
|
<Support/>
|
2021-10-03 07:37:00 -07:00
|
|
|
|
2021-10-03 07:56:07 -07:00
|
|
|
<section>
|
|
|
|
<Share :title="$t('calendar.header')"/>
|
|
|
|
</section>
|
|
|
|
</template>
|
2021-10-03 07:37:00 -07:00
|
|
|
</div>
|
|
|
|
<NotFound v-else/>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { head } from "../src/helpers";
|
|
|
|
import { calendar } from '../src/calendar/calendar';
|
|
|
|
import { Day } from '../src/calendar/helpers';
|
|
|
|
|
|
|
|
export default {
|
2021-10-03 07:56:07 -07:00
|
|
|
layout({route}) {
|
|
|
|
return route.query.layout === 'basic' ? 'basic' : 'default';
|
|
|
|
},
|
2021-10-03 07:37:00 -07:00
|
|
|
data() {
|
|
|
|
const day = new Day(
|
|
|
|
this.$route.params.year,
|
|
|
|
this.$route.params.month,
|
|
|
|
this.$route.params.day,
|
|
|
|
);
|
|
|
|
|
|
|
|
return {
|
|
|
|
day,
|
|
|
|
year: calendar.getYear(day.year),
|
2021-10-03 07:56:07 -07:00
|
|
|
basic: this.$route.query.layout === 'basic',
|
2021-10-03 07:37:00 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
head() {
|
|
|
|
return head({
|
|
|
|
title: this.$t('calendar.headerLong'),
|
2021-10-03 15:19:23 -07:00
|
|
|
banner: `calendar/${this.day}.png`,
|
2021-10-03 07:37:00 -07:00
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.calendar-month {
|
|
|
|
width: min(18rem, 100%);
|
|
|
|
}
|
|
|
|
.calendar-events {
|
|
|
|
width: min(20rem, 100%);
|
|
|
|
}
|
|
|
|
</style>
|