1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-13 16:15:56 +00:00

Increasing size of first letter, and setting up for ajax communication

This commit is contained in:
Scott Tolksdorf
2015-12-20 13:24:23 -05:00
parent 3059586e20
commit ef7a500940
8 changed files with 92 additions and 52 deletions

View File

@@ -2,6 +2,11 @@ var React = require('react');
var _ = require('lodash'); var _ = require('lodash');
var cx = require('classnames'); var cx = require('classnames');
var PHB = require('../phb/phb.jsx');
var Editor = require('../editor/editor.jsx');
var request = require("superagent");
var EditPage = React.createClass({ var EditPage = React.createClass({
getDefaultProps: function() { getDefaultProps: function() {
return { 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(){ render : function(){
var self = this; var self = this;
return( return(
<div className='editPage'> <div className='editPage'>
{this.props.id} <Editor text={this.state.text} onChange={this.handleTextChange} />
EditPage Ready! <PHB text={this.state.text} />
{this.props.text}
</div> </div>
); );
} }

View File

@@ -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;

View File

@@ -1,3 +0,0 @@
.navbar{
}

View File

@@ -7,42 +7,42 @@
} }
@font-face { @font-face {
font-family : BookInsanity; font-family : BookInsanity;
src : url('/assets/naturalCrit/homebrew/assets/Bookinsanity.otf'); src : url('/assets/homebrew/assets/Bookinsanity.otf');
} }
@font-face { @font-face {
font-family : BookInsanityBold; font-family : BookInsanityBold;
src : url('/assets/naturalCrit/homebrew/assets/Bookinsanity Bold.otf'); src : url('/assets/homebrew/assets/Bookinsanity Bold.otf');
} }
@font-face { @font-face {
font-family : BookInsanityItalic; font-family : BookInsanityItalic;
src : url('/assets/naturalCrit/homebrew/assets/Bookinsanity Italic.otf'); src : url('/assets/homebrew/assets/Bookinsanity Italic.otf');
} }
@font-face { @font-face {
font-family : BookInsanityBoldItalic; 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-face {
font-family : ScalaSans; font-family : ScalaSans;
src : url('/assets/naturalCrit/homebrew/assets/Scaly Sans.otf'); src : url('/assets/homebrew/assets/Scaly Sans.otf');
} }
/* /*
@font-face { @font-face {
font-family : ScalaSansBold; 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-face {
font-family : ScalaSansSmallCaps; 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-face {
font-family : Solbera; font-family : Solbera;
src : url('/assets/naturalCrit/homebrew/assets/Solbera Imitation.otf'); src : url('/assets/homebrew/assets/Solbera Imitation.otf');
} }
@font-face { @font-face {
font-family : MrEaves; font-family : MrEaves;
src : url('/assets/naturalCrit/homebrew/assets/MrsEavesSmallCaps_Regular.ttf') format('truetype'), src : url('/assets/homebrew/assets/MrsEavesSmallCaps_Regular.ttf') format('truetype'),
url('/assets/naturalCrit/homebrew/assets/Mr Eaves Small Caps.otf') format('otf'); url('/assets/homebrew/assets/Mr Eaves Small Caps.otf') format('otf');
} }
.phb{ .phb{
@background : #f2ece4; @background : #f2ece4;
@@ -59,7 +59,7 @@
column-gap : 1cm; column-gap : 1cm;
column-width : 8cm; column-width : 8cm;
background-color: #EEE5CE; 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; -webkit-column-count : 2;
-moz-column-count : 2; -moz-column-count : 2;
-webkit-column-width : 8cm; -webkit-column-width : 8cm;
@@ -297,9 +297,9 @@
&::first-letter{ &::first-letter{
float : left; float : left;
margin-top : 20px; margin-top : 20px;
margin-bottom : 10px; margin-bottom : 15px;
font-family : Solbera; font-family : Solbera;
font-size : 4.5em; font-size : 7em;
} }
} }
} }

View File

@@ -27,6 +27,8 @@ var gulp = vitreumTasks(gulp, {
"classnames", "classnames",
"jsoneditor", "jsoneditor",
"superagent",
"marked", "marked",
"pico-router", "pico-router",
"pico-flux" "pico-flux"

View File

@@ -22,6 +22,7 @@
"react": "^0.14.2", "react": "^0.14.2",
"react-dom": "^0.14.2", "react-dom": "^0.14.2",
"shortid": "^2.2.4", "shortid": "^2.2.4",
"superagent": "^1.6.1",
"vitreum": "^3.1.1" "vitreum": "^3.1.1"
} }
} }

View File

@@ -7,22 +7,7 @@ app.use(express.static(__dirname + '/build'));
app = require('./server/homebrew.api.js')(app);
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)
});
});

View File

@@ -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;
}