From 66cc04d36c6dcac04421d9d8df4b8f066595d3ed Mon Sep 17 00:00:00 2001 From: devfake Date: Sun, 21 Jun 2015 16:34:27 +0200 Subject: [PATCH] change landing view rendering to php --- site/client/app/app.js | 4 +- site/client/app/components/landing.js | 15 ------- site/client/app/components/navigation.js | 5 +++ site/client/app/routes.js | 11 +----- site/client/app/views/landing.html | 31 --------------- site/client/app/views/lobby.html | 6 ++- site/client/app/views/navigation.html | 7 ++++ site/client/assets/sass/_inner.scss | 20 ++++++++++ site/client/assets/sass/_landing.scss | 9 +++++ site/client/assets/sass/_nav.scss | 36 +++++++++++++++++ site/client/assets/sass/app.scss | 3 +- site/client/views/app.blade.php | 21 +++++++++- site/client/views/inner.blade.php | 11 ++++++ site/client/views/landing.blade.php | 37 ++++++++++++++++++ .../views/partials/modals/login.blade.php | 17 -------- .../assets/img/{load.gif => action-load.gif} | Bin site/public/assets/img/guest-load.gif | Bin 0 -> 1737 bytes site/server/app/Exceptions/Handler.php | 2 +- site/server/app/Http/routes.php | 13 +++++- 19 files changed, 167 insertions(+), 81 deletions(-) delete mode 100644 site/client/app/components/landing.js create mode 100644 site/client/app/components/navigation.js delete mode 100644 site/client/app/views/landing.html create mode 100644 site/client/app/views/navigation.html create mode 100644 site/client/assets/sass/_nav.scss create mode 100644 site/client/views/inner.blade.php create mode 100644 site/client/views/landing.blade.php delete mode 100644 site/client/views/partials/modals/login.blade.php rename site/public/assets/img/{load.gif => action-load.gif} (100%) create mode 100644 site/public/assets/img/guest-load.gif diff --git a/site/client/app/app.js b/site/client/app/app.js index 790d8d3..ee3091e 100644 --- a/site/client/app/app.js +++ b/site/client/app/app.js @@ -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') } }); diff --git a/site/client/app/components/landing.js b/site/client/app/components/landing.js deleted file mode 100644 index b7e1699..0000000 --- a/site/client/app/components/landing.js +++ /dev/null @@ -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); - } - -}; \ No newline at end of file diff --git a/site/client/app/components/navigation.js b/site/client/app/components/navigation.js new file mode 100644 index 0000000..9bce8fc --- /dev/null +++ b/site/client/app/components/navigation.js @@ -0,0 +1,5 @@ +module.exports = { + + template: require('../views/navigation.html') + +}; \ No newline at end of file diff --git a/site/client/app/routes.js b/site/client/app/routes.js index d300cce..1c39c52 100644 --- a/site/client/app/routes.js +++ b/site/client/app/routes.js @@ -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 }) } } \ No newline at end of file diff --git a/site/client/app/views/landing.html b/site/client/app/views/landing.html deleted file mode 100644 index 7013383..0000000 --- a/site/client/app/views/landing.html +++ /dev/null @@ -1,31 +0,0 @@ - - -
-
- Gwent - -

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

