gancio/components/Event.vue

96 lines
2.6 KiB
Vue
Raw Normal View History

<template lang="pug">
v-card.h-event.event
nuxt-link(:to='`/event/${event.id}`')
v-img.img(:src="`/media/thumb/${event.image_path || 'logo.png' }`")
v-icon.float-right.mr-1(v-if='event.parentId' color='success') mdi-repeat
.title.p-name {{event.title}}
2020-10-07 13:03:15 +02:00
2021-03-08 14:39:18 +01:00
v-card-text.body.pt-0.pb-0
time.dt-start.subtitle-1(:datetime='event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")') <v-icon>mdi-calendar</v-icon> {{ event|when }}
.d-none.dt-end {{event.end_datetime|unixFormat('YYYY-MM-DD HH:mm')}}
a.place.d-block.p-location.pl-0(text color='primary' @click="$emit('placeclick', event.place.id)") <v-icon>mdi-map-marker</v-icon> {{event.place.name}}
2020-10-25 00:30:28 +02:00
2021-03-06 00:16:54 +01:00
v-card-actions.actions.justify-space-between
2021-03-05 14:21:01 +01:00
.tags
v-chip.ml-1.px-2(v-for='tag in event.tags' small
:key='tag' outlined color='primary' @click="$emit('tagclick', tag)") {{tag}}
2020-10-07 13:03:15 +02:00
v-menu(offset-y)
template(v-slot:activator="{on}")
2021-03-06 00:16:54 +01:00
v-btn.align-self-end(icon v-on='on' color='primary')
v-icon mdi-dots-vertical
v-list(dense)
v-list-item-group
v-list-item(v-clipboard:success="() => $root.$message('common.copied', { color: 'success' })"
v-clipboard:copy='`${settings.baseurl}/event/${event.id}`')
v-list-item-icon
v-icon mdi-content-copy
v-list-item-content
v-list-item-title {{$t('common.copy_link')}}
v-list-item(:href='`/api/event/${event.id}.ics`')
v-list-item-icon
v-icon mdi-calendar-export
v-list-item-content
v-list-item-title {{$t('common.add_to_calendar')}}
2020-10-07 13:03:15 +02:00
2019-04-03 00:25:12 +02:00
</template>
<script>
import { mapState } from 'vuex'
2019-04-03 00:25:12 +02:00
export default {
2019-05-30 12:04:14 +02:00
props: {
event: { type: Object, default: () => ({}) }
},
computed: mapState(['settings'])
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 {
2021-03-05 14:21:01 +01:00
display: flex;
position: relative;
flex-direction: column;
2020-07-31 01:03:19 +02:00
width: 330px;
max-width: 500px;
2020-07-25 21:41:22 +02:00
flex-grow: 1;
2021-03-05 14:21:01 +01:00
margin-top: .4em;
margin-right: .4em;
overflow: hidden;
.title {
display: block;
2021-03-08 14:39:18 +01:00
max-height: 3.3em;
2021-03-05 14:21:01 +01:00
overflow: hidden;
margin: 0.5rem 1rem 0.5rem 1rem;
2021-03-10 15:34:30 +01:00
// color: white;
border-bottom: 1px solid rgba(4,4,4,0.2);
2021-03-05 14:21:01 +01:00
font-size: 1.2em !important;
2021-03-08 14:39:18 +01:00
line-height: 1.1em;
font-weight: 500;
2021-03-05 14:21:01 +01:00
}
.body {
flex: 1 1 auto;
}
2021-03-08 14:39:18 +01:00
.img {
2021-03-05 14:21:01 +01:00
width: 100%;
max-height: 250px;
object-fit: cover;
object-position: top;
}
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>