place pages on /place/:name

This commit is contained in:
lesion 2022-06-18 01:09:25 +02:00
parent e021ec56ba
commit c660bd8eb4
No known key found for this signature in database
GPG key ID: 352918250B012177
3 changed files with 16 additions and 4 deletions

View file

@ -8,7 +8,7 @@
v-card-text.body.pt-0.pb-0
time.dt-start.subtitle-1(:datetime='event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")' itemprop="startDate" :content="event.start_datetime|unixFormat('YYYY-MM-DDTHH:mm')") <v-icon v-text='mdiCalendar'></v-icon> {{ event|when }}
.d-none.dt-end(itemprop="endDate" :content="event.end_datetime|unixFormat('YYYY-MM-DDTHH:mm')") {{event.end_datetime|unixFormat('YYYY-MM-DD HH:mm')}}
nuxt-link.place.d-block.p-location.pl-0(text color='primary' :to='`/p/${event.place.name}`' itemprop="location" :content="event.place.name") <v-icon v-text='mdiMapMarker'></v-icon> {{event.place.name}}
nuxt-link.place.d-block.p-location.pl-0(text color='primary' :to='`/place/${event.place.name}`' itemprop="location" :content="event.place.name") <v-icon v-text='mdiMapMarker'></v-icon> {{event.place.name}}
.d-none(itemprop='location.address') {{event.place.address}}
v-card-actions.pt-0.actions.justify-space-between

View file

@ -41,7 +41,7 @@ v-container
template(v-slot:item.actions='{item}')
v-btn(@click='editPlace(item)' color='primary' icon)
v-icon(v-text='mdiPencil')
nuxt-link(:to='`/p/${item.name}`')
nuxt-link(:to='`/place/${item.name}`')
v-icon(v-text='mdiEye')
</template>

View file

@ -11,15 +11,27 @@
</template>
<script>
import { mapState } from 'vuex'
import Event from '@/components/Event'
export default {
name: 'Tag',
name: 'Place',
components: { Event },
head () {
const title = `${this.settings.title} - ${this.place.name}`
return {
title,
link: [
{ rel: 'alternate', type: 'application/rss+xml', title, href: this.settings.baseurl + `/feed/rss/place/${this.place.name}` },
{ rel: 'alternate', type: 'text/calendar', title, href: this.settings.baseurl + `/feed/ics/place/${this.place.name}` }
]
}
},
computed: mapState(['settings']),
asyncData ({ $axios, params, error }) {
try {
const place = params.place
return $axios.$get(`/place/${place}/events`)
return $axios.$get(`/place/${place}`)
} catch (e) {
error({ statusCode: 400, message: 'Error!' })
}