From c2eda5c0f25850d1c64ed238458e2bd696d06cc3 Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Sat, 9 Jun 2018 18:13:47 +0200 Subject: Fix home screen style --- frontend/src/components/home/ChooseNameForm.jsx | 42 +++++++++++++++++++ frontend/src/components/home/Home.css | 13 ++++++ frontend/src/components/home/Home.jsx | 13 ++++++ .../src/components/home/background-zeus-temple.jpg | Bin 0 -> 571089 bytes frontend/src/components/home/logo-7-wonders.png | Bin 0 -> 301442 bytes frontend/src/global-styles.css | 10 ----- frontend/src/index.js | 1 - .../scenes/SplashScreen/components/HomeLayout.js | 18 --------- .../components/background-zeus-temple.jpg | Bin 571089 -> 0 bytes .../SplashScreen/components/logo-7-wonders.png | Bin 301442 -> 0 bytes frontend/src/scenes/SplashScreen/index.js | 45 --------------------- frontend/src/scenes/index.js | 6 +-- 12 files changed, 71 insertions(+), 77 deletions(-) create mode 100644 frontend/src/components/home/ChooseNameForm.jsx create mode 100644 frontend/src/components/home/Home.css create mode 100644 frontend/src/components/home/Home.jsx create mode 100644 frontend/src/components/home/background-zeus-temple.jpg create mode 100644 frontend/src/components/home/logo-7-wonders.png delete mode 100644 frontend/src/scenes/SplashScreen/components/HomeLayout.js delete mode 100644 frontend/src/scenes/SplashScreen/components/background-zeus-temple.jpg delete mode 100644 frontend/src/scenes/SplashScreen/components/logo-7-wonders.png delete mode 100644 frontend/src/scenes/SplashScreen/index.js diff --git a/frontend/src/components/home/ChooseNameForm.jsx b/frontend/src/components/home/ChooseNameForm.jsx new file mode 100644 index 00000000..119fc851 --- /dev/null +++ b/frontend/src/components/home/ChooseNameForm.jsx @@ -0,0 +1,42 @@ +// @flow +import { Button, Classes, InputGroup, Intent } from '@blueprintjs/core'; +import React, { Component } from 'react'; +import { connect } from 'react-redux'; +import { actions } from '../../redux/players'; + +export type ChooseNameFormPresenterProps = { + chooseUsername: (username: string) => void, +} + +class ChooseNameFormPresenter extends Component { + _username = ''; + + play = e => { + e.preventDefault(); + if (this._username !== undefined) { + this.props.chooseUsername(this._username); + } + }; + + render() { + return ( +
+ (this._username = e.target.value)} + rightElement={this.renderSubmit()} + /> + + ); + } + + renderSubmit = () => ( +