2021-10-03 07:37:00 -07:00
|
|
|
<template>
|
|
|
|
<section>
|
|
|
|
<div class="alert alert-info d-flex flex-column flex-md-row justify-content-around">
|
|
|
|
<div v-if="day">
|
|
|
|
<p class="mb-0">
|
|
|
|
<T>calendar.full</T>:
|
|
|
|
</p>
|
2021-10-06 06:18:52 -07:00
|
|
|
<nuxt-link :to="`/${config.calendar.route}/${day.year}`" class="btn btn-primary m-1">
|
2021-10-03 07:37:00 -07:00
|
|
|
<Icon v="calendar-star"/>
|
|
|
|
{{ day.year }}
|
|
|
|
</nuxt-link>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<p class="mb-0">
|
|
|
|
Twitter Bot:
|
|
|
|
</p>
|
|
|
|
<p class="mb-0">
|
|
|
|
<a href="https://twitter.com/CalendarQueer" target="_blank" rel="noopener" class="btn btn-outline-primary m-1">
|
|
|
|
<Icon v="twitter" set="b"/>
|
|
|
|
@CalendarQueer
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
2021-10-26 14:09:02 -07:00
|
|
|
<div v-if="!day">
|
|
|
|
<p class="mb-0">
|
|
|
|
iCalendar:
|
|
|
|
</p>
|
2021-10-27 12:00:45 -07:00
|
|
|
<button :class="['btn', clipboardFeedback ? 'btn-success' : 'btn-outline-primary', 'm-1']" ref="clipboard" :data-clipboard-text="icsLink">
|
|
|
|
<Icon :v="clipboardFeedback ? 'clipboard-check' : 'clipboard'"/>
|
|
|
|
<T>crud.copy</T>
|
|
|
|
</button>
|
|
|
|
<a :href="icsLink" class="btn btn-outline-primary m-1">
|
2021-10-26 14:09:02 -07:00
|
|
|
<Icon v="calendar-plus"/>
|
2021-10-27 12:00:45 -07:00
|
|
|
<T>crud.download</T>
|
|
|
|
.ics
|
2021-10-26 14:09:02 -07:00
|
|
|
</a>
|
|
|
|
</div>
|
2021-10-03 07:37:00 -07:00
|
|
|
<div>
|
|
|
|
<p class="mb-0">
|
|
|
|
<T>calendar.image.header</T>:
|
|
|
|
</p>
|
2021-10-03 15:19:23 -07:00
|
|
|
<p class="mb-0" v-if="day">
|
|
|
|
<a :href="`/calendar/${day}.png`" target="_blank" rel="noopener" class="btn btn-outline-primary m-1">
|
|
|
|
<Icon v="image"/>
|
|
|
|
<T>calendar.image.overview</T>
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
<p class="mb-0" v-else>
|
|
|
|
<a :href="`/calendar/${year.year}-overview.png`" target="_blank" rel="noopener" class="btn btn-outline-primary m-1">
|
2021-10-03 07:37:00 -07:00
|
|
|
<Icon v="image"/>
|
|
|
|
<T>calendar.image.overview</T>
|
|
|
|
</a>
|
2021-10-03 15:19:23 -07:00
|
|
|
<a :href="`/calendar/${year.year}-labels.png`" target="_blank" rel="noopener" class="btn btn-outline-primary m-1">
|
2021-10-03 07:37:00 -07:00
|
|
|
<Icon v="image"/>
|
|
|
|
<T>calendar.image.labels</T>
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2021-10-27 12:00:45 -07:00
|
|
|
import ClipboardJS from 'clipboard';
|
|
|
|
|
2021-10-03 07:37:00 -07:00
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
day: {},
|
2021-10-03 15:19:23 -07:00
|
|
|
year: {},
|
2021-10-27 12:00:45 -07:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
clipboardFeedback: false,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
2021-10-27 12:39:56 -07:00
|
|
|
if (!this.$refs.clipboard) { return; }
|
2021-10-27 12:00:45 -07:00
|
|
|
const clipboard = new ClipboardJS(this.$refs.clipboard);
|
|
|
|
clipboard.on('success', (e) => {
|
|
|
|
this.clipboardFeedback = true;
|
|
|
|
setTimeout(() => this.clipboardFeedback = false, 3000);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
icsLink() {
|
|
|
|
return `${process.env.BASE_URL}/api/queer-calendar-${this.config.locale}${this.year.year === (new Date).getFullYear() ? '' : '-' + this.year.year}.ics`;
|
|
|
|
},
|
|
|
|
},
|
2021-10-03 07:37:00 -07:00
|
|
|
}
|
|
|
|
</script>
|