diff --git a/site/client/app/app.js b/site/client/app/app.js
new file mode 100644
index 0000000..7ebeeb2
--- /dev/null
+++ b/site/client/app/app.js
@@ -0,0 +1,24 @@
+var Vue = require('vue');
+var router = require('./routes');
+
+Vue.use(require('vue-resource'));
+Vue.http.headers.common['X-CSRF-TOKEN'] = $('.token').attr('content');
+
+var app = new Vue({
+
+ el: 'body',
+
+ data: {
+ name: '',
+ view: '',
+ section: ''
+ },
+
+ components: {
+ 'landing': require('./components/landing'),
+ 'lobby': require('./components/lobby')
+ }
+
+});
+
+router.init(app);
\ No newline at end of file
diff --git a/site/client/app/components/landing.js b/site/client/app/components/landing.js
new file mode 100644
index 0000000..89c7fd7
--- /dev/null
+++ b/site/client/app/components/landing.js
@@ -0,0 +1,11 @@
+module.exports = {
+
+ template: require('../views/landing.html'),
+
+ ready: function() {
+ setTimeout(function() {
+ $('.container-form-landing').addClass('active')
+ }, 400);
+ }
+
+};
\ No newline at end of file
diff --git a/site/client/app/components/lobby.js b/site/client/app/components/lobby.js
new file mode 100644
index 0000000..49ea8d7
--- /dev/null
+++ b/site/client/app/components/lobby.js
@@ -0,0 +1,5 @@
+module.exports = {
+
+ template: require('../views/lobby.html')
+
+};
\ No newline at end of file
diff --git a/site/client/app/routes.js b/site/client/app/routes.js
new file mode 100644
index 0000000..d300cce
--- /dev/null
+++ b/site/client/app/routes.js
@@ -0,0 +1,28 @@
+var Router = require('director').Router;
+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('/');
+ },
+
+ configure: function() {
+ router.configure({
+ notfound: function() {
+ router.setRoute('/')
+ }
+ })
+ }
+}
\ No newline at end of file
diff --git a/site/client/app/views/landing.html b/site/client/app/views/landing.html
new file mode 100644
index 0000000..d75d01d
--- /dev/null
+++ b/site/client/app/views/landing.html
@@ -0,0 +1,29 @@
+
+
+
+
+
+ Play The Witcher Gwent Card-Game online!
+ Play with randomly generated teams, or build your own!
+
+
+
+
+
diff --git a/site/client/app/views/lobby.html b/site/client/app/views/lobby.html
new file mode 100644
index 0000000..8cfec73
--- /dev/null
+++ b/site/client/app/views/lobby.html
@@ -0,0 +1 @@
+LOBBY HIER BLA BLA
\ No newline at end of file
diff --git a/site/client/assets/sass/_base.scss b/site/client/assets/sass/_base.scss
index 0f3c2cd..8295bdb 100644
--- a/site/client/assets/sass/_base.scss
+++ b/site/client/assets/sass/_base.scss
@@ -13,6 +13,11 @@ body {
font-family: 'Titillium Web', sans-serif;
}
+body.inner {
+ background: url(../img/inner-bg.jpg) center top no-repeat;
+ background-size: cover;
+}
+
::-moz-selection {
background: rgba($main, .99);
color: #fff;
diff --git a/site/client/assets/sass/_landing.scss b/site/client/assets/sass/_landing.scss
index a13bd17..930106b 100644
--- a/site/client/assets/sass/_landing.scss
+++ b/site/client/assets/sass/_landing.scss
@@ -18,7 +18,9 @@ body.landing {
width: 100%;
margin: 12% 0 0 0;
- //tablet: 9%
+ @include mq(medium) {
+ margin: 9% 0 0 0;
+ }
}
.teaser-landing {
@@ -43,7 +45,7 @@ body.landing {
opacity: 0;
&.active {
- transition: all .4s ease-in-out .2s;
+ transition: all .4s ease-in-out 0s;
margin: 60px 0;
opacity: 1;
diff --git a/site/client/assets/sass/_mixins.scss b/site/client/assets/sass/_mixins.scss
index 8259ec7..a9aa8b6 100644
--- a/site/client/assets/sass/_mixins.scss
+++ b/site/client/assets/sass/_mixins.scss
@@ -24,4 +24,16 @@ $main: #d96f1f;
@mixin transition($type: all) {
transition: $type .3s ease-in-out 0s;
+}
+
+@mixin mq($point) {
+ @if $point == big {
+ @media (max-width: 1600px) { @content; }
+ }
+ @else if $point == medium {
+ @media (max-width: 1450px) { @content; }
+ }
+ @else if $point == small {
+ @media (max-width: 600px) { @content; }
+ }
}
\ No newline at end of file
diff --git a/site/client/gulpfile.js b/site/client/gulpfile.js
index 2b214c2..5ffe772 100755
--- a/site/client/gulpfile.js
+++ b/site/client/gulpfile.js
@@ -9,4 +9,5 @@ elixir.config.publicDir = '../public/';
elixir(function(mix) {
mix.sass('app.scss');
+ mix.browserify('../../app/app.js');
});
diff --git a/site/client/package.json b/site/client/package.json
index b5d941f..573c99b 100755
--- a/site/client/package.json
+++ b/site/client/package.json
@@ -3,5 +3,10 @@
"devDependencies": {
"gulp": "^3.8.8",
"laravel-elixir": "^2.0.0"
+ },
+ "dependencies": {
+ "director": "^1.2.8",
+ "vue": "^0.12.1",
+ "vue-resource": "^0.1.3"
}
}
diff --git a/site/client/views/app.blade.php b/site/client/views/app.blade.php
index 90c1141..c5d2fb3 100644
--- a/site/client/views/app.blade.php
+++ b/site/client/views/app.blade.php
@@ -3,6 +3,7 @@
+
Gwent Online
@@ -11,16 +12,12 @@
-
+
- @yield('content')
+
-
-
-
+
\ No newline at end of file
diff --git a/site/client/views/tpl/landing.blade.php b/site/client/views/tpl/landing.blade.php
deleted file mode 100644
index a529012..0000000
--- a/site/client/views/tpl/landing.blade.php
+++ /dev/null
@@ -1,37 +0,0 @@
-@extends('app')
-
-@section('content')
-
- @include('partials.modals.login')
-
-
-
-
-
-
- Play The Witcher Gwent Card-Game online!
- Play with randomly generated teams, or build your own!
-
-
-
-
-
-
-@stop
\ No newline at end of file
diff --git a/site/public/assets/img/inner-bg.jpg b/site/public/assets/img/inner-bg.jpg
new file mode 100644
index 0000000..46ead9f
Binary files /dev/null and b/site/public/assets/img/inner-bg.jpg differ
diff --git a/site/public/assets/img/landing-bg.jpg b/site/public/assets/img/landing-bg.jpg
index 0d2e111..f7cffa2 100644
Binary files a/site/public/assets/img/landing-bg.jpg and b/site/public/assets/img/landing-bg.jpg differ
diff --git a/site/public/assets/js/core.js b/site/public/assets/js/core.js
deleted file mode 100644
index 8d16cfc..0000000
--- a/site/public/assets/js/core.js
+++ /dev/null
@@ -1,7 +0,0 @@
-$('.register-btn').on('click', function() {
- $('.icon-load').show();
-});
-
-$('.btn-login').on('click', function() {
- $('.overlay').addClass('active');
-});
\ No newline at end of file
diff --git a/site/server/app/Exceptions/Handler.php b/site/server/app/Exceptions/Handler.php
index d7f85fa..89d9fc2 100755
--- a/site/server/app/Exceptions/Handler.php
+++ b/site/server/app/Exceptions/Handler.php
@@ -1,20 +1,20 @@
withSection('landing');
+ return view('app');
});
\ No newline at end of file