diff --git a/site/client/app/app.js b/site/client/app/app.js index b8618c9..b049be2 100644 --- a/site/client/app/app.js +++ b/site/client/app/app.js @@ -15,8 +15,8 @@ var app = new Vue({ }, components: { - lobby: require('./components/lobby'), - chat: require('./components/chat') + inner: require('./components/inner'), + landing: require('./components/landing') } }); diff --git a/site/client/app/components/inner.js b/site/client/app/components/inner.js new file mode 100644 index 0000000..deea695 --- /dev/null +++ b/site/client/app/components/inner.js @@ -0,0 +1,19 @@ +module.exports = { + + template: require('../views/inner.html'), + + data: function() { + return { + modal: false + } + }, + + components: { + searchmatch: require('./modals/searchMatch'), + navigation: require('./navigation'), + chat: require('./chat'), + + lobby: require('./lobby') + } + +}; \ 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..339f7aa --- /dev/null +++ b/site/client/app/components/landing.js @@ -0,0 +1,26 @@ +var router = require('./../routes'); + +module.exports = { + + template: require('../views/landing.html'), + + inherit: true, + + ready: function() { + setTimeout(function() { + $('.container-form-landing').addClass('active') + }, 300); + }, + + methods: { + asGuest: function() { + // set localstorage for guest + $('.icon-guest-load').show(); + + setTimeout(function() { + window.location.href = './lobby'; + }, 500); + } + } + +}; \ No newline at end of file diff --git a/site/client/app/components/lobby.js b/site/client/app/components/lobby.js index 3a7edea..1e87a1d 100644 --- a/site/client/app/components/lobby.js +++ b/site/client/app/components/lobby.js @@ -2,15 +2,4 @@ module.exports = { template: require('../views/lobby.html'), - data: function() { - return { - modal: false - } - }, - - components: { - searchmatch: require('./modals/searchMatch'), - navigation: require('./navigation') - } - }; \ No newline at end of file diff --git a/site/client/app/components/modals/login.js b/site/client/app/components/modals/login.js deleted file mode 100644 index f8456c1..0000000 --- a/site/client/app/components/modals/login.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - - template: require('../../views/modals/login.html') - -}; \ No newline at end of file diff --git a/site/client/app/components/navigation.js b/site/client/app/components/navigation.js index ffcece6..9a0a48d 100644 --- a/site/client/app/components/navigation.js +++ b/site/client/app/components/navigation.js @@ -12,8 +12,8 @@ module.exports = { }, searchMatch: function() { - this.modal = true; - // trigger match functions + this.modal = true; + // trigger match functions } } diff --git a/site/client/app/views/inner.html b/site/client/app/views/inner.html new file mode 100644 index 0000000..e319baa --- /dev/null +++ b/site/client/app/views/inner.html @@ -0,0 +1,15 @@ + + +Gwent + +
+ + + +
+ +
+ +
+ + \ 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..c495841 --- /dev/null +++ b/site/client/app/views/landing.html @@ -0,0 +1,29 @@ +
+
+ Gwent + +

+ Play The Witcher Gwent Card-Game online!
+ Play with randomly generated teams, or build your own! +

+ +
+ +
+ + + +
+ + +
+
+ + or + + Play as guest + + +
+
+
\ No newline at end of file diff --git a/site/client/app/views/lobby.html b/site/client/app/views/lobby.html index d1047df..90c8d3c 100644 --- a/site/client/app/views/lobby.html +++ b/site/client/app/views/lobby.html @@ -1,11 +1 @@ -Gwent - -
- - - -
- -
- -
\ No newline at end of file +lobby \ No newline at end of file diff --git a/site/client/app/views/modals/login.html b/site/client/app/views/modals/login.html deleted file mode 100644 index 4f6fa29..0000000 --- a/site/client/app/views/modals/login.html +++ /dev/null @@ -1,17 +0,0 @@ - \ No newline at end of file diff --git a/site/client/assets/sass/_inner.scss b/site/client/assets/sass/_inner.scss index 566a2d4..cb35627 100644 --- a/site/client/assets/sass/_inner.scss +++ b/site/client/assets/sass/_inner.scss @@ -1,17 +1,13 @@ body.inner { background: url(../img/inner-bg.jpg) #162232 center top no-repeat; background-size: cover; + padding: 40px; } .logo-medium { float: left; } -.container-inner { - width: 100%; - padding: 40px; -} - main { float: left; clear: both; diff --git a/site/client/views/app.blade.php b/site/client/views/app.blade.php index b7c9479..3f3b84c 100644 --- a/site/client/views/app.blade.php +++ b/site/client/views/app.blade.php @@ -14,27 +14,14 @@ - @yield('content') + @if(Auth::check() || Request::path() != '/') + + @else + + @endif - - \ No newline at end of file diff --git a/site/client/views/inner.blade.php b/site/client/views/inner.blade.php deleted file mode 100644 index 5e37bf9..0000000 --- a/site/client/views/inner.blade.php +++ /dev/null @@ -1,17 +0,0 @@ -@extends('app') - -@section('content') - -
- - @if($type == 'server') - - @else - - @endif - - - -
- -@stop \ No newline at end of file diff --git a/site/client/views/landing.blade.php b/site/client/views/landing.blade.php deleted file mode 100644 index 2988c4d..0000000 --- a/site/client/views/landing.blade.php +++ /dev/null @@ -1,37 +0,0 @@ -@extends('app') - -@section('content') - - - -
-
- Gwent - -

- Play The Witcher Gwent Card-Game online!
- Play with randomly generated teams, or build your own! -

- -
- -
- - - -
- - -
-
- - or - - Play as guest - - -
-
-
- -@stop \ No newline at end of file diff --git a/site/server/app/Http/routes.php b/site/server/app/Http/routes.php index 0e1ab5e..4d1e212 100755 --- a/site/server/app/Http/routes.php +++ b/site/server/app/Http/routes.php @@ -1,16 +1,11 @@ withSection('inner') - ->withType('server'); + return view('app') + ->withSection('inner'); }); get('/', function() { - if(Auth::check()) { - return redirect('/lobby'); - } - - return view('landing') + return view('app') ->withSection('landing'); }); \ No newline at end of file