fix microdata address

This commit is contained in:
lesion
2022-09-05 00:02:33 +02:00
parent 098e0202c9
commit a197d2123f

View File

@@ -3,22 +3,22 @@ v-card.h-event.event.d-flex(itemscope itemtype="https://schema.org/Event")
nuxt-link(:to='`/event/${event.slug || event.id}`' itemprop="url") nuxt-link(:to='`/event/${event.slug || event.id}`' itemprop="url")
MyPicture(:event='event' thumb :lazy='lazy') MyPicture(:event='event' thumb :lazy='lazy')
v-icon.float-right.mr-1(v-if='event.parentId' color='success' v-text='mdiRepeat') v-icon.float-right.mr-1(v-if='event.parentId' color='success' v-text='mdiRepeat')
.title.p-name(itemprop="name") {{event.title}} .title.p-name(itemprop="name") {{ event.title }}
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='`/place/${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" itemscope itemtype="https://schema.org/Place") <v-icon v-text='mdiMapMarker'></v-icon> <span itemprop='name'>{{ event.place.name }}</span>
.d-none(itemprop='location.address') {{event.place.address}} .d-none(itemprop='address') {{ event.place.address }}
v-card-actions.pt-0.actions.justify-space-between v-card-actions.pt-0.actions.justify-space-between
.tags .tags
v-chip.ml-1.mt-1(v-for='tag in event.tags.slice(0,6)' small :to='`/tag/${tag}`' v-chip.ml-1.mt-1(v-for='tag in event.tags.slice(0, 6)' small :to='`/tag/${tag}`'
:key='tag' outlined color='primary') {{tag}} :key='tag' outlined color='primary') {{ tag }}
client-only client-only
v-menu(offset-y eager) v-menu(offset-y eager)
template(v-slot:activator="{on}") template(v-slot:activator="{ on }")
v-btn.align-self-end(icon v-on='on' color='primary' title='more' aria-label='more') v-btn.align-self-end(icon v-on='on' color='primary' title='more' aria-label='more')
v-icon(v-text='mdiDotsVertical') v-icon(v-text='mdiDotsVertical')
v-list(dense) v-list(dense)
@@ -27,22 +27,22 @@ v-card.h-event.event.d-flex(itemscope itemtype="https://schema.org/Event")
v-list-item-icon v-list-item-icon
v-icon(v-text='mdiContentCopy') v-icon(v-text='mdiContentCopy')
v-list-item-content v-list-item-content
v-list-item-title {{$t('common.copy_link')}} v-list-item-title {{ $t('common.copy_link') }}
v-list-item(:href='`/api/event/${event.slug || event.id}.ics`') v-list-item(:href='`/api/event/${event.slug || event.id}.ics`')
v-list-item-icon v-list-item-icon
v-icon(v-text='mdiCalendarExport') v-icon(v-text='mdiCalendarExport')
v-list-item-content v-list-item-content
v-list-item-title {{$t('common.add_to_calendar')}} v-list-item-title {{ $t('common.add_to_calendar') }}
v-list-item(v-if='is_mine' :to='`/add/${event.id}`') v-list-item(v-if='is_mine' :to='`/add/${event.id}`')
v-list-item-icon v-list-item-icon
v-icon(v-text='mdiPencil') v-icon(v-text='mdiPencil')
v-list-item-content v-list-item-content
v-list-item-title {{$t('common.edit')}} v-list-item-title {{ $t('common.edit') }}
v-list-item(v-if='is_mine' @click='remove(false)') v-list-item(v-if='is_mine' @click='remove(false)')
v-list-item-icon v-list-item-icon
v-icon(color='error' v-text='mdiDeleteForever') v-icon(color='error' v-text='mdiDeleteForever')
v-list-item-content v-list-item-content
v-list-item-title {{$t('common.remove')}} v-list-item-title {{ $t('common.remove') }}
template(#placeholder) template(#placeholder)
v-btn.align-self-end(icon color='primary' aria-label='more') v-btn.align-self-end(icon color='primary' aria-label='more')
v-icon(v-text='mdiDotsVertical') v-icon(v-text='mdiDotsVertical')
@@ -51,13 +51,17 @@ v-card.h-event.event.d-flex(itemscope itemtype="https://schema.org/Event")
import { mapState } from 'vuex' import { mapState } from 'vuex'
import clipboard from '../assets/clipboard' import clipboard from '../assets/clipboard'
import MyPicture from '~/components/MyPicture' import MyPicture from '~/components/MyPicture'
import { mdiRepeat, mdiPencil, mdiDotsVertical, mdiContentCopy, import {
mdiCalendarExport, mdiDeleteForever, mdiCalendar, mdiMapMarker } from '@mdi/js' mdiRepeat, mdiPencil, mdiDotsVertical, mdiContentCopy,
mdiCalendarExport, mdiDeleteForever, mdiCalendar, mdiMapMarker
} from '@mdi/js'
export default { export default {
data () { data() {
return { mdiRepeat, mdiPencil, mdiDotsVertical, mdiContentCopy, mdiCalendarExport, return {
mdiDeleteForever, mdiMapMarker, mdiCalendar } mdiRepeat, mdiPencil, mdiDotsVertical, mdiContentCopy, mdiCalendarExport,
mdiDeleteForever, mdiMapMarker, mdiCalendar
}
}, },
components: { components: {
MyPicture MyPicture
@@ -69,7 +73,7 @@ export default {
mixins: [clipboard], mixins: [clipboard],
computed: { computed: {
...mapState(['settings']), ...mapState(['settings']),
is_mine () { is_mine() {
if (!this.$auth.user) { if (!this.$auth.user) {
return false return false
} }
@@ -79,7 +83,7 @@ export default {
} }
}, },
methods: { methods: {
async remove () { async remove() {
const ret = await this.$root.$confirm('event.remove_confirmation') const ret = await this.$root.$confirm('event.remove_confirmation')
if (!ret) { return } if (!ret) { return }
await this.$axios.delete(`/event/${this.event.id}`) await this.$axios.delete(`/event/${this.event.id}`)