1
0
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:
Scott Tolksdorf
2017-02-28 21:07:37 -05:00
parent 4c874149fb
commit 00f2703d0b
8 changed files with 68 additions and 24 deletions

View File

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

View File

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

View File

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

View File

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

View File

@@ -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
View 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')
}
```
}}