mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 19:32:45 +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 = {
|
const statics = {
|
||||||
welcomeBrew : fs.readFileSync('./welcome.brew.md', 'utf8'),
|
welcomeBrew : fs.readFileSync('./statics/welcome.brew.md', 'utf8'),
|
||||||
changelog : fs.readFileSync('./changelog.md', 'utf8'),
|
changelog : fs.readFileSync('./statics/changelog.md', 'utf8'),
|
||||||
testBrew : fs.readFileSync('./statics/test.brew.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'),
|
oldTest : fs.readFileSync('./statics/oldTest.brew.md', 'utf8'),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,6 +82,17 @@ router.get('/changelog', (req, res, next) => {
|
|||||||
return next();
|
return next();
|
||||||
}, renderPage);
|
}, renderPage);
|
||||||
|
|
||||||
|
//faq Page
|
||||||
|
router.get('/faq', (req, res, next) => {
|
||||||
|
req.brew = {
|
||||||
|
text : statics.faq,
|
||||||
|
title : 'FAQ',
|
||||||
|
|
||||||
|
editId : true
|
||||||
|
};
|
||||||
|
return next();
|
||||||
|
}, renderPage);
|
||||||
|
|
||||||
//New Page
|
//New Page
|
||||||
router.get('/new', renderPage);
|
router.get('/new', renderPage);
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ const BrewRenderer = require('../brewRenderer/brewRenderer.smart.jsx');
|
|||||||
|
|
||||||
|
|
||||||
const BrewInterface = React.createClass({
|
const BrewInterface = React.createClass({
|
||||||
|
|
||||||
handleSplitMove : function(){
|
handleSplitMove : function(){
|
||||||
console.log('split move!');
|
const BrewEditor = this.refs.editor.refs.wrappedComponent;
|
||||||
|
BrewEditor.updateEditorSize();
|
||||||
},
|
},
|
||||||
render: function(){
|
render: function(){
|
||||||
return <SplitPane onDragFinish={this.handleSplitMove} ref='pane'>
|
return <SplitPane onDragFinish={this.handleSplitMove} ref='pane'>
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ renderer.paragraph = function(text){
|
|||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
renderer.image = function(href, title, text){
|
||||||
|
return `<img src="${href}" class="${text.split(',').join(' ')}"></img>`;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
marked : Markdown,
|
marked : Markdown,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
.note{
|
.note{
|
||||||
.useSansSerif();
|
.useSansSerif();
|
||||||
margin: 9px 0px;
|
margin: 9px 0px;
|
||||||
.internal{
|
&>.internal{
|
||||||
margin-bottom : 1em;
|
margin-bottom : 1em;
|
||||||
padding : 5px 10px;
|
padding : 5px 10px;
|
||||||
background-color : @green;
|
background-color : @green;
|
||||||
@@ -33,20 +33,21 @@
|
|||||||
font-size : 0.352cm;
|
font-size : 0.352cm;
|
||||||
line-height : 1.1em;
|
line-height : 1.1em;
|
||||||
}
|
}
|
||||||
&.alt{
|
|
||||||
|
}
|
||||||
|
&.alt>.internal{
|
||||||
border-style : solid;
|
border-style : solid;
|
||||||
border-width : 7px;
|
border-width : 7px;
|
||||||
border-image : @descriptiveBorder 12 round;
|
border-image : @descriptiveBorder 12 round;
|
||||||
border-image-outset : 4px;
|
border-image-outset : 4px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.frame{
|
.frame{
|
||||||
margin-top : 26px;
|
margin-top : 26px;
|
||||||
margin-bottom : 37px;
|
margin-bottom : 37px;
|
||||||
margin-left : 17px;
|
margin-left : 17px;
|
||||||
margin-right: 17px;
|
margin-right: 17px;
|
||||||
.internal{
|
&>.internal{
|
||||||
box-sizing : border-box;
|
box-sizing : border-box;
|
||||||
background-color : white;
|
background-color : white;
|
||||||
border : initial;
|
border : initial;
|
||||||
@@ -87,3 +88,14 @@
|
|||||||
break-after : always;
|
break-after : always;
|
||||||
-moz-column-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: ????
|
@page { margin: 0; } //TODO: ????
|
||||||
|
|
||||||
|
|
||||||
.useColumns(@multiplier : 1){
|
.useColumns(){
|
||||||
column-count : 2;
|
column-count : 2;
|
||||||
column-fill : auto;
|
column-fill : auto;
|
||||||
column-gap : 1cm;
|
column-gap : 1cm;
|
||||||
column-width : 8cm * @multiplier;
|
column-width : 8cm;
|
||||||
-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;
|
|
||||||
}
|
}
|
||||||
& *{
|
& *{
|
||||||
-webkit-print-color-adjust : exact;
|
-webkit-print-color-adjust : exact;
|
||||||
@@ -51,11 +45,14 @@
|
|||||||
page-break-before : always;
|
page-break-before : always;
|
||||||
page-break-after : always;
|
page-break-after : always;
|
||||||
|
|
||||||
|
|
||||||
|
/* CODE */
|
||||||
pre{
|
pre{
|
||||||
font-family : monospace;
|
font-family : monospace;
|
||||||
background-color : @yellow;
|
background-color : @yellow;
|
||||||
padding : 12px;
|
padding : 12px;
|
||||||
border: 1px solid #bfbfbf;
|
border: 1px solid #bfbfbf;
|
||||||
|
white-space: pre-wrap;
|
||||||
color : #333;
|
color : #333;
|
||||||
-webkit-column-break-inside : avoid;
|
-webkit-column-break-inside : avoid;
|
||||||
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
|
//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 {
|
//pre+blockquote, h2+blockquote, h3+blockquote, h4+blockquote, h5+blockquote {
|
||||||
margin-top : 13px;
|
// margin-top : 13px;
|
||||||
}
|
//}
|
||||||
//*****************************
|
//*****************************
|
||||||
// * MONSTER STAT BLOCK
|
// * 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