1
0
mirror of https://github.com/exane/not-gwent-online synced 2025-11-08 09:08:40 +00:00

change landing view rendering to php

This commit is contained in:
devfake
2015-06-21 16:34:27 +02:00
parent 33ae055598
commit 66cc04d36c
19 changed files with 167 additions and 81 deletions

View File

@@ -15,8 +15,8 @@ var app = new Vue({
},
components: {
landing: require('./components/landing'),
lobby: require('./components/lobby')
lobby: require('./components/lobby'),
navigation: require('./components/navigation')
}
});

View File

@@ -1,15 +0,0 @@
module.exports = {
template: require('../views/landing.html'),
components: {
login: require('./modals/login')
},
ready: function() {
setTimeout(function() {
$('.container-form-landing').addClass('active')
}, 400);
}
};

View File

@@ -0,0 +1,5 @@
module.exports = {
template: require('../views/navigation.html')
};

View File

@@ -4,25 +4,18 @@ var router = new Router();
module.exports = {
init: function(app) {
router.on('/', function() {
app.view = 'landing';
app.section = 'landing';
});
router.on('/lobby', function() {
app.view = 'lobby';
app.section = 'inner';
});
this.configure();
router.init('/');
router.init();
},
configure: function() {
router.configure({
notfound: function() {
router.setRoute('/')
}
html5history: true
})
}
}

View File

@@ -1,31 +0,0 @@
<login></login>
<section class="container-landing">
<div class="wrap-landing">
<img src="assets/img/logo-big.png" width="243" height="85" alt="Gwent" class="logo-big">
<p class="teaser-landing">
Play The Witcher Gwent Card-Game online!<br>
Play with randomly generated teams, or build your own!
</p>
<div class="container-form-landing">
<form class="form-session">
<input type="text" placeholder="Username" class="field-session" autofocus>
<input type="password" placeholder="Password" class="field-session">
<div class="wrap-btn-action btn-register-action">
<input type="submit" value="Register" class="btn-action">
<i class="icon-load"></i>
</div>
</form>
<span class="choose">or</span>
<a href="#/lobby" class="btn-second btn-guest">Play as guest</a>
<a href="#" class="btn-none btn-login" v-on="click: modal = true">Login</a>
</div>
</div>
</section>

View File

@@ -1,9 +1,11 @@
<section class="container-inner">
<a href="#/lobby"><img src="assets/img/logo-medium.png" width="148" height="46" alt="Gwent" class="logo-medium"></a>
<a href="./lobby"><img src="assets/img/logo-medium.png" width="148" height="46" alt="Gwent" class="logo-medium"></a>
<navigation></navigation>
<main>
blaa
</main>
</section>

View File

@@ -0,0 +1,7 @@
<nav>
<ul>
<li><a href="#/lobby" class="active">Lobby</a></li>
<li><a href="#">Deck Builder</a></li>
<li><a href="#">Highscore</a></li>
</ul>
</nav>