2019-04-03 00:25:12 +02:00
|
|
|
<template lang="pug">
|
2020-07-25 21:41:22 +02:00
|
|
|
v-container#home(fluid)
|
2020-07-09 02:27:17 +02:00
|
|
|
Announcement(v-for='announcement in announcements' :key='`a_${announcement.id}`' :announcement='announcement')
|
|
|
|
#calbar.row.mt-2.mb-2
|
2020-07-31 01:03:19 +02:00
|
|
|
.col-xl-5.col-lg-5.col-sm-5.col-xs-12
|
2020-01-15 23:33:30 +01:00
|
|
|
|
|
|
|
client-only
|
|
|
|
Calendar
|
|
|
|
.col
|
|
|
|
Search(past-filter recurrent-filter)
|
2019-05-30 12:12:51 +02:00
|
|
|
|
2020-02-09 18:15:44 +01:00
|
|
|
#events
|
|
|
|
Event(v-for='event in events' :key='event.id' :event='event')
|
2019-05-30 12:04:14 +02:00
|
|
|
|
2019-04-03 00:25:12 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-06-21 23:52:18 +02:00
|
|
|
import { mapGetters, mapState } from 'vuex'
|
2019-04-03 00:25:12 +02:00
|
|
|
import Event from '@/components/Event'
|
2020-02-16 21:03:50 +01:00
|
|
|
import Announcement from '@/components/Announcement'
|
2019-04-03 00:25:12 +02:00
|
|
|
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-02-16 21:03:50 +01:00
|
|
|
components: { Calendar, Event, Search, Announcement },
|
2020-01-15 23:33:30 +01:00
|
|
|
computed: {
|
|
|
|
events () {
|
|
|
|
return this.in_past ? this.filteredEventsWithPast : this.filteredEvents
|
|
|
|
},
|
|
|
|
...mapGetters(['filteredEvents', 'filteredEventsWithPast']),
|
2020-02-16 21:03:50 +01:00
|
|
|
...mapState(['settings', 'in_past', 'announcements'])
|
2020-01-15 23:33:30 +01:00
|
|
|
},
|
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-06-21 23:52:18 +02:00
|
|
|
}
|
2019-04-03 00:25:12 +02:00
|
|
|
}
|
|
|
|
</script>
|
2020-02-09 18:15:44 +01:00
|
|
|
<style lang='less'>
|
2020-07-31 01:03:19 +02:00
|
|
|
#home {
|
|
|
|
max-width: 1400px;
|
|
|
|
}
|
2020-07-25 21:41:22 +02:00
|
|
|
|
2020-02-09 18:15:44 +01:00
|
|
|
#events {
|
2020-06-05 23:43:09 +02:00
|
|
|
margin: 0 auto;
|
2020-02-09 18:15:44 +01:00
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
</style>
|