gancio/components/Home.vue

75 lines
1.8 KiB
Vue
Raw Normal View History

2019-04-03 00:25:12 +02:00
<template lang="pug">
2019-05-30 12:04:14 +02:00
section
2019-05-30 12:12:51 +02:00
a(href='#totop')
el-button.top.d-block.d-sm-none(icon='el-icon-top' circle type='primary' plain)
a.totop(name='totop')
2019-06-26 14:44:21 +02:00
//- el-backtop(target='#home')
2019-06-06 23:54:32 +02:00
no-ssr
Calendar
2019-05-30 12:04:14 +02:00
.row.m-0
2019-05-30 12:12:51 +02:00
.p-0.col-sm-6.col-lg-4.col-xl-3(v-for='event in filteredEvents')
2019-05-30 12:04:14 +02:00
a(:id='event.newDay' v-if='event.newDay')
.d-block.d-sm-none
el-divider {{event.start_datetime|day}}
Event(
:id='event.start_datetime'
:key='event.id'
: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'
export default {
name: 'Home',
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 },
{ 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-07-08 00:06:56 +02:00
]
}
},
data () {
2019-05-30 12:04:14 +02:00
return { }
},
2019-05-30 12:12:51 +02:00
components: { Calendar, Event },
computed: {
...mapGetters(['filteredEvents']),
...mapState(['events', 'settings'])
}
2019-04-03 00:25:12 +02:00
}
</script>
2019-05-30 12:04:14 +02:00
<style lang="less">
section {
2019-04-03 00:25:12 +02:00
width: 100%;
2019-05-30 12:04:14 +02:00
max-width: 1500px;
margin: 0 auto;
2019-05-30 12:12:51 +02:00
.top {
position: fixed;
bottom: 10px;
right: 10px;
z-index: 1;
opacity: 0.7;
font-size: 16px;
}
.totop {
position: absolute;
top: 0px;
}
2019-04-03 00:25:12 +02:00
}
</style>