gancio/components/Event.vue

73 lines
2.4 KiB
Vue
Raw Normal View History

2021-01-11 00:17:56 +01:00
<template lang="pug" functional>
v-card.h-event.event
nuxt-link(:to='`/event/${props.event.id}`')
v-img.align-end.white--text(:src="`/media/thumb/${props.event.image_path}`"
gradient="to bottom, rgba(0,0,0,.1), rgba(0,0,0,.7), rgba(0,0,0,.9)"
height="250" position="top top" )
v-card-title.text-h6.p-name {{props.event.title}}
2020-10-07 13:03:15 +02:00
v-card-text.pb-0
v-icon.float-right(v-if='props.event.parentId' color='success') mdi-repeat
time.dt-start(:datetime='props.event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")') {{ props.event|when }}
.d-none.dt-end {{props.event.end_datetime|unixFormat('YYYY-MM-DD HH:mm')}}
v-btn.place.d-block.p-location(text color='primary' @click="listeners['placeclick'](props.event.place.id)") <v-icon>mdi-map-marker</v-icon> {{props.event.place.name}}
2020-10-25 00:30:28 +02:00
v-card-actions
v-chip.ml-1(v-for='tag in props.event.tags' link small
:key='tag' outlined color='primary' @click="listeners['tagclick'](tag)") {{tag}}
v-spacer
2020-10-07 13:03:15 +02:00
v-menu(offset-y)
template(v-slot:activator="{on}")
v-btn(icon v-on='on' color='primary')
v-icon mdi-dots-vertical
v-list(dense)
v-list-item-group
v-list-item(v-clipboard:success="() => parent.$root.$message('common.copied', { color: 'success' })"
v-clipboard:copy='`${parent.settings.baseurl}/event/${props.event.id}`')
v-list-item-icon
v-icon mdi-content-copy
v-list-item-content
v-list-item-title {{parent.$t('common.copy_link')}}
v-list-item(:href='`/api/event/${props.event.id}.ics`')
v-list-item-icon
v-icon mdi-calendar-export
v-list-item-content
v-list-item-title {{parent.$t('common.add_to_calendar')}}
2020-10-07 13:03:15 +02:00
2019-04-03 00:25:12 +02:00
</template>
<script>
export default {
2019-05-30 12:04:14 +02:00
props: {
event: { type: Object, default: () => ({}) }
2019-04-03 00:25:12 +02:00
}
2021-01-11 00:17:56 +01:00
// copyLink () {
// this.$root.$message('common.copied', { color: 'success' })
// },
2019-04-03 00:25:12 +02:00
}
</script>
2021-01-11 00:17:56 +01:00
<style lang="less">
2020-07-28 12:24:39 +02:00
.event {
2020-07-31 01:03:19 +02:00
width: 330px;
height: 380px;
max-width: 500px;
2020-07-25 21:41:22 +02:00
flex-grow: 1;
margin-top: .2em;
margin-left: .2em;
2020-07-28 12:24:39 +02:00
.place {
max-width: 100%;
span {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
2020-07-28 12:24:39 +02:00
a {
text-decoration: none;
}
2020-07-25 21:41:22 +02:00
}
2020-12-04 17:25:12 +01:00
</style>