gancio/components/List.vue

56 lines
961 B
Vue
Raw Normal View History

<template lang='pug'>
2019-05-30 12:04:14 +02:00
div#list
2020-07-28 12:24:39 +02:00
p(v-if='title') {{title}}
2020-07-29 00:25:45 +02:00
v-timeline(dense)
2020-07-28 12:24:39 +02:00
v-timeline-item(
2019-05-30 12:04:14 +02:00
v-for='event in events'
2020-07-29 00:25:45 +02:00
:key='`${event.id}_${event.start_datetime}`')
div {{event|when}}
a(:href='`/event/${event.id}`' target='_blank') {{event.title}}
2020-07-29 00:25:45 +02:00
small.float-right @{{event.place.name}}
</template>
<script>
2019-05-30 12:04:14 +02:00
export default {
name: 'List',
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
},
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-09-11 19:12:24 +02:00
}
}
2019-05-30 12:04:14 +02:00
</script>
<style lang='less'>
#list {
max-width: 500px;
2019-07-11 22:29:18 +02:00
margin: 0 auto;
}
2019-05-30 12:04:14 +02:00
</style>