services api calls

This commit is contained in:
ManjaroOne666 2019-02-12 12:18:35 +00:00
parent 08f9ba6bf7
commit f5d9e92b5c
3 changed files with 38 additions and 40 deletions

33
TODO.md
View File

@ -40,4 +40,37 @@
'a fleeting eternity', 'a fleeting eternity',
'I imagine myself', 'I imagine myself',
], ],
//services
imageUrl: "https://via.placeholder.com/1920x1080",
services: [
{
'heading': 'Portraits',
'imageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-portraits.jpg',
'backgroundImageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-portraits.jpg',
'html': '<p>Corporate portraits and publicity photos for printed materials, including annual reports and newsletters.</p>',
'linkUrl': '/galleries?gallery=0',
},
{
'heading': 'Dance',
'imageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-dance.jpg',
'backgroundImageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-dance.jpg',
'html': '<p>Photography and video production of dancers and performances for print, web, and promotion.</p>',
'linkUrl': '/galleries?gallery=1',
},
{
'heading': 'Music',
'imageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-music.jpg',
'backgroundImageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-music.jpg',
'html': '<p>Photography and video of musical performances and portraits for print and the web, CD covers, and publicity photos.</p>',
'linkUrl': '/galleries?gallery=2',
},
{
'heading': 'Events',
'imageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-events.jpg',
'backgroundImageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-events.jpg',
'html': '<p>Photography and video production for your corporate, organisational and personal events and celebrations.</p>',
'linkUrl': '/galleries?gallery=3',
},
]
``` ```

View File

@ -96,10 +96,6 @@ export default {
}, },
}, },
created () {
// this.$store.dispatch('navigation/load')
},
mounted () { mounted () {
const mq = window.matchMedia("(min-width: 40em)") const mq = window.matchMedia("(min-width: 40em)")
this.loadMenuImages = mq.matches this.loadMenuImages = mq.matches

View File

@ -86,42 +86,11 @@ export default {
}, },
}, },
asyncData () { async asyncData ({ $axios }) {
return new Promise((resolve, reject) => { let { services } = await $axios.$get('api/v1/services')
resolve({ let { imageUrl } = await $axios.$get('api/v1/page/services')
imageUrl: "https://via.placeholder.com/1920x1080",
services: [ return { services, imageUrl }
{
'heading': 'Portraits',
'imageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-portraits.jpg',
'backgroundImageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-portraits.jpg',
'html': '<p>Corporate portraits and publicity photos for printed materials, including annual reports and newsletters.</p>',
'linkUrl': '/galleries?gallery=0',
},
{
'heading': 'Dance',
'imageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-dance.jpg',
'backgroundImageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-dance.jpg',
'html': '<p>Photography and video production of dancers and performances for print, web, and promotion.</p>',
'linkUrl': '/galleries?gallery=1',
},
{
'heading': 'Music',
'imageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-music.jpg',
'backgroundImageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-music.jpg',
'html': '<p>Photography and video of musical performances and portraits for print and the web, CD covers, and publicity photos.</p>',
'linkUrl': '/galleries?gallery=2',
},
{
'heading': 'Events',
'imageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-events.jpg',
'backgroundImageUrl': 'https://marcleopold.isnet.uk/wp-content/uploads/2017/07/services-events.jpg',
'html': '<p>Photography and video production for your corporate, organisational and personal events and celebrations.</p>',
'linkUrl': '/galleries?gallery=3',
},
]
})
})
}, },
} }
</script> </script>