mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-12 23:45:57 +00:00
Increasing size of first letter, and setting up for ajax communication
This commit is contained in:
@@ -2,6 +2,11 @@ var React = require('react');
|
||||
var _ = require('lodash');
|
||||
var cx = require('classnames');
|
||||
|
||||
var PHB = require('../phb/phb.jsx');
|
||||
var Editor = require('../editor/editor.jsx');
|
||||
|
||||
var request = require("superagent");
|
||||
|
||||
var EditPage = React.createClass({
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
@@ -10,13 +15,26 @@ var EditPage = React.createClass({
|
||||
};
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
text: this.props.text
|
||||
};
|
||||
},
|
||||
|
||||
handleTextChange : function(text){
|
||||
this.setState({
|
||||
text : text
|
||||
});
|
||||
|
||||
//Ajax time
|
||||
},
|
||||
|
||||
render : function(){
|
||||
var self = this;
|
||||
return(
|
||||
<div className='editPage'>
|
||||
{this.props.id}
|
||||
EditPage Ready!
|
||||
{this.props.text}
|
||||
<Editor text={this.state.text} onChange={this.handleTextChange} />
|
||||
<PHB text={this.state.text} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
var React = require('react');
|
||||
var _ = require('lodash');
|
||||
var cx = require('classnames');
|
||||
|
||||
var Navbar = React.createClass({
|
||||
|
||||
render : function(){
|
||||
var self = this;
|
||||
return(
|
||||
<div className='navbar'>
|
||||
Navbar Ready!
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = Navbar;
|
||||
@@ -1,3 +0,0 @@
|
||||
.navbar{
|
||||
|
||||
}
|
||||
@@ -7,42 +7,42 @@
|
||||
}
|
||||
@font-face {
|
||||
font-family : BookInsanity;
|
||||
src : url('/assets/naturalCrit/homebrew/assets/Bookinsanity.otf');
|
||||
src : url('/assets/homebrew/assets/Bookinsanity.otf');
|
||||
}
|
||||
@font-face {
|
||||
font-family : BookInsanityBold;
|
||||
src : url('/assets/naturalCrit/homebrew/assets/Bookinsanity Bold.otf');
|
||||
src : url('/assets/homebrew/assets/Bookinsanity Bold.otf');
|
||||
}
|
||||
@font-face {
|
||||
font-family : BookInsanityItalic;
|
||||
src : url('/assets/naturalCrit/homebrew/assets/Bookinsanity Italic.otf');
|
||||
src : url('/assets/homebrew/assets/Bookinsanity Italic.otf');
|
||||
}
|
||||
@font-face {
|
||||
font-family : BookInsanityBoldItalic;
|
||||
src : url('/assets/naturalCrit/homebrew/assets/Bookinsanity Bold Italic.otf');
|
||||
src : url('/assets/homebrew/assets/Bookinsanity Bold Italic.otf');
|
||||
}
|
||||
@font-face {
|
||||
font-family : ScalaSans;
|
||||
src : url('/assets/naturalCrit/homebrew/assets/Scaly Sans.otf');
|
||||
src : url('/assets/homebrew/assets/Scaly Sans.otf');
|
||||
}
|
||||
/*
|
||||
@font-face {
|
||||
font-family : ScalaSansBold;
|
||||
src : url('/assets/naturalCrit/homebrew/assets/Scala Sans Bold.ttf');
|
||||
src : url('/assets/homebrew/assets/Scala Sans Bold.ttf');
|
||||
}
|
||||
*/
|
||||
@font-face {
|
||||
font-family : ScalaSansSmallCaps;
|
||||
src : url('/assets/naturalCrit/homebrew/assets/Scala Sans SmallCaps.ttf');
|
||||
src : url('/assets/homebrew/assets/Scala Sans SmallCaps.ttf');
|
||||
}
|
||||
@font-face {
|
||||
font-family : Solbera;
|
||||
src : url('/assets/naturalCrit/homebrew/assets/Solbera Imitation.otf');
|
||||
src : url('/assets/homebrew/assets/Solbera Imitation.otf');
|
||||
}
|
||||
@font-face {
|
||||
font-family : MrEaves;
|
||||
src : url('/assets/naturalCrit/homebrew/assets/MrsEavesSmallCaps_Regular.ttf') format('truetype'),
|
||||
url('/assets/naturalCrit/homebrew/assets/Mr Eaves Small Caps.otf') format('otf');
|
||||
src : url('/assets/homebrew/assets/MrsEavesSmallCaps_Regular.ttf') format('truetype'),
|
||||
url('/assets/homebrew/assets/Mr Eaves Small Caps.otf') format('otf');
|
||||
}
|
||||
.phb{
|
||||
@background : #f2ece4;
|
||||
@@ -59,7 +59,7 @@
|
||||
column-gap : 1cm;
|
||||
column-width : 8cm;
|
||||
background-color: #EEE5CE;
|
||||
background-image : url('/assets/naturalCrit/homebrew/assets/PHB-background.png');
|
||||
background-image : url('/assets/homebrew/assets/PHB-background.png');
|
||||
-webkit-column-count : 2;
|
||||
-moz-column-count : 2;
|
||||
-webkit-column-width : 8cm;
|
||||
@@ -297,9 +297,9 @@
|
||||
&::first-letter{
|
||||
float : left;
|
||||
margin-top : 20px;
|
||||
margin-bottom : 10px;
|
||||
margin-bottom : 15px;
|
||||
font-family : Solbera;
|
||||
font-size : 4.5em;
|
||||
font-size : 7em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ var gulp = vitreumTasks(gulp, {
|
||||
"classnames",
|
||||
"jsoneditor",
|
||||
|
||||
"superagent",
|
||||
|
||||
"marked",
|
||||
"pico-router",
|
||||
"pico-flux"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"react": "^0.14.2",
|
||||
"react-dom": "^0.14.2",
|
||||
"shortid": "^2.2.4",
|
||||
"superagent": "^1.6.1",
|
||||
"vitreum": "^3.1.1"
|
||||
}
|
||||
}
|
||||
|
||||
17
server.js
17
server.js
@@ -7,22 +7,7 @@ app.use(express.static(__dirname + '/build'));
|
||||
|
||||
|
||||
|
||||
|
||||
app.get('/homebrew*', function (req, res) {
|
||||
vitreumRender({
|
||||
page: './build/homebrew/bundle.dot',
|
||||
globals:{},
|
||||
prerenderWith : './client/homebrew/homebrew.jsx',
|
||||
initialProps: {
|
||||
url: req.originalUrl,
|
||||
|
||||
text : "cool"
|
||||
},
|
||||
clearRequireCache : true,
|
||||
}, function (err, page) {
|
||||
return res.send(page)
|
||||
});
|
||||
});
|
||||
app = require('./server/homebrew.api.js')(app);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
var vitreumRender = require('vitreum/render');
|
||||
|
||||
|
||||
|
||||
module.exports = function(app){
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
app.get('/homebrew/edit/:id', function(req, res){
|
||||
|
||||
console.log(req.params.id);
|
||||
|
||||
|
||||
vitreumRender({
|
||||
page: './build/homebrew/bundle.dot',
|
||||
globals:{},
|
||||
prerenderWith : './client/homebrew/homebrew.jsx',
|
||||
initialProps: {
|
||||
url: req.originalUrl,
|
||||
},
|
||||
clearRequireCache : true,
|
||||
}, function (err, page) {
|
||||
return res.send(page)
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
app.get('/homebrew*', function (req, res) {
|
||||
vitreumRender({
|
||||
page: './build/homebrew/bundle.dot',
|
||||
globals:{},
|
||||
prerenderWith : './client/homebrew/homebrew.jsx',
|
||||
initialProps: {
|
||||
url: req.originalUrl,
|
||||
},
|
||||
clearRequireCache : true,
|
||||
}, function (err, page) {
|
||||
return res.send(page)
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return app;
|
||||
}
|
||||
Reference in New Issue
Block a user