Skip to content

Commit

Permalink
✨ : add vue component to manage navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubuisson committed Aug 2, 2019
1 parent b4d7ff9 commit 87249eb
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main/resources/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
28. Custom style for stack logs
29. Custom style for wizard
30. Custom style for module description
31. Custom style for navigation
-------------------------------------------------------------------*/

Expand Down Expand Up @@ -3691,4 +3692,18 @@ ul.messenger.messenger-fixed.messenger-on-top.custom-messenger-on-top {
height: 2px;
width: 100%;
background-color: #5c4ee5;
}

/*------------------------------------------------------------------
31. Custom style for navigation
-------------------------------------------------------------------*/

.navigation .breadcrumb {
background: transparent;
padding: 0;
margin: 0;
}

.navigation .breadcrumb .breadcrumb-item.active {
color: #0971b8;
}
32 changes: 32 additions & 0 deletions src/main/resources/templates/vue_templates/breadcrumb.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template id="breadcrumb">
<h2 class="navigation">
<b-breadcrumb :items="items"></b-breadcrumb>
</h2>
</template>

<script>
let menu = function (stackId) {
return {
index: [{text: 'Dashboard'}],
modules: [{text: 'Modules'}],
new_stack: [{text: 'Modules', href: '/modules'}, {text: 'Stack creation'}],
module: [{text: 'Modules', href: '/modules'}, {text: 'Module edition'}],
module_description: [{text: 'Modules', href: '/modules'}, {text: 'Module description'},],
stacks: [{text: 'Stacks'}],
stack: [{text: 'Stacks', href: '/stacks'}, {text: 'Stack'}],
job: [{text: 'Stacks', href: '/stacks'}, {text: 'Stack', href: `/stacks/${stackId}`}, {text: 'Job'}],
settings: [{text: 'Settings'}],
}
};
Vue.component('breadcrumb', {
template: '#breadcrumb',
data: () => ({
items: [],
}),
props: ['page', 'stackId'],
created: function () {
this.items = menu(this.stackId)[this.page];
}
});
</script>

0 comments on commit 87249eb

Please sign in to comment.