gancio/components/Home.vue

56 lines
1.7 KiB
Vue
Raw Normal View History

2019-04-03 00:25:12 +02:00
<template lang="pug">
2020-01-15 23:33:30 +01:00
section#home
.row.m-0.mt-1
.col-xl-7.col-lg-7.col-sm-6.col-xs-12.p-0
client-only
Calendar
.col
Search(past-filter recurrent-filter)
2019-05-30 12:12:51 +02:00
2020-01-15 23:33:30 +01:00
.row.m-0
.p-0.col-sm-6.col-lg-4.col-xl-4(v-for='event in events' :key='event.id')
a.d-block.d-sm-none.sticky(:id='event.newDay' v-if='event.newDay')
el-divider {{event.start_datetime|day}}
2019-05-30 12:04:14 +02:00
Event(
:id='event.start_datetime'
:event='event'
)
2019-04-03 00:25:12 +02:00
</template>
<script>
import { mapGetters, mapState } from 'vuex'
2019-04-03 00:25:12 +02:00
import Event from '@/components/Event'
import Calendar from '@/components/Calendar'
2020-01-15 23:33:30 +01:00
import Search from '@/components/Search'
2019-04-03 00:25:12 +02:00
export default {
name: 'Home',
2020-01-15 23:33:30 +01:00
components: { Calendar, Event, Search },
computed: {
events () {
return this.in_past ? this.filteredEventsWithPast : this.filteredEvents
},
...mapGetters(['filteredEvents', 'filteredEventsWithPast']),
...mapState(['settings', 'in_past'])
},
2019-07-08 00:06:56 +02:00
head () {
return {
title: this.settings.title,
meta: [
// hid is used as unique identifier. Do not use `vmid` for it as it will not work
{ hid: 'description', name: 'description', content: this.settings.description },
{ hid: 'og-description', name: 'og:description', content: this.settings.description },
2019-09-11 19:12:24 +02:00
{ hid: 'og-title', property: 'og:title', content: this.settings.title },
{ hid: 'og-url', property: 'og:url', content: this.settings.baseurl },
2019-07-11 22:29:18 +02:00
{ property: 'og:image', content: this.settings.baseurl + '/favicon.ico' }
2019-09-17 18:16:59 +02:00
],
link: [
{ rel: 'alternate', type: 'application/rss+xml', title: this.settings.title, href: this.settings.baseurl + '/feed/rss' }
2019-07-08 00:06:56 +02:00
]
}
}
2019-04-03 00:25:12 +02:00
}
</script>