mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-15 22:26:01 +00:00
pdf route has the same problem, disabling it for now
This commit is contained in:
@@ -2,8 +2,6 @@ var React = require('react');
|
|||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
var cx = require('classnames');
|
var cx = require('classnames');
|
||||||
|
|
||||||
var PHBPage = require('./phbPage/phbPage.jsx');
|
|
||||||
|
|
||||||
var Markdown = require('marked');
|
var Markdown = require('marked');
|
||||||
|
|
||||||
var PageContainer = React.createClass({
|
var PageContainer = React.createClass({
|
||||||
@@ -15,7 +13,7 @@ var PageContainer = React.createClass({
|
|||||||
|
|
||||||
renderPages : function(){
|
renderPages : function(){
|
||||||
return _.map(this.props.text.split('\\page'), (pageText, index) => {
|
return _.map(this.props.text.split('\\page'), (pageText, index) => {
|
||||||
return <PHBPage content={Markdown(pageText)} key={index} />
|
return <div className='phb' dangerouslySetInnerHTML={{__html:Markdown(pageText)}} key={index} />
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ var gulp = require("gulp");
|
|||||||
|
|
||||||
|
|
||||||
var gulp = vitreumTasks(gulp, {
|
var gulp = vitreumTasks(gulp, {
|
||||||
entryPoints: ["./client/naturalCrit", "./client/homebrew", "./client/admin", "./client/homebrew/phb/phbPage"],
|
entryPoints: ["./client/naturalCrit", "./client/homebrew", "./client/admin"],
|
||||||
|
|
||||||
DEV: true,
|
DEV: true,
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ module.exports = function(app){
|
|||||||
});
|
});
|
||||||
|
|
||||||
//PDF download
|
//PDF download
|
||||||
|
/*
|
||||||
var pdf = require('html-pdf');
|
var pdf = require('html-pdf');
|
||||||
app.get('/homebrew/pdf/:id', function(req, res){
|
app.get('/homebrew/pdf/:id', function(req, res){
|
||||||
HomebrewModel.find({shareId : req.params.id}, function(err, objs){
|
HomebrewModel.find({shareId : req.params.id}, function(err, objs){
|
||||||
@@ -149,7 +150,7 @@ module.exports = function(app){
|
|||||||
"border": "0",
|
"border": "0",
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf.create(html, config).toStream(function(err, stream){
|
pdf.create(page, config).toStream(function(err, stream){
|
||||||
|
|
||||||
res.attachment('pdfname.pdf');
|
res.attachment('pdfname.pdf');
|
||||||
return stream.pipe(res);
|
return stream.pipe(res);
|
||||||
@@ -158,7 +159,7 @@ module.exports = function(app){
|
|||||||
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user