This commit is contained in:
les
2021-02-09 12:13:38 +01:00
parent 05b76d94a5
commit c75eb19f05
3 changed files with 13 additions and 15 deletions

View File

@@ -1,16 +1,16 @@
<template lang="pug" functional> <template lang="pug" functional>
v-card.h-event.event v-card.h-event.event
nuxt-link(:to='`/event/${props.event.id}`') nuxt-link(:to='`/event/${props.event.id}`')
v-img.align-end.white--text(:src="`/media/thumb/${props.event.image_path || 'logo.png' }`" v-img.align-end(:src="`/media/thumb/${props.event.image_path || 'logo.png' }`"
gradient="to bottom, rgba(0,0,0,.1), rgba(0,0,0,.7), rgba(0,0,0,.9)"
height="250" position="top top" ) height="250" position="top top" )
v-card-title.text-h6.p-name {{props.event.title}} v-icon.float-right(v-if='props.event.parentId' color='success') mdi-repeat
v-card-title.p-name.pb-0 {{props.event.title}}
//- gradient="to bottom, rgba(0,0,0,.1), rgba(0,0,0,.7), rgba(0,0,0,.9)"
v-card-text.pb-0 v-card-text.pb-0
v-icon.float-right(v-if='props.event.parentId' color='success') mdi-repeat time.dt-start.subtitle-1(:datetime='props.event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")') {{ props.event|when }}
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')}} .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}} v-btn.place.d-block.p-location.pl-0(text color='primary' @click="listeners['placeclick'](props.event.place.id)") <v-icon>mdi-map-marker</v-icon> {{props.event.place.name}}
v-card-actions v-card-actions
v-chip.ml-1(v-for='tag in props.event.tags' link small v-chip.ml-1(v-for='tag in props.event.tags' link small
@@ -42,9 +42,6 @@ export default {
props: { props: {
event: { type: Object, default: () => ({}) } event: { type: Object, default: () => ({}) }
} }
// copyLink () {
// this.$root.$message('common.copied', { color: 'success' })
// },
} }
</script> </script>
<style lang="less"> <style lang="less">
@@ -53,8 +50,8 @@ export default {
height: 380px; height: 380px;
max-width: 500px; max-width: 500px;
flex-grow: 1; flex-grow: 1;
margin-top: .2em; margin-top: .3em;
margin-left: .2em; margin-left: .3em;
.place { .place {
max-width: 100%; max-width: 100%;

View File

@@ -74,8 +74,9 @@ export default {
try { try {
const ret = await this.$axios.$get('/event/import', { params: { URL: this.URL } }) const ret = await this.$axios.$get('/event/import', { params: { URL: this.URL } })
this.events = ret this.events = ret
// check if contain an h-event // check if contain an h-event
// this.$emit('imported', ret) this.$emit('imported', ret[0])
} catch (e) { } catch (e) {
console.error(e) console.error(e)
this.error = true this.error = true

View File

@@ -3,10 +3,10 @@ v-container
//- EVENT PAGE //- EVENT PAGE
//- gancio supports microformats (http://microformats.org/wiki/h-event) //- gancio supports microformats (http://microformats.org/wiki/h-event)
v-card.h-event v-card.h-event
v-card-text v-card-actions
//- admin controls //- admin controls
EventAdmin.mb-1(v-if='is_mine' :event='event') EventAdmin.mb-1(v-if='is_mine' :event='event')
v-card-text
v-row v-row
v-col.col-12.col-lg-8 v-col.col-12.col-lg-8
@@ -61,7 +61,7 @@ v-container
:href='`/api/event/${event.id}.ics`') :href='`/api/event/${event.id}.ics`')
v-icon mdi-calendar-export v-icon mdi-calendar-export
.p-description.text-body-1.px-5(v-if='event.image_path' v-html='event.description') .p-description.text-body-1.px-5.ma-5(v-if='event.image_path' v-html='event.description')
v-chip.p-category.ml-1(v-for='tag in event.tags' color='primary' v-chip.p-category.ml-1(v-for='tag in event.tags' color='primary'
outlined :key='tag' v-text='tag') outlined :key='tag' v-text='tag')