Merge branch 'master' into devFront

pull/19/head
Rémi Doreau 2018-06-06 10:45:32 +02:00 committed by GitHub
commit 45505b7498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11640 additions and 27 deletions

11597
client/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -134,24 +134,21 @@ class App extends Component {
</button> </button>
<h5 className="scoreTitle">Your score is {this.state.score}</h5> <h5 className="scoreTitle">Your score is {this.state.score}</h5>
</Modal> </Modal>
<h1>Am I late ?</h1>
<header className="App_header"> <header className="App_header">
{this.state.pastQuestion ? header : null} {this.state.pastQuestion ? header : null}
<h1>Am I late ?</h1>
</header> </header>
<div className="jumbotron"> <div className="jumbotron">
<div className="currentSection vertical-center container"> <div className="currentSection vertical-center container">
<h1 className="currentState">{this.state.currentQuestion}</h1> <h1 className="currentState">{this.state.currentQuestion}</h1>
{this.state.currentSticker ? {this.state.currentSticker ?
<img src={this.state.currentSticker} height="92" width="92" /> <img src={this.state.currentSticker} height="92" width="92" />
:null}
<h2 className="currentQuestion">Je fais quoi ?</h2>
<div className="currentOptions"> <div className="currentOptions">
{this.state.currentResponses ? currentOptions : null} {this.state.currentResponses ? currentOptions : null}
</div> </div>
<p>Votre score : {this.state.score}</p>
</div> </div>
</div> </div>
Votre score : {this.state.score}
</div> </div>
); );
} }

View File

@ -5,14 +5,21 @@ class Home extends Component {
render() { render() {
return ( return (
<div className="App"> <div className="App home">
<h2 className="App_intro">You are Ariel, a teacher at <strong>HETIC</strong>. < br /> <div className="App_box">
You had a class at <strong>9 AM</strong> but you're late. So late.< br /> <h1 className="App_intro" style={{textAlign:'center'}}>Am I late ?</h1>
You get out of the bed, it's half past 9.< br />
You have to get into the class before <strong>10 AM</strong>.< br /> <h2 className="App_intro">
<p>You are Ariel, a teacher at <strong>HETIC</strong>.</p>
<p>You had a class at <strong>9 AM</strong> but you're late. So late.</p>
<p>It's time to get out of the bed, it's half past 9.</p>
<p>You have to get into the class before <strong>10 AM</strong>.</p>
<p>Welcome to the grind.</p>
</h2> </h2>
<a href="/app" className="btn_app"><strong>Welcome to the grind</strong></a> <div>
<a href="/app" className="btn_app"><strong>Start playing now</strong></a>
</div>
</div>
</div> </div>
) )
} }

View File

@ -1,4 +1,3 @@
import React from 'react' import React from 'react'
import { Switch, Route } from 'react-router-dom' import { Switch, Route } from 'react-router-dom'
import Home from './Home' import Home from './Home'

View File

@ -1,8 +1,17 @@
.App.home {
display: flex;
align-items: center;
justify-content: center;
}
.App.home .App_box {
max-width: 50%;
}
.App_intro { .App_intro {
line-height: 1.25em; line-height: 1.25em;
text-align: left; text-align: left;
display: inline-block; display: block;
margin-top: 33vh;
text-decoration: none; text-decoration: none;
} }

View File

@ -53,27 +53,27 @@ class AppFixtures extends Fixture
{ {
return [ return [
[ [
"text" => "ma question 1", "text" => "2 gilberts arrivent, je fais quoi ?",
"responses" => [ "responses" => [
[ [
"text" => "option1", "text" => "Je fais ci",
], ],
[ [
"text" => "option2", "text" => "Je fais ça",
], ],
] ]
], ],
[ [
"text" => "ma question 2", "text" => "olala VM inc",
"responses" => [ "responses" => [
[ [
"text" => "option1", "text" => "j'abandonne",
], ],
[ [
"text" => "option2", "text" => "oui",
], ],
[ [
"text" => "option3", "text" => "non",
], ],
] ]
] ]
@ -84,6 +84,10 @@ class AppFixtures extends Fixture
{ {
return [ return [
'http://image.noelshack.com/fichiers/2017/30/4/1501188178-jesusbestreup.png', 'http://image.noelshack.com/fichiers/2017/30/4/1501188178-jesusbestreup.png',
'https://risibank.fr/cache/stickers/d1/188-static.png',
'https://risibank.fr/cache/stickers/d325/32563-static.png',
'https://risibank.fr/cache/stickers/d456/45638-static.png',
'https://risibank.fr/cache/stickers/d341/34135-static.png',
]; ];
} }