home page api calls
This commit is contained in:
parent
c8565cbb76
commit
08f9ba6bf7
23
TODO.md
23
TODO.md
|
@ -5,6 +5,7 @@
|
||||||
* Galleries - sort thumbs by sort_order
|
* Galleries - sort thumbs by sort_order
|
||||||
* API
|
* API
|
||||||
* mailer
|
* mailer
|
||||||
|
* remove testing/dev mode or whatever its called from axios in nuxt.config.js
|
||||||
|
|
||||||
## Maybes
|
## Maybes
|
||||||
* gallery page - featured images in same style as on services page with the
|
* gallery page - featured images in same style as on services page with the
|
||||||
|
@ -18,3 +19,25 @@
|
||||||
* galleries - click on thumb, click on different gallery, click on original gallery
|
* galleries - click on thumb, click on different gallery, click on original gallery
|
||||||
and the thumb list doesn't scroll to correct position to show thumb 0,
|
and the thumb list doesn't scroll to correct position to show thumb 0,
|
||||||
it is still showing the thumb that was clicked on first
|
it is still showing the thumb that was clicked on first
|
||||||
|
|
||||||
|
## Data for Backend
|
||||||
|
```javascript
|
||||||
|
//home
|
||||||
|
bgImages: [
|
||||||
|
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/slider.jpg',
|
||||||
|
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/slider-2.jpeg',
|
||||||
|
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/slider-3.jpeg',
|
||||||
|
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/4-edit-3.jpg',
|
||||||
|
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/4-edit.jpg',
|
||||||
|
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/image-1.png',
|
||||||
|
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/slider-4.jpeg',
|
||||||
|
],
|
||||||
|
taglines: [
|
||||||
|
'the essence of the image',
|
||||||
|
'an image of the essential',
|
||||||
|
'a solitary instance',
|
||||||
|
'an eternal instance',
|
||||||
|
'a fleeting eternity',
|
||||||
|
'I imagine myself',
|
||||||
|
],
|
||||||
|
```
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<transition name="fade" mode="out-in">
|
<transition name="fade" mode="out-in">
|
||||||
<p class="tagline"
|
<p class="tagline"
|
||||||
:key="currentTaglineIndex">
|
:key="currentTaglineIndex">
|
||||||
{{ taglines[currentTaglineIndex] }}
|
{{ tagline }}
|
||||||
</p>
|
</p>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,8 +51,8 @@ export default {
|
||||||
return url
|
return url
|
||||||
},
|
},
|
||||||
|
|
||||||
tagLine () {
|
tagline () {
|
||||||
return this.currentTaglineIndex > -1 ? this.taglines[this.currentTaglineIndex] : ''
|
return this.currentTaglineIndex > -1 ? this.taglines[this.currentTaglineIndex].text : ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -74,28 +74,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
asyncData({ store }) {
|
async asyncData({ $axios }) {
|
||||||
return new Promise ((resolve, reject) => {
|
let { bgImages, taglines } = await $axios.$get('/api/v1/home')
|
||||||
resolve({
|
return { bgImages, taglines}
|
||||||
bgImages: [
|
|
||||||
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/slider.jpg',
|
|
||||||
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/slider-2.jpeg',
|
|
||||||
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/slider-3.jpeg',
|
|
||||||
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/4-edit-3.jpg',
|
|
||||||
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/4-edit.jpg',
|
|
||||||
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/image-1.png',
|
|
||||||
'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/slider-4.jpeg',
|
|
||||||
],
|
|
||||||
taglines: [
|
|
||||||
'the essence of the image',
|
|
||||||
'an image of the essential',
|
|
||||||
'a solitary instance',
|
|
||||||
'an eternal instance',
|
|
||||||
'a fleeting eternity',
|
|
||||||
'I imagine myself',
|
|
||||||
],
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue