mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-29 06:52:41 +00:00
* Include two versions of Marked.js
* Include two versions of Marked.js
* Working two different render pipelines
Adds stylesheet "styleLegacy.less"
Adds markdownHandler "markdownLegacy.js"
The BrewRenderer will switch between these and the new pipeline dependent on the "version" prop passed in.
* Mustache-style div blocks
* Legacy snippets & columnbreak
* Codemirror styling for Div Blocks
* Lint
* Codemirror highlights for inline Divs as well
These will turn red `{{class Content}}`
Multi-line divs will turn purple
```
{{class,class2
content
}}
```
No real need for these to be different colors. Just for testing.
* More lint
* Update dependencies.
* Adding Button to switch render pipelines
* Update Marked.js
* Popup alert to refresh page when renderer changed
* Don't compress files in Development (very slow)
* Block DIV or inline Span depending on {{ placement
* \column emits a Div instead of Span
* Allow share page to use new renderer
* {{ divs no longer need empty lines. Spans work in lists.
* Typo
* Typo
* Enforce \page must be at start of line. Code cleanup.
* Inject newlines after/before {{/}} to avoid needing blank lines
* Fixes issues with tables.
* Remove console.log
* Fix spacing issue for Spans
* Move things from Brewrenderer to Markdown
Try to keep all custom text fiddling in one spot.
* Rename variables
* Update Font-Awesome to v5.15. Fix style issues on popups.
* Update {{ Divs/Spans, Fix nested hilighting
* Fixed Spans/divs with no tags or just commas
* Use blacklist for {{ to allow more characters
* Update package-lock.json
* Update all icons to Font-awesome 5
* V3 hidden behind config variable
Add "globalThis.enable_v3 = true" in the console to enable.
* lint
43 lines
1.4 KiB
JavaScript
43 lines
1.4 KiB
JavaScript
const _ = require('lodash');
|
|
|
|
const ClassFeatureGen = require('./classfeature.gen.js');
|
|
|
|
const ClassTableGen = require('./classtable.gen.js');
|
|
|
|
module.exports = function(){
|
|
|
|
const classname = _.sample(['Archivist', 'Fancyman', 'Linguist', 'Fletcher',
|
|
'Notary', 'Berserker-Typist', 'Fishmongerer', 'Manicurist', 'Haberdasher', 'Concierge']);
|
|
|
|
|
|
const image = _.sample(_.map([
|
|
'http://orig01.deviantart.net/4682/f/2007/099/f/c/bard_stick_figure_by_wrpigeek.png',
|
|
'http://img07.deviantart.net/a3c9/i/2007/099/3/a/archer_stick_figure_by_wrpigeek.png',
|
|
'http://pre04.deviantart.net/d596/th/pre/f/2007/099/5/2/adventurer_stick_figure_by_wrpigeek.png',
|
|
'http://img13.deviantart.net/d501/i/2007/099/d/4/black_mage_stick_figure_by_wrpigeek.png',
|
|
'http://img09.deviantart.net/5cf3/i/2007/099/d/d/dark_knight_stick_figure_by_wrpigeek.png',
|
|
'http://pre01.deviantart.net/7a34/th/pre/f/2007/099/6/3/monk_stick_figure_by_wrpigeek.png',
|
|
'http://img11.deviantart.net/5dcc/i/2007/099/d/1/mystic_knight_stick_figure_by_wrpigeek.png',
|
|
'http://pre08.deviantart.net/ad45/th/pre/f/2007/099/a/0/thief_stick_figure_by_wrpigeek.png',
|
|
], function(url){
|
|
return `<img src = '${url}' style='max-width:8cm;max-height:25cm' />`;
|
|
}));
|
|
|
|
|
|
return `${[
|
|
image,
|
|
'',
|
|
'```',
|
|
'```',
|
|
'<div style=\'margin-top:240px\'></div>\n\n',
|
|
`## ${classname}`,
|
|
'Cool intro stuff will go here',
|
|
|
|
'\\page',
|
|
ClassTableGen(classname),
|
|
ClassFeatureGen(classname),
|
|
|
|
|
|
|
|
].join('\n')}\n\n\n`;
|
|
}; |