mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2026-01-08 04:59:14 +00:00
Moved files into statics, finally fixed the brew editor breaking on resizze
This commit is contained in:
@@ -8,10 +8,11 @@ const mw = require('./middleware.js');
|
||||
|
||||
|
||||
const statics = {
|
||||
welcomeBrew : fs.readFileSync('./welcome.brew.md', 'utf8'),
|
||||
changelog : fs.readFileSync('./changelog.md', 'utf8'),
|
||||
testBrew : fs.readFileSync('./statics/test.brew.md', 'utf8'),
|
||||
welcomeBrew : fs.readFileSync('./statics/welcome.brew.md', 'utf8'),
|
||||
changelog : fs.readFileSync('./statics/changelog.md', 'utf8'),
|
||||
faq : fs.readFileSync('./statics/faq.md', 'utf8'),
|
||||
|
||||
testBrew : fs.readFileSync('./statics/test.brew.md', 'utf8'),
|
||||
oldTest : fs.readFileSync('./statics/oldTest.brew.md', 'utf8'),
|
||||
};
|
||||
|
||||
@@ -81,6 +82,17 @@ router.get('/changelog', (req, res, next) => {
|
||||
return next();
|
||||
}, renderPage);
|
||||
|
||||
//faq Page
|
||||
router.get('/faq', (req, res, next) => {
|
||||
req.brew = {
|
||||
text : statics.faq,
|
||||
title : 'FAQ',
|
||||
|
||||
editId : true
|
||||
};
|
||||
return next();
|
||||
}, renderPage);
|
||||
|
||||
//New Page
|
||||
router.get('/new', renderPage);
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ const BrewRenderer = require('../brewRenderer/brewRenderer.smart.jsx');
|
||||
|
||||
|
||||
const BrewInterface = React.createClass({
|
||||
|
||||
handleSplitMove : function(){
|
||||
console.log('split move!');
|
||||
const BrewEditor = this.refs.editor.refs.wrappedComponent;
|
||||
BrewEditor.updateEditorSize();
|
||||
},
|
||||
render: function(){
|
||||
return <SplitPane onDragFinish={this.handleSplitMove} ref='pane'>
|
||||
|
||||
@@ -26,6 +26,10 @@ renderer.paragraph = function(text){
|
||||
return res;
|
||||
};
|
||||
|
||||
renderer.image = function(href, title, text){
|
||||
return `<img src="${href}" class="${text.split(',').join(' ')}"></img>`;
|
||||
};
|
||||
|
||||
|
||||
module.exports = {
|
||||
marked : Markdown,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
.note{
|
||||
.useSansSerif();
|
||||
margin: 9px 0px;
|
||||
.internal{
|
||||
&>.internal{
|
||||
margin-bottom : 1em;
|
||||
padding : 5px 10px;
|
||||
background-color : @green;
|
||||
@@ -33,12 +33,13 @@
|
||||
font-size : 0.352cm;
|
||||
line-height : 1.1em;
|
||||
}
|
||||
&.alt{
|
||||
border-style : solid;
|
||||
border-width : 7px;
|
||||
border-image : @descriptiveBorder 12 round;
|
||||
border-image-outset : 4px;
|
||||
}
|
||||
|
||||
}
|
||||
&.alt>.internal{
|
||||
border-style : solid;
|
||||
border-width : 7px;
|
||||
border-image : @descriptiveBorder 12 round;
|
||||
border-image-outset : 4px;
|
||||
}
|
||||
}
|
||||
.frame{
|
||||
@@ -46,7 +47,7 @@
|
||||
margin-bottom : 37px;
|
||||
margin-left : 17px;
|
||||
margin-right: 17px;
|
||||
.internal{
|
||||
&>.internal{
|
||||
box-sizing : border-box;
|
||||
background-color : white;
|
||||
border : initial;
|
||||
@@ -86,4 +87,15 @@
|
||||
-webkit-column-break-after : always;
|
||||
break-after : always;
|
||||
-moz-column-break-after : always;
|
||||
}
|
||||
|
||||
|
||||
.brushed{
|
||||
border-image-source : url('http://i.imgur.com/nzPYZyD.png');
|
||||
border-image-outset : 25px 17px;
|
||||
border-image-repeat : round;
|
||||
border-image-slice : 1250 1250 1250 1250;
|
||||
border-image-width : 1250px;
|
||||
|
||||
|
||||
}
|
||||
@@ -18,17 +18,11 @@
|
||||
@page { margin: 0; } //TODO: ????
|
||||
|
||||
|
||||
.useColumns(@multiplier : 1){
|
||||
.useColumns(){
|
||||
column-count : 2;
|
||||
column-fill : auto;
|
||||
column-gap : 1cm;
|
||||
column-width : 8cm * @multiplier;
|
||||
-webkit-column-count : 2;
|
||||
-moz-column-count : 2;
|
||||
-webkit-column-width : 8cm * @multiplier;
|
||||
-moz-column-width : 8cm * @multiplier;
|
||||
-webkit-column-gap : 1cm;
|
||||
-moz-column-gap : 1cm;
|
||||
column-width : 8cm;
|
||||
}
|
||||
& *{
|
||||
-webkit-print-color-adjust : exact;
|
||||
@@ -51,11 +45,14 @@
|
||||
page-break-before : always;
|
||||
page-break-after : always;
|
||||
|
||||
|
||||
/* CODE */
|
||||
pre{
|
||||
font-family : monospace;
|
||||
background-color : @yellow;
|
||||
padding : 12px;
|
||||
border: 1px solid #bfbfbf;
|
||||
white-space: pre-wrap;
|
||||
color : #333;
|
||||
-webkit-column-break-inside : avoid;
|
||||
column-break-inside : avoid;
|
||||
@@ -200,9 +197,9 @@
|
||||
}
|
||||
*/
|
||||
//If a note starts a column, give it space at the top to render border
|
||||
pre+blockquote, h2+blockquote, h3+blockquote, h4+blockquote, h5+blockquote {
|
||||
margin-top : 13px;
|
||||
}
|
||||
//pre+blockquote, h2+blockquote, h3+blockquote, h4+blockquote, h5+blockquote {
|
||||
// margin-top : 13px;
|
||||
//}
|
||||
//*****************************
|
||||
// * MONSTER STAT BLOCK
|
||||
// *****************************/
|
||||
|
||||
19
statics/faq.md
Normal file
19
statics/faq.md
Normal file
@@ -0,0 +1,19 @@
|
||||
- Submitting work created on this site to DMs Guild
|
||||
|
||||
|
||||
|
||||
# Images
|
||||
|
||||
|
||||
|
||||
## Changing backgrounds
|
||||
{{wide
|
||||
In style
|
||||
```
|
||||
#p3{
|
||||
background-image : url('/assets/homebrewery/phb_style/img/dmg_bg.jpg')
|
||||
}
|
||||
|
||||
```
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user