diff --git a/css/style.css b/css/style.css index 6739667..f9473f9 100644 --- a/css/style.css +++ b/css/style.css @@ -28,6 +28,11 @@ html, body { .launcher .category-header { padding: 40px 50px 0; font-size: 50px; + display: none; +} + +.launcher .category-header.visible { + display: block; } .launcher .category-header a.goback { diff --git a/index.html b/index.html index fc44a91..73e552b 100644 --- a/index.html +++ b/index.html @@ -39,20 +39,17 @@ - - - - - diff --git a/js/app.jsx b/js/app.jsx new file mode 100644 index 0000000..ce24387 --- /dev/null +++ b/js/app.jsx @@ -0,0 +1,29 @@ +var React = require('react'); +var CategoryHeader = require('./components/category-header.jsx'); +var AppList = require('./components/app-list.jsx'); + +var App = React.createClass({ + + getInitialState: function() { + return { + currentItem: null + }; + }, + + componentDidMount: function() { + + }, + + render: function() { + return ( +
+ + +
+ ); + } + +}); + +var rootEl = document.getElementById('pitaya'); +React.render(, rootEl); diff --git a/js/components/app-list.jsx b/js/components/app-list.jsx new file mode 100644 index 0000000..8ddda0f --- /dev/null +++ b/js/components/app-list.jsx @@ -0,0 +1,12 @@ +var React = require('react'); + +module.exports = React.createClass({ + + render: function() { + return ( + + ); + } + +}); diff --git a/js/components/category-header.jsx b/js/components/category-header.jsx new file mode 100644 index 0000000..2af7190 --- /dev/null +++ b/js/components/category-header.jsx @@ -0,0 +1,19 @@ +var React = require('react'); + +module.exports = React.createClass({ + + render: function() { + + var classes = 'category-header' + (this.props.currentItem ? 'visible' : ''); + var itemLabel = this.props.currentItem ? this.props.currentItem.label : ''; + + return ( +
+ + {itemLabel} +
+ ); + + } + +}); diff --git a/package.json b/package.json index 4ac1fb5..5f70d4c 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,12 @@ "kiosk": false }, "dependencies": { + "glob": "^5.0.14", "handlebars": "^3.0.3", - "minimist": "^1.1.3" + "ini": "^1.3.4", + "minimist": "^1.1.3", + "node-jsx": "^0.13.3", + "r-dom": "^1.3.0", + "react": "^0.13.3" } }