initial commit

This commit is contained in:
ManjaroOne666 2019-02-02 16:41:00 +00:00
parent 0ac393b3c0
commit 79eae35b11
1 changed files with 51 additions and 0 deletions

51
store/navigation.js Normal file
View File

@ -0,0 +1,51 @@
const SITE_NAV = [
{ 'to': '/', 'text': 'Home', bgImgUrl: '/img/devices--bw.jpg'},
{ 'to': '/galleries', 'text': 'Galleries', bgImgUrl: '/img/photo-box--bw.jpg' },
{ 'to': '/services', 'text': 'Services', bgImgUrl: '/img/camera--bw.jpg' },
{ 'to': '/about', 'text': 'About Me', bgImgUrl: '/img/silhouette--dark.jpg' },
{ 'to': '/contact', 'text': 'Contact Me', bgImgUrl: '/img/mail--bw.jpg' },
]
const SOCIAL_NAV = [
{ 'to': 'https://www.instagram.com', 'text': 'Instagram', icon: 'instagram' },
{ 'to': 'https://www.facebook.com', 'text': 'Facebook', icon: 'facebook' },
{ 'to': 'https://twitter.com', 'text': 'Twitter', icon: 'twitter' },
{ 'to': 'https://uk.linkedin.com', 'text': 'LinkedIn', icon: 'linkedin' },
]
export const state = () => ({
siteNav: [],
socialNav: [],
})
export const actions = {
load ({ commit }) {
return new Promise(resolve => {
setTimeout(() => {
commit('updateSiteNav', SITE_NAV)
commit('updateSocialNav', SOCIAL_NAV)
resolve()
}, 300)
})
}
}
export const getters = {
siteNav: state => {
return state.siteNav
},
socialNav: state => {
return state.socialNav
},
}
export const mutations = {
updateSiteNav (state, navItems) {
state.siteNav = navItems
},
updateSocialNav (state, socialItems) {
state.socialNav = socialItems
},
}