1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-11-20 11:26:54 +00:00

rewrite navigation

This commit is contained in:
devfake 2015-06-22 19:16:22 +02:00
parent 7dbb617323
commit fa7243a871
5 changed files with 31 additions and 8 deletions

View File

@ -1,5 +1,11 @@
module.exports = {
template: "<h2>deckbuilder hier</h2>"
template: "<h2>deckbuilder hier</h2>",
data: function() {
return {
}
}
};

View File

@ -2,6 +2,8 @@ module.exports = {
template: require('../views/inner.html'),
inherit: true,
data: function() {
return {
modal: false

View File

@ -6,6 +6,17 @@ module.exports = {
inherit: true,
data: function() {
return {
// todo: work with slug filter
navigation: [
{ name: 'Lobby', route: '/lobby' },
{ name: 'Deck Builder', route: '/deck-builder' },
{ name: 'Highscore', route: '/highscore' }
]
}
},
methods: {
searchMatch: function() {
this.modal = true;

View File

@ -1,8 +1,10 @@
<nav>
<ul>
<li><a class="active" v-link="/lobby">Lobby</a></li>
<li><a v-link="/deck-builder">Deck Builder</a></li>
<li><a v-on="click: changeView('highscore')">Highscore</a></li>
<li v-repeat="nav: navigation">
<a v-link="{{ nav.route }}" class="{{ route.path == nav.route ? 'active' : '' }}">
{{ nav.name }}
</a>
</li>
<li class="sub-nav" v-on="click: searchMatch"><a>Quick Match</a></li>
</ul>

View File

@ -1,8 +1,11 @@
<?php
get('/lobby', function() {
return view('app')
->withSection('inner');
return view('app')->withSection('inner');
});
get('/deck-builder', function() {
return view('app')->withSection('inner');
});
get('/', function() {
@ -10,6 +13,5 @@
return redirect('/lobby');
}
return view('app')
->withSection('landing');
return view('app')->withSection('landing');
});