This repository has been archived by the owner on Aug 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restructure components dir, start work on one-up view
- Loading branch information
Christopher De Cairos
committed
Jan 23, 2015
1 parent
b4e708b
commit 3d41357
Showing
14 changed files
with
128 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
var React = require("react"); | ||
|
||
var FeatureMake = React.createClass({ | ||
getInitialState: function() { | ||
return { | ||
featured: this.props.featured | ||
}; | ||
}, | ||
onClick: function() { | ||
this.props.onClick(); | ||
}, | ||
render: function() { | ||
var featureClass = "make-feature-toggle fa fa-4 "; | ||
|
||
if ( this.state.featured ) { | ||
featureClass += "fa-star"; | ||
} else { | ||
featureClass += "fa-star-o"; | ||
} | ||
|
||
return ( | ||
<i className={featureClass} onClick={this.onClick}></i> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = FeatureMake; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
var React = require("react"); | ||
|
||
var Navigate = React.createClass({ | ||
getInitialState: function() { | ||
var delta = +this.props.delta; | ||
if (typeof delta !== "number" || delta === 0) { | ||
delta = 1; | ||
} | ||
return { | ||
delta: delta | ||
}; | ||
}, | ||
onNavigate: function() { | ||
this.props.onNavigate(this.state.delta); | ||
}, | ||
render: function() { | ||
var navigationClass = "firehose-make-nav fa fa-4 "; | ||
|
||
if ( this.state.delta > 0 ) { | ||
navigationClass += "fa-arrow-right"; | ||
} else { | ||
navigationClass += "fa-arrow-left"; | ||
} | ||
|
||
return ( | ||
<i className={navigationClass} onClick={this.onNavigate}></i> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = Navigate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var React = require("react"); | ||
|
||
var Trash = React.createClass({ | ||
render: function() { | ||
return ( | ||
<i className="firehose-trash-make fa fa-trash fa-4" on></i> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = Trash; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
var React = require("react"); | ||
var Trash = require("../shared/Trash.jsx"); | ||
var FeatureMake = require("../shared/FeatureMake.jsx"); | ||
var Navigation = require("../shared/Navigate.jsx"); | ||
|
||
var MakeDetails = React.createClass({ | ||
onNavigate: function(delta) { | ||
console.log( delta ); | ||
}, | ||
render: function() { | ||
return ( | ||
<div> | ||
<div>AVATAR</div> | ||
<div> | ||
<span>TITLE</span> | ||
<span>AuthorLink</span> | ||
</div> | ||
<div> | ||
<Trash /> | ||
<FeatureMake /> | ||
<Navigation onNavigate={this.onNavigate} delta="-1"/> | ||
<Navigation onNavigate={this.onNavigate} delta="1" /> | ||
</div> | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = MakeDetails; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var React = require("react"); | ||
|
||
var MakePreview = React.createClass({ | ||
render: function() { | ||
return ( | ||
<iframe src="https://chrisdecairos.ca" className="make-preview"></iframe> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = MakePreview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
var React = require("react"); | ||
var MakeDetails = require("./MakeDetails.jsx"); | ||
var MakePreview = require("./MakePreview.jsx"); | ||
|
||
var OneUpView = React.createClass({ | ||
render: function() { | ||
return ( | ||
<div> | ||
<MakeDetails /> | ||
<MakePreview /> | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
module.exports = OneUpView; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.