1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-23 17:56:28 +02:00

cyland landing

This commit is contained in:
diminator 2015-08-19 14:48:22 +02:00
parent 6d8d318e8d
commit b1703b6284
2 changed files with 33 additions and 9 deletions

View File

@ -3,6 +3,10 @@
import React from 'react';
import Router from 'react-router';
import WhitelabelActions from '../../../../../actions/whitelabel_actions';
import WhitelabelStore from '../../../../../stores/whitelabel_store';
import ButtonLink from 'react-router-bootstrap/lib/ButtonLink';
import ButtonGroup from 'react-bootstrap/lib/ButtonGroup';
@ -18,17 +22,21 @@ let CylandLanding = React.createClass({
getInitialState() {
return mergeOptions(
UserStore.getState()
UserStore.getState(),
WhitelabelStore.getState()
);
},
componentDidMount() {
UserStore.listen(this.onChange);
UserActions.fetchCurrentUser();
WhitelabelStore.listen(this.onChange);
WhitelabelActions.fetchWhitelabel();
},
componentWillUnmount() {
UserStore.unlisten(this.onChange);
WhitelabelStore.unlisten(this.onChange);
},
onChange(state) {
@ -46,22 +54,29 @@ let CylandLanding = React.createClass({
<div className="container ascribe-form-wrapper">
<div className="row">
<div className="col-xs-12 wp-landing-wrapper">
<div className="row">
<img src="https://s3.amazonaws.com/upload.uxpin/files/308247/312701/logo.gif" />
<div className="row" style={{border: '1px solid #CCC', padding: '2em'}}>
<img src={this.state.whitelabel.logo} width="400px"/>
<div style={{marginTop: '1em'}}>
Submissions to Cyland Archive are powered by
<span>
<span> ascribe </span>
<span className="glyph-ascribe-spool-chunked ascribe-color"></span>
</span>
</div>
</div>
<div className="row">
<div className="row" style={{border: '1px solid #CCC', borderTop: 'none', padding: '2em'}}>
<div className="col-sm-6">
<div>
<p>
Existing ascribe user?
</div>
</p>
<ButtonLink to="login">
Log in
</ButtonLink>
</div>
<div className="col-sm-6">
<div>
<p>
Do you need an account?
</div>
</p>
<ButtonLink to="signup">
Sign up
</ButtonLink>

View File

@ -10,10 +10,19 @@ import GlobalNotification from '../../global_notification';
let RouteHandler = Router.RouteHandler;
let WalletApp = React.createClass({
mixins: [Router.State],
render() {
let header = null;
if (this.isActive('landing') || this.isActive('login') || this.isActive('signup')) {
header = (
<div className="hero"/>);
} else {
header = <Header showAddWork={false} />;
}
return (
<div className="container ascribe-prize-app">
<Header />
{header}
<RouteHandler />
<GlobalNotification />
<div id="modal" className="container"></div>