mirror of
https://github.com/exane/not-gwent-online
synced 2024-10-31 10:36:53 +00:00
rewrite navigation
This commit is contained in:
parent
7dbb617323
commit
fa7243a871
@ -1,5 +1,11 @@
|
||||
module.exports = {
|
||||
|
||||
template: "<h2>deckbuilder hier</h2>"
|
||||
template: "<h2>deckbuilder hier</h2>",
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
};
|
@ -2,6 +2,8 @@ module.exports = {
|
||||
|
||||
template: require('../views/inner.html'),
|
||||
|
||||
inherit: true,
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
modal: false
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
@ -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');
|
||||
});
|
Loading…
Reference in New Issue
Block a user