data moved into asyncData()
This commit is contained in:
parent
37eb527ecb
commit
5606c3d5ee
|
@ -13,87 +13,6 @@ export default {
|
|||
GalleryPage
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
galleries: [
|
||||
{ title: 'Portraits',
|
||||
id: 0,
|
||||
featuredImage: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-4-600x400.jpeg',
|
||||
images: [
|
||||
{ id: 1, thumbUrl: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-4-600x400.jpeg', url: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-4-1800x1200.jpeg' },
|
||||
{ id: 2, thumbUrl: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-3-600x400.jpeg', url: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-3-1800x1200.jpeg' },
|
||||
{ id: 3, thumbUrl: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-2-480x600.jpg', url: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-2-1800x2250.jpg' },
|
||||
{ id: 7, thumbUrl: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-8-390x600.jpeg', url: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-8-1560x2400.jpeg' }
|
||||
]
|
||||
},
|
||||
{ title: 'Flowers',
|
||||
id: 2,
|
||||
featuredImage: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/flowers-5-600x402.jpeg',
|
||||
images: [
|
||||
{ id: 4, thumbUrl: 'https://via.placeholder.com/400x300/ff0000/ffffff', url: 'https://via.placeholder.com/1920x1080/ff0000/ffffff?text=One0' },
|
||||
{ id: 5, thumbUrl: 'https://via.placeholder.com/400x300/00ff00/ffffff', url: 'https://via.placeholder.com/1920x1080/00ff00/ffffff?text=One1' },
|
||||
{ id: 6, thumbUrl: 'https://via.placeholder.com/400x300/0000ff/ffffff', url: 'https://via.placeholder.com/1920x1080/0000ff/ffffff?text=One2' },
|
||||
{ id: 8, thumbUrl: 'https://via.placeholder.com/400x300/ffff00/ffffff', url: 'https://via.placeholder.com/1920x1080/ffff00/ffffff?text=One3' },
|
||||
{ id: 9, thumbUrl: 'https://via.placeholder.com/400x300/ff00ff/ffffff', url: 'https://via.placeholder.com/1920x1080/ff00ff/ffffff?text=One4' },
|
||||
{ id: 10, thumbUrl: 'https://via.placeholder.com/400x300/00ffff/ffffff', url: 'https://via.placeholder.com/1920x1080/00ffff/ffffff?text=One5' },
|
||||
{ id: 11, thumbUrl: 'https://via.placeholder.com/400x300/ffffff/000000', url: 'https://via.placeholder.com/1920x1080/ffffff/000000?text=One6' },
|
||||
{ id: 12, thumbUrl: 'https://via.placeholder.com/400x300/000000/ffffff', url: 'https://via.placeholder.com/1920x1080/000000/ffffff?text=One7' }
|
||||
]
|
||||
},
|
||||
{ title: 'The Longest Title for a Gallery That You Could Ever Imagine (Unless You Have a Really Good Imagination - And Then You Could Probably Think of a Really Big One)',
|
||||
id: 3,
|
||||
featuredImage: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/music-4-600x400.jpg',
|
||||
images: [
|
||||
{ id: 13, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 14, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 24, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 33, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' }
|
||||
]
|
||||
},
|
||||
{ title: 'Gallery Three',
|
||||
id: 4,
|
||||
featuredImage: 'https://via.placeholder.com/600x400',
|
||||
images: [
|
||||
{ id: 56, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 3456, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 947, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 837, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' }
|
||||
]
|
||||
},
|
||||
{ title: 'Gallery Four',
|
||||
id: 5,
|
||||
featuredImage: 'https://via.placeholder.com/600x400',
|
||||
images: [
|
||||
{ id: 0, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 1, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 2, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 3, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' }
|
||||
]
|
||||
},
|
||||
{ title: 'Gallery Five',
|
||||
id: 6,
|
||||
featuredImage: 'https://via.placeholder.com/600x400',
|
||||
images: [
|
||||
{ id: 0, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 1, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 2, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 3, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' }
|
||||
]
|
||||
},
|
||||
{ title: 'Gallery Six',
|
||||
id: 7,
|
||||
featuredImage: 'https://via.placeholder.com/600x400',
|
||||
images: [
|
||||
{ id: 0, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 1, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 2, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 3, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' }
|
||||
]
|
||||
},
|
||||
] // galleries end
|
||||
}
|
||||
},
|
||||
|
||||
head () {
|
||||
return {
|
||||
title: 'My Galleries',
|
||||
|
@ -101,6 +20,89 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
asyncData () {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve({
|
||||
galleries: [
|
||||
{ title: 'Portraits',
|
||||
id: 0,
|
||||
featuredImage: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-4-600x400.jpeg',
|
||||
images: [
|
||||
{ id: 1, thumbUrl: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-4-600x400.jpeg', url: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-4-1800x1200.jpeg' },
|
||||
{ id: 2, thumbUrl: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-3-600x400.jpeg', url: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-3-1800x1200.jpeg' },
|
||||
{ id: 3, thumbUrl: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-2-480x600.jpg', url: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-2-1800x2250.jpg' },
|
||||
{ id: 7, thumbUrl: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-8-390x600.jpeg', url: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/portraits-8-1560x2400.jpeg' }
|
||||
]
|
||||
},
|
||||
{ title: 'Flowers',
|
||||
id: 2,
|
||||
featuredImage: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/flowers-5-600x402.jpeg',
|
||||
images: [
|
||||
{ id: 4, thumbUrl: 'https://via.placeholder.com/400x300/ff0000/ffffff', url: 'https://via.placeholder.com/1920x1080/ff0000/ffffff?text=One0' },
|
||||
{ id: 5, thumbUrl: 'https://via.placeholder.com/400x300/00ff00/ffffff', url: 'https://via.placeholder.com/1920x1080/00ff00/ffffff?text=One1' },
|
||||
{ id: 6, thumbUrl: 'https://via.placeholder.com/400x300/0000ff/ffffff', url: 'https://via.placeholder.com/1920x1080/0000ff/ffffff?text=One2' },
|
||||
{ id: 8, thumbUrl: 'https://via.placeholder.com/400x300/ffff00/ffffff', url: 'https://via.placeholder.com/1920x1080/ffff00/ffffff?text=One3' },
|
||||
{ id: 9, thumbUrl: 'https://via.placeholder.com/400x300/ff00ff/ffffff', url: 'https://via.placeholder.com/1920x1080/ff00ff/ffffff?text=One4' },
|
||||
{ id: 10, thumbUrl: 'https://via.placeholder.com/400x300/00ffff/ffffff', url: 'https://via.placeholder.com/1920x1080/00ffff/ffffff?text=One5' },
|
||||
{ id: 11, thumbUrl: 'https://via.placeholder.com/400x300/ffffff/000000', url: 'https://via.placeholder.com/1920x1080/ffffff/000000?text=One6' },
|
||||
{ id: 12, thumbUrl: 'https://via.placeholder.com/400x300/000000/ffffff', url: 'https://via.placeholder.com/1920x1080/000000/ffffff?text=One7' }
|
||||
]
|
||||
},
|
||||
{ title: 'The Longest Title for a Gallery That You Could Ever Imagine (Unless You Have a Really Good Imagination - And Then You Could Probably Think of a Really Big One)',
|
||||
id: 3,
|
||||
featuredImage: 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/music-4-600x400.jpg',
|
||||
images: [
|
||||
{ id: 13, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 14, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 24, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 33, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' }
|
||||
]
|
||||
},
|
||||
{ title: 'Gallery Three',
|
||||
id: 4,
|
||||
featuredImage: 'https://via.placeholder.com/600x400',
|
||||
images: [
|
||||
{ id: 56, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 3456, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 947, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 837, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' }
|
||||
]
|
||||
},
|
||||
{ title: 'Gallery Four',
|
||||
id: 5,
|
||||
featuredImage: 'https://via.placeholder.com/600x400',
|
||||
images: [
|
||||
{ id: 0, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 1, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 2, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 3, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' }
|
||||
]
|
||||
},
|
||||
{ title: 'Gallery Five',
|
||||
id: 6,
|
||||
featuredImage: 'https://via.placeholder.com/600x400',
|
||||
images: [
|
||||
{ id: 0, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 1, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 2, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 3, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' }
|
||||
]
|
||||
},
|
||||
{ title: 'Gallery Six',
|
||||
id: 7,
|
||||
featuredImage: 'https://via.placeholder.com/600x400',
|
||||
images: [
|
||||
{ id: 0, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 1, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 2, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' },
|
||||
{ id: 3, thumbUrl: 'https://via.placeholder.com/400x300', url: 'https://via.placeholder.com/1920x1080' }
|
||||
]
|
||||
},
|
||||
]
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue