place pages on /place/:name
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
v-card-text.body.pt-0.pb-0
|
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 }}
|
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')}}
|
.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}}
|
.d-none(itemprop='location.address') {{event.place.address}}
|
||||||
|
|
||||||
v-card-actions.pt-0.actions.justify-space-between
|
v-card-actions.pt-0.actions.justify-space-between
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ v-container
|
|||||||
template(v-slot:item.actions='{item}')
|
template(v-slot:item.actions='{item}')
|
||||||
v-btn(@click='editPlace(item)' color='primary' icon)
|
v-btn(@click='editPlace(item)' color='primary' icon)
|
||||||
v-icon(v-text='mdiPencil')
|
v-icon(v-text='mdiPencil')
|
||||||
nuxt-link(:to='`/p/${item.name}`')
|
nuxt-link(:to='`/place/${item.name}`')
|
||||||
v-icon(v-text='mdiEye')
|
v-icon(v-text='mdiEye')
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -11,15 +11,27 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import { mapState } from 'vuex'
|
||||||
import Event from '@/components/Event'
|
import Event from '@/components/Event'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Tag',
|
name: 'Place',
|
||||||
components: { Event },
|
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 }) {
|
asyncData ({ $axios, params, error }) {
|
||||||
try {
|
try {
|
||||||
const place = params.place
|
const place = params.place
|
||||||
return $axios.$get(`/place/${place}/events`)
|
return $axios.$get(`/place/${place}`)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error({ statusCode: 400, message: 'Error!' })
|
error({ statusCode: 400, message: 'Error!' })
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user