data moved into asyncData() method
This commit is contained in:
parent
8ecf2867d2
commit
17b65dedb0
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
<BackgroundImageLoader slot="background"
|
||||
class="background"
|
||||
image-url="https://via.placeholder.com/1920x1080"
|
||||
:image-url="imageUrl"
|
||||
>
|
||||
<div slot="overlay" class="background-tint background-overlay"></div>
|
||||
</BackgroundImageLoader>
|
||||
|
@ -51,6 +51,12 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
asyncData () {
|
||||
return new Promise ((resolve, reject) => {
|
||||
resolve({ imageUrl: "https://via.placeholder.com/1920x1080" })
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -38,23 +38,7 @@ export default {
|
|||
return {
|
||||
showHeading: false,
|
||||
currentImageIndex: -1,
|
||||
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',
|
||||
],
|
||||
currentTaglineIndex: -1,
|
||||
taglines: [
|
||||
'the essence of the image',
|
||||
'an image of the essential',
|
||||
'a solitary instance',
|
||||
'an eternal instance',
|
||||
'I imagine myself',
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -86,6 +70,29 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
asyncData({ store }) {
|
||||
return new Promise ((resolve, reject) => {
|
||||
resolve({
|
||||
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',
|
||||
'I imagine myself',
|
||||
],
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
setNextIndex () {
|
||||
this.currentImageIndex =
|
||||
|
|
Loading…
Reference in New Issue