- Added title and meta info to current views

This commit is contained in:
Alexis
2020-12-24 18:24:31 +01:00
parent ad84673fba
commit 02c0216c26
10 changed files with 78 additions and 49 deletions

View File

@@ -9,7 +9,10 @@
<script>
export default {
name: 'app'
name: 'app',
metaInfo: {
title: 'Auracle',
}
}
</script>

View File

@@ -2,6 +2,12 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import App from './app.vue'
import VueMeta from 'vue-meta'
Vue.use(VueMeta, {
// optional pluginOptions
refreshOnceOnNavigation: true
})
// Environment
require('dotenv').config()

View File

@@ -5,9 +5,14 @@
</template>
<script>
export default {
name: 'schools-page'
}
export default {
name: 'schools-page',
metaInfo: {
titleTemplate: '%s - Maîtrises'
},
}
</script>
<style>

View File

@@ -15,6 +15,9 @@ const Schools = RepositoryFactory.get('schools')
export default {
name: 'single-school-page',
metaInfo: {
titleTemplate: '%s - Maîtrise I'
},
components: {
'spell-list': SpellsList,
},
@@ -26,18 +29,18 @@ export default {
}
},
created() {
this.computeSchool()
this.computeSchool();
},
methods: {
async fetchSchool(id) {
const { data } = await Schools.getOne(id)
return data
const { data } = await Schools.getOne(id);
return data;
},
async computeSchool() {
this.loading = true
const displaySchool = await this.fetchSchool(this.id)
this.loading = false
this.school = displaySchool
this.loading = true;
const displaySchool = await this.fetchSchool(this.id);
this.loading = false;
this.school = displaySchool;
},
}
}

View File

@@ -1,12 +1,15 @@
<template>
<div class="container-fluid p-4" id="spell-container">
<h1 class="display-3 font-display mb-3">Sortilège</h1>
<h1 class="display-3 font-display mb-3">Sortilège I</h1>
</div>
</template>
<script>
export default {
name: 'single-spell-page',
metaInfo: {
titleTemplate: '%s - Sortilège I'
},
}
</script>

View File

@@ -10,6 +10,9 @@ import SpellsList from "~/components/spells/spells-list"
export default {
name: 'spells-page',
metaInfo: {
titleTemplate: '%s - Grimoire'
},
components: {
'spell-list': SpellsList,
}

View File

@@ -7,6 +7,9 @@
<script>
export default {
name: 'timeline-page',
metaInfo: {
titleTemplate: '%s - Âges'
},
}
</script>

View File

@@ -88,6 +88,9 @@
export default {
name: 'login-page',
metaInfo: {
titleTemplate: '%s - Connexion'
},
data() {
return {
email: "",

View File

@@ -6,12 +6,6 @@
>
<h2 class="display-3 font-display mb-3">
<span class="username">{{ user.name }}</span>
<span
v-if="user.verified"
class="verified"
>
<i class="mad">check_circle</i>
</span>
</h2>
<span>Membre depuis le {{ registered_date }}</span>
@@ -41,6 +35,9 @@ export default {
return new Intl.DateTimeFormat("fr", date_options).format(raw_date);
}
},
metaInfo: {
titleTemplate: '%s - Profil'
}
}
</script>

View File

@@ -118,6 +118,9 @@
<script>
export default {
name: 'register-page',
metaInfo: {
titleTemplate: '%s - Inscription'
},
data() {
return {
name: "",