From e4d43bd7a26a3a7f23e0676a85dc46e7ac0e5bfa Mon Sep 17 00:00:00 2001 From: les Date: Fri, 5 Mar 2021 14:20:23 +0100 Subject: [PATCH] meta on Announcements --- pages/index.vue | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index 42cfa832..d6b38749 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -2,7 +2,8 @@ v-container#home(fluid) //- Announcements - Announcement(v-for='announcement in announcements' :key='`a_${announcement.id}`' :announcement='announcement') + #announcements.mr-1 + Announcement(v-for='announcement in announcements' :key='`a_${announcement.id}`' :announcement='announcement') //- Calendar and search bar v-row @@ -54,9 +55,23 @@ export default { // intersecting: {} } }, - computed: { - ...mapState(['settings', 'announcements']) + head () { + return { + title: this.settings.title, + meta: [ + // hid is used as unique identifier. Do not use `vmid` for it as it will not work + { hid: 'description', name: 'description', content: this.settings.description }, + { hid: 'og-description', name: 'og:description', content: this.settings.description }, + { hid: 'og-title', property: 'og:title', content: this.settings.title }, + { hid: 'og-url', property: 'og:url', content: this.settings.baseurl }, + { property: 'og:image', content: this.settings.baseurl + '/favicon.ico' } + ], + link: [ + { rel: 'alternate', type: 'application/rss+xml', title: this.settings.title, href: this.settings.baseurl + '/feed/rss' } + ] + } }, + computed: mapState(['settings', 'announcements']), methods: { // onIntersect (isIntersecting, eventId) { // this.intersecting[eventId] = isIntersecting @@ -72,6 +87,7 @@ export default { }).then(events => { this.events = events this.setFilters(this.filters) + this.$nuxt.$loading.finish() }) }, placeClick (place_id) { @@ -99,6 +115,7 @@ export default { this.first = false return } + this.$nuxt.$loading.start() this.selectedDay = null // check if current month is selected @@ -127,28 +144,14 @@ export default { this.selectedDay = date this.updateEvents() } - }, - head () { - return { - title: this.settings.title, - meta: [ - // hid is used as unique identifier. Do not use `vmid` for it as it will not work - { hid: 'description', name: 'description', content: this.settings.description }, - { hid: 'og-description', name: 'og:description', content: this.settings.description }, - { hid: 'og-title', property: 'og:title', content: this.settings.title }, - { hid: 'og-url', property: 'og:url', content: this.settings.baseurl }, - { property: 'og:image', content: this.settings.baseurl + '/favicon.ico' } - ], - link: [ - { rel: 'alternate', type: 'application/rss+xml', title: this.settings.title, href: this.settings.baseurl + '/feed/rss' } - ] - } } }