From b4837e1f4738322099b12b7aa00ab0326f0649b9 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Thu, 31 Jan 2019 10:20:14 +0000 Subject: [PATCH] added correct page titles --- TODO.md | 3 ++- nuxt.config.js | 1 + pages/about.vue | 9 ++++++--- pages/contact.vue | 9 ++++++++- pages/galleries.vue | 12 ++++++++++-- pages/index.vue | 7 +++++++ pages/services.vue | 9 ++++++++- 7 files changed, 42 insertions(+), 8 deletions(-) diff --git a/TODO.md b/TODO.md index cc0a2f4..87e95ae 100644 --- a/TODO.md +++ b/TODO.md @@ -3,7 +3,8 @@ - also transitioning elements in when page loads (especially gallery thumbs in gallery) * social nav items -> put in store or whatever * facebook/twitter social card thingies -* page titles +* favicon +* page descriptions etc ## Services * background image for mobile diff --git a/nuxt.config.js b/nuxt.config.js index 76272f6..c3bd08a 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -12,6 +12,7 @@ module.exports = { */ head: { title: pkg.name, + titleTemplate: 'Marc Leopold | %s', meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, diff --git a/pages/about.vue b/pages/about.vue index 0696e2c..4e017e8 100644 --- a/pages/about.vue +++ b/pages/about.vue @@ -37,17 +37,20 @@ import ContentPage from '@/components/ContentPage' import BackgroundImageLoader from '@/components/BackgroundImageLoader' export default { - name: 'HomePage', + name: 'AboutPage', components: { ContentPage, BackgroundImageLoader, }, - data() { + head () { return { + title: 'About Me', + // TODO meta - hid, name, content } - } + }, + } diff --git a/pages/contact.vue b/pages/contact.vue index 4ab0107..70c241c 100644 --- a/pages/contact.vue +++ b/pages/contact.vue @@ -82,7 +82,7 @@ import { required, email } from 'vuelidate/lib/validators' import BackgroundImageLoader from '@/components/BackgroundImageLoader' export default { - name: 'HomePage', + name: 'ContactPage', components: { ContentPage, @@ -107,6 +107,13 @@ export default { } }, + head () { + return { + title: 'Contact Me', + // TODO meta - hid, name, content + } + }, + computed: { isDisabled () { return this.attemptedSubmit && this.$v.form.$invalid diff --git a/pages/galleries.vue b/pages/galleries.vue index 6e90bff..e426e01 100644 --- a/pages/galleries.vue +++ b/pages/galleries.vue @@ -7,7 +7,7 @@ import GalleryPage from '@/components/GalleryPage' export default { - name: 'HomePage', + name: 'GalleriesPage', components: { GalleryPage @@ -92,7 +92,15 @@ export default { }, ] // galleries end } - } + }, + + head () { + return { + title: 'My Galleries', + // TODO meta - hid, name, content + } + }, + } diff --git a/pages/index.vue b/pages/index.vue index 9d07de1..86d088c 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -72,6 +72,13 @@ export default { } }, + head () { + return { + title: 'Home', + // TODO meta - hid, name, content + } + }, + mounted () { if (this.bgImages.length > 1) { this.setNextIndex() diff --git a/pages/services.vue b/pages/services.vue index 8340efc..2520e15 100644 --- a/pages/services.vue +++ b/pages/services.vue @@ -43,7 +43,7 @@ import BackgroundImagePreloader from '@/components/BackgroundImagePreloader' import BackgroundImageLoader from '@/components/BackgroundImageLoader' export default { - name: 'HomePage', + name: 'ServicesPage', components: { ContentPage, @@ -88,6 +88,13 @@ export default { } }, + head () { + return { + title: 'My Services', + // TODO meta - hid, name, content + } + }, + computed: { backgroundImageUrls () { return this.services.map(el => el.backgroundImageUrl)