2020-01-30 12:37:19 +01:00
|
|
|
<template lang='pug'>
|
2019-05-30 12:04:14 +02:00
|
|
|
div#list
|
2021-03-19 12:01:37 +01:00
|
|
|
v-list(dense)
|
|
|
|
v-list-item
|
|
|
|
h3(v-if='title') {{title}}
|
|
|
|
v-list-item(
|
|
|
|
target='_blank'
|
2021-04-14 01:30:51 +02:00
|
|
|
:to='`/event/${event.slug || event.id}`'
|
2020-11-13 00:13:44 +01:00
|
|
|
v-for='event in computedEvents'
|
2021-03-19 12:01:37 +01:00
|
|
|
:key='`${event.id}_${event.start_datetime}`' small)
|
|
|
|
v-list-item-content
|
2022-02-08 14:45:19 +01:00
|
|
|
v-list-item-subtitle <v-icon small color='success' v-if='event.parentId' v-text='mdiRepeat'></v-icon> {{event|when}}
|
2021-03-19 12:01:37 +01:00
|
|
|
span.primary--text.ml-1 @{{event.place.name}}
|
|
|
|
v-list-item-title(v-text='event.title')
|
2019-04-29 00:27:29 +02:00
|
|
|
</template>
|
|
|
|
<script>
|
2022-02-08 14:45:19 +01:00
|
|
|
import { mdiRepeat } from '@mdi/js'
|
2019-05-30 12:04:14 +02:00
|
|
|
|
2019-04-29 00:27:29 +02:00
|
|
|
export default {
|
|
|
|
name: 'List',
|
2022-02-08 14:45:19 +01:00
|
|
|
data () {
|
|
|
|
return { mdiRepeat }
|
|
|
|
},
|
2019-04-29 00:27:29 +02:00
|
|
|
props: {
|
2019-05-30 12:04:14 +02:00
|
|
|
title: {
|
|
|
|
type: String,
|
2019-06-06 23:54:32 +02:00
|
|
|
default: ''
|
2019-05-30 12:04:14 +02:00
|
|
|
},
|
|
|
|
events: {
|
|
|
|
type: Array,
|
|
|
|
default: () => {
|
|
|
|
return []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
maxEvents: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
2019-04-29 00:27:29 +02:00
|
|
|
minimal: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
2019-05-30 12:04:14 +02:00
|
|
|
},
|
|
|
|
showTags: {
|
|
|
|
type: Boolean,
|
2019-09-11 19:12:24 +02:00
|
|
|
default: true
|
2019-05-30 12:04:14 +02:00
|
|
|
},
|
|
|
|
showImage: {
|
|
|
|
type: Boolean,
|
2019-09-11 19:12:24 +02:00
|
|
|
default: true
|
2019-05-30 12:04:14 +02:00
|
|
|
},
|
|
|
|
showDescription: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
2019-04-29 00:27:29 +02:00
|
|
|
}
|
2020-11-13 00:13:44 +01:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computedEvents () {
|
|
|
|
if (!this.maxEvents) { return this.events }
|
|
|
|
return this.events.slice(0, this.maxEvents)
|
|
|
|
}
|
2019-09-11 19:12:24 +02:00
|
|
|
}
|
2019-04-29 00:27:29 +02:00
|
|
|
}
|
2019-05-30 12:04:14 +02:00
|
|
|
</script>
|
2022-05-03 15:23:55 +02:00
|
|
|
<style>
|
|
|
|
#list {
|
|
|
|
max-width: 500px;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
#list .v-list-item__title {
|
|
|
|
white-space: normal !important;
|
|
|
|
}
|
2019-05-30 12:04:14 +02:00
|
|
|
</style>
|