added login, first preparation for menu
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<nav>
|
||||
<ul>
|
||||
<li v-for="item in menuItems" :key="item.text">
|
||||
<li v-for="item in menu" :key="item.text">
|
||||
<a href="#">{{ $t(`navigation.${item.text}`) }}</a>
|
||||
<ul v-if="item.submenu">
|
||||
<li v-for="subitem in item.submenu" :key="subitem.text">
|
||||
@@ -18,16 +18,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'AppNavigation',
|
||||
data() {
|
||||
return {
|
||||
menuItems: [
|
||||
{ text: 'home' },
|
||||
{ text: 'about', submenu: [{ text: 'team' }, { text: 'company' }] },
|
||||
{ text: 'services', submenu: [{ text: 'consulting' }, { text: 'development' }] }
|
||||
]
|
||||
};
|
||||
computed: {
|
||||
...mapGetters('menu'),
|
||||
},
|
||||
created() {
|
||||
if(this.$store.getters.hashedId) {
|
||||
this.$store.dispatch('loadMenu');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
accessMailbox() {
|
||||
@@ -43,11 +44,12 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
@import '../assets/styles.scss';
|
||||
|
||||
nav,
|
||||
nav > ul{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #343a40;
|
||||
color: white;
|
||||
background-color: #F9A22C;
|
||||
color: #000000;
|
||||
padding: 10px;
|
||||
flex-direction: row;
|
||||
}
|
||||
@@ -59,7 +61,7 @@ li {
|
||||
margin: 5px 0;
|
||||
}
|
||||
a {
|
||||
color: white;
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
}
|
||||
.right-block {
|
||||
|
||||
Reference in New Issue
Block a user