gancio/components/Event.vue

39 lines
1.8 KiB
Vue
Raw Normal View History

<template lang="pug">
2022-07-01 15:55:09 +02:00
v-card.h-event.event.d-flex(itemscope itemtype="https://schema.org/Event")
nuxt-link(:to='`/event/${event.slug || event.id}`' itemprop="url")
MyPicture(v-if='!settings.hide_thumbs' :event='event' thumb :lazy='lazy')
2022-07-01 15:55:09 +02:00
v-icon.float-right.mr-1(v-if='event.parentId' color='success' v-text='mdiRepeat')
2022-09-05 00:02:33 +02:00
.title.p-name(itemprop="name") {{ event.title }}
2020-10-07 13:03:15 +02:00
2022-07-01 15:55:09 +02:00
v-card-text.body.pt-0.pb-0
2022-09-05 00:02:33 +02:00
time.dt-start.subtitle-1(:datetime='event.start_datetime | unixFormat("YYYY-MM-DD HH:mm")' itemprop="startDate" :content="event.start_datetime | unixFormat('YYYY-MM-DDTHH:mm')") <v-icon v-text='mdiCalendar'></v-icon> {{ event | when }}
.d-none.dt-end(v-if='event.end_datetime' itemprop="endDate" :content="event.end_datetime | unixFormat('YYYY-MM-DDTHH:mm')") {{ event.end_datetime | unixFormat('YYYY-MM-DD HH:mm') }}
nuxt-link.place.d-block.p-location.pl-0(text :to='`/place/${encodeURIComponent(event.place.name)}`' itemprop="location" itemscope itemtype="https://schema.org/Place") <v-icon v-text='mdiMapMarker'></v-icon> <span itemprop='name'>{{ event.place.name }}</span>
2022-09-05 00:02:33 +02:00
.d-none(itemprop='address') {{ event.place.address }}
2020-10-25 00:30:28 +02:00
2022-07-01 15:55:09 +02:00
v-card-actions.pt-0.actions.justify-space-between
.tags
v-chip.ml-1.mt-1(v-for='tag in event.tags.slice(0, 6)' small :to='`/tag/${encodeURIComponent(tag)}`'
2022-09-05 00:02:33 +02:00
:key='tag' outlined color='primary') {{ tag }}
2020-10-07 13:03:15 +02:00
2019-04-03 00:25:12 +02:00
</template>
<script>
import { mapState } from 'vuex'
2022-04-27 12:34:58 +02:00
import MyPicture from '~/components/MyPicture'
2022-09-22 08:16:51 +02:00
import { mdiRepeat, mdiCalendar, mdiMapMarker } from '@mdi/js'
2019-04-03 00:25:12 +02:00
export default {
2022-09-05 00:02:33 +02:00
data() {
2022-09-22 08:16:51 +02:00
return { mdiRepeat, mdiMapMarker, mdiCalendar }
},
2022-04-27 12:34:58 +02:00
components: {
MyPicture
},
2019-05-30 12:04:14 +02:00
props: {
event: { type: Object, default: () => ({}) },
lazy: Boolean
},
computed: mapState(['settings'])
2019-04-03 00:25:12 +02:00
}
2021-04-13 18:04:53 +02:00
</script>