From 2fd57e8f9aa4354681fbc068699e7eb3534168cf Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 23 Dec 2015 08:39:16 +0000 Subject: [PATCH] Render app pages using react --- src/index.html | 20 +++++--------------- src/js/app.js | 5 ++++- src/js/components/homescreen.js | 21 +++++++++++++++++++++ src/less/style.less | 3 +++ 4 files changed, 33 insertions(+), 16 deletions(-) create mode 100644 src/js/components/homescreen.js diff --git a/src/index.html b/src/index.html index 4fa68da..b308762 100644 --- a/src/index.html +++ b/src/index.html @@ -9,20 +9,10 @@ Oriment - -
-

Oriment

-
Orient documents and images automagically
-
-
- -
- - - - + +
+ + + diff --git a/src/js/app.js b/src/js/app.js index ac1ee40..0b811d1 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -1,5 +1,6 @@ import './utils'; - +import React from 'react'; +import HomeScreen from './components/homescreen'; document.addEventListener("deviceready", function () { function onSuccess(heading) { @@ -28,3 +29,5 @@ $('footer input').on('change', function () { reader.onload = function(e) { $('#compass').attr('src', e.target.result); }; reader.readAsDataURL(file); }); + +React.render(, $('#app')[0]); diff --git a/src/js/components/homescreen.js b/src/js/components/homescreen.js new file mode 100644 index 0000000..3f1a4fe --- /dev/null +++ b/src/js/components/homescreen.js @@ -0,0 +1,21 @@ +import React from 'react'; + +export default class HomeScreen extends React.Component { + render() { + return ( + +
+

Oriment

+
Orient documents and images automagically
+
+
+ +
+ +
+ ); + } +}; diff --git a/src/less/style.less b/src/less/style.less index 7b4b01e..bde6d3d 100644 --- a/src/less/style.less +++ b/src/less/style.less @@ -63,4 +63,7 @@ footer { left: 0; width: 100vw; padding-bottom: 25px; + input { + display: none; + } }