-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
58 lines (50 loc) · 1.98 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<head>
<title>Web Version of Yo</title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<link href="style.css" rel="stylesheet" type="text/css" media="all">
<!-- React JS -->
<script src="vendor/react-0.10.0.min.js"></script>
<script src="vendor/JSXTransformer-0.10.0.js"></script>
<!-- Firebase JS -->
<script src="vendor/firebase.js"></script>
<!-- Firebase Login JS -->
<script src="vendor/firebase-simple-login.js"></script>
<!-- ReactFire -->
<script src="vendor/reactfire.min.js"></script>
</head>
<body>
<div id="mount"></div>
<script type="text/jsx" src="coreComponents.js"></script>
<script type="text/jsx">
/** @jsx React.DOM */
// APP COMPONENT
var App = React.createClass({
mixins : [ReactFireMixin],
componentWillMount : function() {
var newRef = new Firebase(baseUrl + '/users/special-user-for-demo');
this.bindAsObject(newRef, 'user');
},
getInitialState : function() {
return {
name : 'special-user-for-demo',
user : {}
};
},
render : function() {
return (
<div>
<h3>My Web Version of Yo using React and Firebase</h3>
<div className="margin-bottom">This is a demo page signed in with the username "special-user-for-demo"<br/>You can actually sign in via Twitter <a href="authenticated.html">here</a>.</div>
<UserDisplay user={this.state.user} />
<PeopleToYo name={this.state.name} />
<YoDisplay user={this.state.user} name={this.state.name} />
<h5>Made by <a href="https://twitter.com/davidchizzle">@davidchizzle</a> from <a href="http://davidandsuzi.com">davidandsuzi.com</a></h5>
</div>
);
}
});
React.renderComponent(<App />, document.getElementById('mount'));
</script>
</body>
</html>