diff --git a/client/homebrew/architecture (T440s-002's conflicted copy 2016-01-03).json b/client/homebrew/architecture (T440s-002's conflicted copy 2016-01-03).json
new file mode 100644
index 000000000..4a7d07c31
--- /dev/null
+++ b/client/homebrew/architecture (T440s-002's conflicted copy 2016-01-03).json
@@ -0,0 +1,51 @@
+{
+ "C:\\Dropbox\\root\\Programming\\Javascript\\NaturalCrit\\client\\homebrew\\editPage\\editPage.jsx": [
+ "react",
+ "lodash",
+ "classnames",
+ "superagent",
+ "../phb/phb.jsx",
+ "../editor/editor.jsx"
+ ],
+ "C:\\Dropbox\\root\\Programming\\Javascript\\NaturalCrit\\client\\homebrew\\sharePage\\sharePage.jsx": [
+ "react",
+ "lodash",
+ "classnames",
+ "../phb/phb.jsx"
+ ],
+ "C:\\Dropbox\\root\\Programming\\Javascript\\NaturalCrit\\client\\homebrew\\statusbar\\statusbar.jsx": [
+ "react",
+ "lodash",
+ "classnames"
+ ],
+ "C:\\Dropbox\\root\\Programming\\Javascript\\NaturalCrit\\client\\homebrew\\phb\\phb.jsx": [
+ "react",
+ "lodash",
+ "classnames",
+ "marked"
+ ],
+ "C:\\Dropbox\\root\\Programming\\Javascript\\NaturalCrit\\client\\homebrew\\editor\\snippets.js": [],
+ "C:\\Dropbox\\root\\Programming\\Javascript\\NaturalCrit\\client\\homebrew\\editor\\editor.jsx": [
+ "react",
+ "lodash",
+ "classnames",
+ "./snippets.js"
+ ],
+ "C:\\Dropbox\\root\\Programming\\Javascript\\NaturalCrit\\client\\homebrew\\homePage\\homePage.jsx": [
+ "react",
+ "lodash",
+ "classnames",
+ "../statusbar/statusbar.jsx",
+ "../phb/phb.jsx",
+ "../editor/editor.jsx"
+ ],
+ "C:\\Dropbox\\root\\Programming\\Javascript\\NaturalCrit\\client\\homebrew\\homebrew.jsx": [
+ "react",
+ "lodash",
+ "classnames",
+ "pico-router",
+ "./editPage/editPage.jsx",
+ "./sharePage/sharePage.jsx",
+ "./homePage/homePage.jsx"
+ ]
+}
\ No newline at end of file
diff --git a/client/homebrew/assets/PHB style tiling background.jpg b/client/homebrew/assets/PHB style tiling background.jpg
new file mode 100644
index 000000000..ed55e410f
Binary files /dev/null and b/client/homebrew/assets/PHB style tiling background.jpg differ
diff --git a/client/homebrew/editPage/editPage.jsx b/client/homebrew/editPage/editPage.jsx
index 0d1582674..08b0c8e28 100644
--- a/client/homebrew/editPage/editPage.jsx
+++ b/client/homebrew/editPage/editPage.jsx
@@ -33,48 +33,42 @@ var EditPage = React.createClass({
handleTextChange : function(text){
this.setState({
- text : text
+ text : text,
+ pending : true
});
-
- //Ajax time
+ this.save();
},
- handleSave : function(){
- this.setState({
- pending : true
- })
+ save : _.debounce(function(){
request
.put('/homebrew/update/' + this.props.id)
.send({text : this.state.text})
.end((err, res) => {
-
- console.log('err', err);
this.setState({
pending : false
})
})
- },
+ }, 1500),
render : function(){
- console.log(this.props.entry);
-
- var temp;
- if(this.state.pending){
- temp =
processing
- }
-
-
return
-
{temp}
-
-
-
+
+
+
+
}
});
diff --git a/client/homebrew/editPage/editPage.less b/client/homebrew/editPage/editPage.less
index f23bef98c..6e9ab51e4 100644
--- a/client/homebrew/editPage/editPage.less
+++ b/client/homebrew/editPage/editPage.less
@@ -1,3 +1,24 @@
.editPage{
+ .paneSplit{
+ width : 100%;
+ max-height: 100%;
+ .leftPane, .rightPane{
+ display: inline-block;
+ vertical-align: top;
+ position: relative;
+ min-height: 100%;
+ }
+
+ .leftPane{
+ width : 40%;
+ }
+ .rightPane{
+ width : 60%;
+
+ overflow-y: scroll;
+ }
+
+ }
+
}
\ No newline at end of file
diff --git a/client/homebrew/editor/editor.less b/client/homebrew/editor/editor.less
index 3e6c03e65..30176ae6f 100644
--- a/client/homebrew/editor/editor.less
+++ b/client/homebrew/editor/editor.less
@@ -1,17 +1,20 @@
-.editor{
- position : fixed;
- height : 100%;
- .textIcons{
- display: inline-block;
- vertical-align: top;
- .icon{
- cursor: pointer;
- width : 30px;
- height : 30px;
- text-align: center;
- line-height: 30px;
- font-size: 1.5em;
+.editor{
+ position : relative;
+ height : 100%;
+ min-height : 100%;
+ width : 100%;
+ .textIcons{
+ position : absolute;
+ display : inline-block;
+ vertical-align : top;
+ .icon{
+ height : 30px;
+ width : 30px;
+ cursor : pointer;
+ font-size : 1.5em;
+ line-height : 30px;
+ text-align : center;
&:nth-child(8n + 1){ background-color: @blue; }
&:nth-child(8n + 2){ background-color: @orange; }
&:nth-child(8n + 3){ background-color: @teal; }
@@ -20,13 +23,13 @@
&:nth-child(8n + 6){ background-color: @silver; }
&:nth-child(8n + 7){ background-color: @yellow; }
&:nth-child(8n + 8){ background-color: @green; }
-
}
}
textarea{
- display: inline-block;
- height : 100%;
- overflow-y: scroll;
- width : 300px;
+ display : inline-block;
+ resize : none;
+ overflow-y : scroll;
+ height : 100%;
+ width : 100%;
}
}
\ No newline at end of file
diff --git a/client/homebrew/homebrew.less b/client/homebrew/homebrew.less
index a1dfb0f8d..6a046f2e2 100644
--- a/client/homebrew/homebrew.less
+++ b/client/homebrew/homebrew.less
@@ -6,6 +6,7 @@
html,body, #reactContainer{
min-height: 100%;
+ font-family : 'Open Sans', sans-serif;
}
.homebrew{
diff --git a/client/homebrew/phb/phb.less b/client/homebrew/phb/phb.less
index b0cf07f1e..4f4d42168 100644
--- a/client/homebrew/phb/phb.less
+++ b/client/homebrew/phb/phb.less
@@ -1,11 +1,11 @@
.pbhPages{
+ background-color: @steel;
+ padding : 40px 0px;
&>.phb{
- margin-bottom : 40px;
- margin-top : 40px;
- margin-left : 400px;
box-shadow : 1px 4px 14px #000;
-
+ margin-left: auto;
+ margin-right: auto;
}
}
@font-face {
diff --git a/client/homebrew/sharePage/sharePage.jsx b/client/homebrew/sharePage/sharePage.jsx
index 396da1ee6..d24a3e6b0 100644
--- a/client/homebrew/sharePage/sharePage.jsx
+++ b/client/homebrew/sharePage/sharePage.jsx
@@ -2,6 +2,8 @@ var React = require('react');
var _ = require('lodash');
var cx = require('classnames');
+var Statusbar = require('../statusbar/statusbar.jsx');
+
var PHB = require('../phb/phb.jsx');
var SharePage = React.createClass({
@@ -19,9 +21,13 @@ var SharePage = React.createClass({
},
render : function(){
- console.log(this.props.entry);
return(
);
diff --git a/client/homebrew/statusbar/statusbar.jsx b/client/homebrew/statusbar/statusbar.jsx
index a77235fec..5d007074b 100644
--- a/client/homebrew/statusbar/statusbar.jsx
+++ b/client/homebrew/statusbar/statusbar.jsx
@@ -4,6 +4,8 @@ var cx = require('classnames');
var Logo = require('naturalCrit/logo/logo.jsx');
+
+
var Statusbar = React.createClass({
getDefaultProps: function() {
@@ -16,33 +18,39 @@ var Statusbar = React.createClass({
};
},
+ selectInputText : function(refName){
+ this.refs[refName].select();
+ },
+
renderInfo : function(){
//render last update?
//number of times viewed?
},
renderNewButton : function(){
- if(this.props.editId) return null;
+ if(this.props.editId || this.props.shareId) return null;
return
-
- New
+ New
},
- renderLinks : function(){
+ renderEdit : function(){
if(!this.props.editId) return null;
- return [
-
- Edit Link
-
-
,
-
- ]
+ return
+ Edit Link
+
+
+ },
+
+ renderShare : function(){
+ if(!this.props.shareId) return null;
+
+ return
+ Share Link
+
+
},
renderStatus : function(){
@@ -58,14 +66,22 @@ var Statusbar = React.createClass({
},
render : function(){
- console.log(this.props);
return
-
- Statusbar Ready!
-
- {this.renderLinks()}
+
+
+
+
+
{this.renderStatus()}
+ {this.renderEdit()}
+ {this.renderShare()}
+
{this.renderNewButton()}
diff --git a/client/homebrew/statusbar/statusbar.less b/client/homebrew/statusbar/statusbar.less
index a9588bb65..8e0206ef5 100644
--- a/client/homebrew/statusbar/statusbar.less
+++ b/client/homebrew/statusbar/statusbar.less
@@ -1,12 +1,60 @@
-.statusbar{
- font-size : 1.8em;
- color : white;
- svg{
- vertical-align : middle;
- height : 1em;
- margin-right : 0.2em;
- cursor : pointer;
- fill : white;
- }
+.statusbar{
+ height : 1.0em;
+ background-color : black;
+ font-size : 24px;
+ color : white;
+ line-height : 1.0em;
+ border-bottom : 1px solid @grey;
+ .logo{
+ display : inline-block;
+ vertical-align : middle;
+ margin-right : 40px;
+ }
+ .left{
+ display : inline-block;
+ }
+ .right{
+ float : right;
+ }
+ .toolName{
+ vertical-align : middle;
+ font-family : CodeBold;
+ font-size : 16px;
+ line-height : 100%;
+ small{
+ font-family : CodeBold;
+ }
+ }
+ .controls{
+ font-size : 12px;
+ >*{
+ display : inline-block;
+ height : 100%;
+ padding : 0px 10px;
+ border-left : 1px solid @grey;
+ }
+ .savingStatus{
+ width : 56px;
+ color : @grey;
+ text-align : center;
+ }
+ .newButton{
+ .animate(background-color);
+ color : white;
+ text-decoration : none;
+ &:hover{
+ background-color : rgba(255,0,0,0.4);
+ }
+ }
+ .editField, .shareField{
+ span{
+ margin-right : 10px;
+ }
+ input{
+ width : 100px;
+ font-size: 12px;
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/shared/naturalCrit/logo/logo.jsx b/shared/naturalCrit/logo/logo.jsx
index 313dd32f4..dafb38ade 100644
--- a/shared/naturalCrit/logo/logo.jsx
+++ b/shared/naturalCrit/logo/logo.jsx
@@ -5,6 +5,10 @@ var Logo = React.createClass({
return
}
});
diff --git a/shared/naturalCrit/logo/logo.less b/shared/naturalCrit/logo/logo.less
index e69de29bb..9b7fdb7b0 100644
--- a/shared/naturalCrit/logo/logo.less
+++ b/shared/naturalCrit/logo/logo.less
@@ -0,0 +1,35 @@
+@font-face {
+ font-family : CodeLight;
+ src : url('/assets/naturalCrit/logo/CODE Light.otf');
+}
+@font-face {
+ font-family : CodeBold;
+ src : url('/assets/naturalCrit/logo/CODE Bold.otf');
+}
+
+
+.logo{
+
+ svg{
+ vertical-align : middle;
+ height : 1em;
+ margin-right : 0.2em;
+ cursor : pointer;
+ fill : white;
+ }
+
+ span.name{
+ font-size: 0.9em;
+ line-height: 0.5em;
+ font-family : 'CodeLight';
+ span.crit{
+ font-family : 'CodeBold';
+ }
+ small{
+ font-size: 0.3em;
+ font-family : 'Open Sans';
+ font-weight: 800;
+ text-transform: uppercase;
+ }
+ }
+}
\ No newline at end of file
diff --git a/todo.txt b/todo.txt
new file mode 100644
index 000000000..cc4dd85b9
--- /dev/null
+++ b/todo.txt
@@ -0,0 +1,2 @@
+- Merge homebrew back into natural crit (maybe?)
+-
\ No newline at end of file