- -
- -
- - - -
- - -
-
- - or - - Play as guest - - -
-
-
diff --git a/site/client/app/views/lobby.html b/site/client/app/views/lobby.html index f0b2493..09ff912 100644 --- a/site/client/app/views/lobby.html +++ b/site/client/app/views/lobby.html @@ -1,9 +1,11 @@
- Gwent + Gwent + +
- + blaa
diff --git a/site/client/app/views/navigation.html b/site/client/app/views/navigation.html new file mode 100644 index 0000000..875830d --- /dev/null +++ b/site/client/app/views/navigation.html @@ -0,0 +1,7 @@ + diff --git a/site/client/assets/sass/_inner.scss b/site/client/assets/sass/_inner.scss index 4911f82..aa12417 100644 --- a/site/client/assets/sass/_inner.scss +++ b/site/client/assets/sass/_inner.scss @@ -3,7 +3,27 @@ body.inner { background-size: cover; } +.logo-medium { + float: left; +} + .container-inner { width: 100%; padding: 40px; +} + +main { + float: left; + width: 70%; + padding: 20px; + height: calc(100vh - 300px); + min-height: 400px; + + background: -moz-linear-gradient(top, rgba(8,13,20,1) 17%, rgba(8,13,20,0.65) 46%, rgba(239,239,239,0) 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(17%,rgba(8,13,20,1)), color-stop(46%,rgba(8,13,20,0.65)), color-stop(100%,rgba(239,239,239,0))); + background: -webkit-linear-gradient(top, rgba(8,13,20,1) 17%,rgba(8,13,20,0.65) 46%,rgba(239,239,239,0) 100%); + background: -o-linear-gradient(top, rgba(8,13,20,1) 17%,rgba(8,13,20,0.65) 46%,rgba(239,239,239,0) 100%); + background: -ms-linear-gradient(top, rgba(8,13,20,1) 17%,rgba(8,13,20,0.65) 46%,rgba(239,239,239,0) 100%); + background: linear-gradient(to bottom, rgba(8,13,20,1) 17%,rgba(8,13,20,0.65) 46%,rgba(239,239,239,0) 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#080d14', endColorstr='#00efefef',GradientType=0 ); } \ No newline at end of file diff --git a/site/client/assets/sass/_landing.scss b/site/client/assets/sass/_landing.scss index 4621c97..9aeeafd 100644 --- a/site/client/assets/sass/_landing.scss +++ b/site/client/assets/sass/_landing.scss @@ -3,6 +3,15 @@ body.landing { background-size: cover; } +.icon-guest-load { + background: url(../img/guest-load.gif) #ca5a07 no-repeat; + width: 16px; + height: 16px; + float: right; + margin: 5px -7px 0 7px; + display: none; +} + .wrap-landing { max-width: 900px; margin: 0 auto; diff --git a/site/client/assets/sass/_nav.scss b/site/client/assets/sass/_nav.scss new file mode 100644 index 0000000..65a03be --- /dev/null +++ b/site/client/assets/sass/_nav.scss @@ -0,0 +1,36 @@ +nav { + float: left; + margin: 30px 0 0 0; + clear: both; + + ul { + float: left; + margin: 0; + } + + li { + float: left; + } + + a { + color: #8798ac; + text-shadow: 0 0 10px rgba(255, 255, 255, 0.6); + font-size: 19px; + text-transform: uppercase; + font-weight: 300; + padding: 12px 25px; + float: left; + + @include transition(color); + + &:hover { + color: #c5cfda; + } + + &.active { + color: $main; + text-shadow: none; + background: rgba(#080d14, .9); + } + } +} \ No newline at end of file diff --git a/site/client/assets/sass/app.scss b/site/client/assets/sass/app.scss index 7c54197..eefc324 100644 --- a/site/client/assets/sass/app.scss +++ b/site/client/assets/sass/app.scss @@ -9,4 +9,5 @@ 'modal', 'form', 'landing', -'inner'; \ No newline at end of file +'inner', +'nav'; \ No newline at end of file diff --git a/site/client/views/app.blade.php b/site/client/views/app.blade.php index c5d2fb3..aa3623e 100644 --- a/site/client/views/app.blade.php +++ b/site/client/views/app.blade.php @@ -12,12 +12,29 @@ - + - + @yield('content') + + \ No newline at end of file diff --git a/site/client/views/inner.blade.php b/site/client/views/inner.blade.php new file mode 100644 index 0000000..2db5a65 --- /dev/null +++ b/site/client/views/inner.blade.php @@ -0,0 +1,11 @@ +@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 new file mode 100644 index 0000000..2988c4d --- /dev/null +++ b/site/client/views/landing.blade.php @@ -0,0 +1,37 @@ +@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/client/views/partials/modals/login.blade.php b/site/client/views/partials/modals/login.blade.php deleted file mode 100644 index 0c5fd21..0000000 --- a/site/client/views/partials/modals/login.blade.php +++ /dev/null @@ -1,17 +0,0 @@ - \ No newline at end of file diff --git a/site/public/assets/img/load.gif b/site/public/assets/img/action-load.gif similarity index 100% rename from site/public/assets/img/load.gif rename to site/public/assets/img/action-load.gif diff --git a/site/public/assets/img/guest-load.gif b/site/public/assets/img/guest-load.gif new file mode 100644 index 0000000000000000000000000000000000000000..07052d56014afc546b664b4e4473bc7e81bdcbb7 GIT binary patch literal 1737 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%iGcQOQAo0^2Kv3)5Hfo)4ET?8 z)RRG&pl=S@mzP3YhB4&GOogONox(jci=gvdniM5eeGfVrq=+XxOQ#Dul+BjuOW?G?qWYQ-&-(PKb)exb9#C#G4DxGxECmJQ|}A zjLu455goKB_R+NP=vb0o+RvyGBT*l zWutIyN@8_2LE|Q49&0Y}G(&@EKNqNyK+1}7z$jRHWO$5p3Lx4)xiB3nN!6IStQF$e zXIzudPpiIU(&8L8HZqH%S{5uSx3fJfI~sH9f^+m7k=h;|b9(#5JMUiG^*Awqx^7cA zvC2@WGwM>5EYMO`5sxsdD^nO8%|kJuLUkD>re38%%i5CcC{$qsT&0&7#yM!s){ion z+%w*b704k!_alzCAPwecI!EgT5-5vpl(Krqx}C6oS z%amts96wf3>^fDe2)7kX$36c)9IMijC`#fijbkLzY_%GgG**ig=@6QjmD^7dMhvEA zI{JYq!3s;~Wep-04UBH2261}}jLA9LuT44x+Uha}t@RSwithSection('inner') + ->withType('server'); + }); + get('/', function() { - return view('app'); + if(Auth::check()) { + return redirect('/lobby'); + } + + return view('landing') + ->withSection('landing'); }); \ No newline at end of file