0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-04 21:12:41 +00:00

Merge branch 'naturalcrit:master' into master

This commit is contained in:
blitzher
2021-08-31 19:41:10 +02:00
committed by GitHub
11 changed files with 174 additions and 215 deletions

View File

@@ -30,7 +30,7 @@ const BrewRenderer = createClass({
if(this.props.renderer == 'legacy') { if(this.props.renderer == 'legacy') {
pages = this.props.text.split('\\page'); pages = this.props.text.split('\\page');
} else { } else {
pages = this.props.text.split(/^\\page/gm); pages = this.props.text.split(/^\\page$/gm);
} }
return { return {
@@ -62,7 +62,7 @@ const BrewRenderer = createClass({
if(this.props.renderer == 'legacy') { if(this.props.renderer == 'legacy') {
pages = this.props.text.split('\\page'); pages = this.props.text.split('\\page');
} else { } else {
pages = this.props.text.split(/^\\page/gm); pages = this.props.text.split(/^\\page$/gm);
} }
this.setState({ this.setState({
pages : pages, pages : pages,

View File

@@ -68,10 +68,9 @@ const Editor = createClass({
}, },
handleInject : function(injectText){ handleInject : function(injectText){
const text = ( let text;
this.isText() && this.props.brew.text || if(this.isText()) text = this.props.brew.text;
this.isStyle() && (this.props.brew.style ?? DEFAULT_STYLE_TEXT) if(this.isStyle()) text = this.props.brew.style ?? DEFAULT_STYLE_TEXT;
);
const lines = text.split('\n'); const lines = text.split('\n');
const cursorPos = this.refs.codeEditor.getCursorPosition(); const cursorPos = this.refs.codeEditor.getCursorPosition();
@@ -79,7 +78,7 @@ const Editor = createClass({
this.refs.codeEditor.setCursorPosition(cursorPos.line + injectText.split('\n').length, cursorPos.ch + injectText.length); this.refs.codeEditor.setCursorPosition(cursorPos.line + injectText.split('\n').length, cursorPos.ch + injectText.length);
if(this.isText()) this.props.onTextChange(lines.join('\n')); if(this.isText()) this.props.onTextChange(lines.join('\n'));
if(this.isStyle()) this.props.onStyleChange(lines.join('\n')); if(this.isStyle()) this.props.onStyleChange(lines.join('\n'));
}, },
@@ -122,7 +121,7 @@ const Editor = createClass({
// New Codemirror styling for V3 renderer // New Codemirror styling for V3 renderer
if(this.props.renderer == 'V3') { if(this.props.renderer == 'V3') {
if(line.startsWith('\\page')){ if(line.match(/^\\page$/)){
codeMirror.addLineClass(lineNumber, 'background', 'pageLine'); codeMirror.addLineClass(lineNumber, 'background', 'pageLine');
r.push(lineNumber); r.push(lineNumber);
} }

View File

@@ -43,8 +43,8 @@ module.exports = [
{{wide {{wide
Everything in here will be extra wide. Tables, text, everything! Everything in here will be extra wide. Tables, text, everything!
Beware though, CSS columns can behave a bit weird sometimes. You may Beware though, CSS columns can behave a bit weird sometimes. You may
have to rely on the automatic column-break rather than \`\column\` if have to manually place column breaks with \`\column\` to make the
you mix columns and wide blocks on the same page. surrounding text flow with this wide block the way you want.
}} }}
\n` \n`
}, },

View File

@@ -197,7 +197,7 @@ const EditPage = createClass({
const transfer = this.state.saveGoogle == _.isNil(this.state.brew.googleId); const transfer = this.state.saveGoogle == _.isNil(this.state.brew.googleId);
const brew = this.state.brew; const brew = this.state.brew;
brew.pageCount = ((brew.renderer=='legacy' ? brew.text.match(/\\page/g) : brew.text.match(/^\\page/gm)) || []).length + 1; brew.pageCount = ((brew.renderer=='legacy' ? brew.text.match(/\\page/g) : brew.text.match(/^\\page$/gm)) || []).length + 1;
if(this.state.saveGoogle) { if(this.state.saveGoogle) {
if(transfer) { if(transfer) {

View File

@@ -4,7 +4,7 @@
} }
.page { .page {
padding-bottom : 1.6cm; padding-bottom : 1.3cm;
} }
@@ -37,7 +37,10 @@ After clicking the "Print" item in the navbar a new page will open and a print d
If you want to save ink or have a monochrome printer, add the {{fas,fa-tint}} **Ink Friendly** snippet to your brew before you print If you want to save ink or have a monochrome printer, add the {{fas,fa-tint}} **Ink Friendly** snippet to your brew before you print
<img src='https://i.imgur.com/hMna6G0.png' style='position:absolute;bottom:50px;left:120px;width:180px' />
<div class='pageNumber'>1</div>
<div class='footnote'>PART 1 | FANCINESS</div>
\column \column
@@ -75,15 +78,6 @@ If you'd like to credit The Homebrewery in your brew, I'd be flattered! Just ref
If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/comments/3uwxx9/resources_open_to_the_community/). If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/comments/3uwxx9/resources_open_to_the_community/).
<img src='https://i.imgur.com/hMna6G0.png' style='position:absolute;bottom:50px;left:120px;width:180px' />
<div class='pageNumber'>1</div>
<div class='footnote'>PART 1 | FANCINESS</div>
\page \page
## Markdown+ ## Markdown+

View File

@@ -161,7 +161,7 @@ const NewPage = createClass({
brew.text = brew.text.slice(index + 5); brew.text = brew.text.slice(index + 5);
}; };
brew.pageCount=((brew.renderer=='legacy' ? brew.text.match(/\\page/g) : brew.text.match(/^\\page/gm)) || []).length + 1; brew.pageCount=((brew.renderer=='legacy' ? brew.text.match(/\\page/g) : brew.text.match(/^\\page$/gm)) || []).length + 1;
if(this.state.saveGoogle) { if(this.state.saveGoogle) {
const res = await request const res = await request

View File

@@ -45,7 +45,7 @@ const PrintPage = createClass({
key={index} />; key={index} />;
}); });
} else { } else {
return _.map(this.state.brewText.split(/^\\page/gm), (pageText, index)=>{ return _.map(this.state.brewText.split(/^\\page$/gm), (pageText, index)=>{
pageText += `\n\\column\n&nbsp;`; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear) pageText += `\n\\column\n&nbsp;`; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
return ( return (
<div className='page' id={`p${index + 1}`} key={index} > <div className='page' id={`p${index + 1}`} key={index} >

264
package-lock.json generated
View File

@@ -38,14 +38,14 @@
"react": "^16.14.0", "react": "^16.14.0",
"react-dom": "^16.14.0", "react-dom": "^16.14.0",
"react-frame-component": "4.1.3", "react-frame-component": "4.1.3",
"react-router-dom": "5.2.0", "react-router-dom": "5.2.1",
"sanitize-filename": "1.6.3", "sanitize-filename": "1.6.3",
"superagent": "^6.1.0", "superagent": "^6.1.0",
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git" "vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-react": "^7.24.0", "eslint-plugin-react": "^7.25.1",
"pico-check": "^2.1.3" "pico-check": "^2.1.3"
}, },
"engines": { "engines": {
@@ -1665,11 +1665,14 @@
} }
}, },
"node_modules/@babel/runtime": { "node_modules/@babel/runtime": {
"version": "7.9.6", "version": "7.15.3",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz",
"integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==",
"dependencies": { "dependencies": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
},
"engines": {
"node": ">=6.9.0"
} }
}, },
"node_modules/@babel/runtime/node_modules/regenerator-runtime": { "node_modules/@babel/runtime/node_modules/regenerator-runtime": {
@@ -3856,14 +3859,15 @@
} }
}, },
"node_modules/eslint-plugin-react": { "node_modules/eslint-plugin-react": {
"version": "7.24.0", "version": "7.25.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.24.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.25.1.tgz",
"integrity": "sha512-KJJIx2SYx7PBx3ONe/mEeMz4YE0Lcr7feJTCMyyKb/341NcjuAgim3Acgan89GfPv7nxXK2+0slu0CWXYM4x+Q==", "integrity": "sha512-P4j9K1dHoFXxDNP05AtixcJEvIT6ht8FhYKsrkY0MPCPaUMYijhpWwNiRDZVtA8KFuZOkGSeft6QwH8KuVpJug==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"array-includes": "^3.1.3", "array-includes": "^3.1.3",
"array.prototype.flatmap": "^1.2.4", "array.prototype.flatmap": "^1.2.4",
"doctrine": "^2.1.0", "doctrine": "^2.1.0",
"estraverse": "^5.2.0",
"has": "^1.0.3", "has": "^1.0.3",
"jsx-ast-utils": "^2.4.1 || ^3.0.0", "jsx-ast-utils": "^2.4.1 || ^3.0.0",
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
@@ -3893,6 +3897,15 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/eslint-plugin-react/node_modules/estraverse": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
"integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
"dev": true,
"engines": {
"node": ">=4.0"
}
},
"node_modules/eslint-plugin-react/node_modules/resolve": { "node_modules/eslint-plugin-react/node_modules/resolve": {
"version": "2.0.0-next.3", "version": "2.0.0-next.3",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz",
@@ -6185,15 +6198,6 @@
"node": ">=4" "node": ">=4"
} }
}, },
"node_modules/mini-create-react-context": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.0.tgz",
"integrity": "sha512-b0TytUgFSbgFJGzJqXPKCFCBWigAjpjo+Fl7Vf7ZbKRDptszpppKxXH6DRXEABZ/gcEQczeb0iZ7JvL8e8jjCA==",
"dependencies": {
"@babel/runtime": "^7.5.5",
"tiny-warning": "^1.0.3"
}
},
"node_modules/minimalistic-assert": { "node_modules/minimalistic-assert": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
@@ -7287,12 +7291,42 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz",
"integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==" "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q=="
}, },
"node_modules/react-router": { "node_modules/react-router-dom": {
"version": "5.2.0", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.1.tgz",
"integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==", "integrity": "sha512-xhFFkBGVcIVPbWM2KEYzED+nuHQPmulVa7sqIs3ESxzYd1pYg8N8rxPnQ4T2o1zu/2QeDUWcaqST131SO1LR3w==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.1.2", "@babel/runtime": "^7.12.13",
"history": "^4.9.0",
"loose-envify": "^1.3.1",
"prop-types": "^15.6.2",
"react-router": "5.2.1",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
},
"peerDependencies": {
"react": ">=15"
}
},
"node_modules/react-router-dom/node_modules/isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"node_modules/react-router-dom/node_modules/path-to-regexp": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
"integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
"dependencies": {
"isarray": "0.0.1"
}
},
"node_modules/react-router-dom/node_modules/react-router": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.1.tgz",
"integrity": "sha512-lIboRiOtDLFdg1VTemMwud9vRVuOCZmUIT/7lUoZiSpPODiiH1UQlfXy+vPLC/7IWdFYnhRwAyNqA/+I7wnvKQ==",
"dependencies": {
"@babel/runtime": "^7.12.13",
"history": "^4.9.0", "history": "^4.9.0",
"hoist-non-react-statics": "^3.1.0", "hoist-non-react-statics": "^3.1.0",
"loose-envify": "^1.3.1", "loose-envify": "^1.3.1",
@@ -7302,75 +7336,22 @@
"react-is": "^16.6.0", "react-is": "^16.6.0",
"tiny-invariant": "^1.0.2", "tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0" "tiny-warning": "^1.0.0"
}
},
"node_modules/react-router-dom": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz",
"integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==",
"dependencies": {
"@babel/runtime": "^7.1.2",
"history": "^4.9.0",
"loose-envify": "^1.3.1",
"prop-types": "^15.6.2",
"react-router": "5.2.0",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
}
},
"node_modules/react-router-dom/node_modules/prop-types": {
"version": "15.7.2",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
"dependencies": {
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
"react-is": "^16.8.1"
}
},
"node_modules/react-router-dom/node_modules/prop-types/node_modules/loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dependencies": {
"js-tokens": "^3.0.0 || ^4.0.0"
}, },
"bin": { "peerDependencies": {
"loose-envify": "cli.js" "react": ">=15"
} }
}, },
"node_modules/react-router/node_modules/isarray": { "node_modules/react-router-dom/node_modules/react-router/node_modules/mini-create-react-context": {
"version": "0.0.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" "integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==",
},
"node_modules/react-router/node_modules/path-to-regexp": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
"integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
"dependencies": { "dependencies": {
"isarray": "0.0.1" "@babel/runtime": "^7.12.1",
} "tiny-warning": "^1.0.3"
},
"node_modules/react-router/node_modules/prop-types": {
"version": "15.7.2",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
"dependencies": {
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
"react-is": "^16.8.1"
}
},
"node_modules/react-router/node_modules/prop-types/node_modules/loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dependencies": {
"js-tokens": "^3.0.0 || ^4.0.0"
}, },
"bin": { "peerDependencies": {
"loose-envify": "cli.js" "prop-types": "^15.0.0",
"react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
} }
}, },
"node_modules/read-only-stream": { "node_modules/read-only-stream": {
@@ -10616,9 +10597,9 @@
} }
}, },
"@babel/runtime": { "@babel/runtime": {
"version": "7.9.6", "version": "7.15.3",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz",
"integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==",
"requires": { "requires": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
}, },
@@ -12517,14 +12498,15 @@
} }
}, },
"eslint-plugin-react": { "eslint-plugin-react": {
"version": "7.24.0", "version": "7.25.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.24.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.25.1.tgz",
"integrity": "sha512-KJJIx2SYx7PBx3ONe/mEeMz4YE0Lcr7feJTCMyyKb/341NcjuAgim3Acgan89GfPv7nxXK2+0slu0CWXYM4x+Q==", "integrity": "sha512-P4j9K1dHoFXxDNP05AtixcJEvIT6ht8FhYKsrkY0MPCPaUMYijhpWwNiRDZVtA8KFuZOkGSeft6QwH8KuVpJug==",
"dev": true, "dev": true,
"requires": { "requires": {
"array-includes": "^3.1.3", "array-includes": "^3.1.3",
"array.prototype.flatmap": "^1.2.4", "array.prototype.flatmap": "^1.2.4",
"doctrine": "^2.1.0", "doctrine": "^2.1.0",
"estraverse": "^5.2.0",
"has": "^1.0.3", "has": "^1.0.3",
"jsx-ast-utils": "^2.4.1 || ^3.0.0", "jsx-ast-utils": "^2.4.1 || ^3.0.0",
"minimatch": "^3.0.4", "minimatch": "^3.0.4",
@@ -12545,6 +12527,12 @@
"esutils": "^2.0.2" "esutils": "^2.0.2"
} }
}, },
"estraverse": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
"integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
"dev": true
},
"resolve": { "resolve": {
"version": "2.0.0-next.3", "version": "2.0.0-next.3",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz",
@@ -14247,15 +14235,6 @@
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
"integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ=="
}, },
"mini-create-react-context": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.0.tgz",
"integrity": "sha512-b0TytUgFSbgFJGzJqXPKCFCBWigAjpjo+Fl7Vf7ZbKRDptszpppKxXH6DRXEABZ/gcEQczeb0iZ7JvL8e8jjCA==",
"requires": {
"@babel/runtime": "^7.5.5",
"tiny-warning": "^1.0.3"
}
},
"minimalistic-assert": { "minimalistic-assert": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
@@ -15108,19 +15087,16 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz",
"integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==" "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q=="
}, },
"react-router": { "react-router-dom": {
"version": "5.2.0", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.1.tgz",
"integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==", "integrity": "sha512-xhFFkBGVcIVPbWM2KEYzED+nuHQPmulVa7sqIs3ESxzYd1pYg8N8rxPnQ4T2o1zu/2QeDUWcaqST131SO1LR3w==",
"requires": { "requires": {
"@babel/runtime": "^7.1.2", "@babel/runtime": "^7.12.13",
"history": "^4.9.0", "history": "^4.9.0",
"hoist-non-react-statics": "^3.1.0",
"loose-envify": "^1.3.1", "loose-envify": "^1.3.1",
"mini-create-react-context": "^0.4.0",
"path-to-regexp": "^1.7.0",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
"react-is": "^16.6.0", "react-router": "5.2.1",
"tiny-invariant": "^1.0.2", "tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0" "tiny-warning": "^1.0.0"
}, },
@@ -15138,58 +15114,30 @@
"isarray": "0.0.1" "isarray": "0.0.1"
} }
}, },
"prop-types": { "react-router": {
"version": "15.7.2", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.1.tgz",
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", "integrity": "sha512-lIboRiOtDLFdg1VTemMwud9vRVuOCZmUIT/7lUoZiSpPODiiH1UQlfXy+vPLC/7IWdFYnhRwAyNqA/+I7wnvKQ==",
"requires": { "requires": {
"loose-envify": "^1.4.0", "@babel/runtime": "^7.12.13",
"object-assign": "^4.1.1", "history": "^4.9.0",
"react-is": "^16.8.1" "hoist-non-react-statics": "^3.1.0",
"loose-envify": "^1.3.1",
"mini-create-react-context": "^0.4.0",
"path-to-regexp": "^1.7.0",
"prop-types": "^15.6.2",
"react-is": "^16.6.0",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
}, },
"dependencies": { "dependencies": {
"loose-envify": { "mini-create-react-context": {
"version": "1.4.0", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==",
"requires": { "requires": {
"js-tokens": "^3.0.0 || ^4.0.0" "@babel/runtime": "^7.12.1",
} "tiny-warning": "^1.0.3"
}
}
}
}
},
"react-router-dom": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz",
"integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==",
"requires": {
"@babel/runtime": "^7.1.2",
"history": "^4.9.0",
"loose-envify": "^1.3.1",
"prop-types": "^15.6.2",
"react-router": "5.2.0",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
},
"dependencies": {
"prop-types": {
"version": "15.7.2",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
"integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
"requires": {
"loose-envify": "^1.4.0",
"object-assign": "^4.1.1",
"react-is": "^16.8.1"
},
"dependencies": {
"loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
} }
} }
} }

View File

@@ -69,14 +69,14 @@
"react": "^16.14.0", "react": "^16.14.0",
"react-dom": "^16.14.0", "react-dom": "^16.14.0",
"react-frame-component": "4.1.3", "react-frame-component": "4.1.3",
"react-router-dom": "5.2.0", "react-router-dom": "5.2.1",
"sanitize-filename": "1.6.3", "sanitize-filename": "1.6.3",
"superagent": "^6.1.0", "superagent": "^6.1.0",
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git" "vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-react": "^7.24.0", "eslint-plugin-react": "^7.25.1",
"pico-check": "^2.1.3" "pico-check": "^2.1.3"
} }
} }

View File

@@ -134,8 +134,9 @@ app.get('/v3_preview', async (req, res, next)=>{
//Changelog page //Changelog page
app.get('/changelog', async (req, res, next)=>{ app.get('/changelog', async (req, res, next)=>{
const brew = { const brew = {
title : 'Changelog', title : 'Changelog',
text : changelogText text : changelogText,
renderer : 'V3'
}; };
req.brew = brew; req.brew = brew;
return next(); return next();

View File

@@ -48,6 +48,8 @@ body {
} }
.columnWrapper{ .columnWrapper{
max-height : 100%; max-height : 100%;
column-span : all;
columns : inherit;
} }
.page{ .page{
.useColumns(); .useColumns();
@@ -71,10 +73,13 @@ body {
// *****************************/ // *****************************/
p{ p{
overflow-wrap : break-word; //TODO: MAKE ALL MARGINS TOP-ONLY. USE * + * STYLE SELECTORS overflow-wrap : break-word; //TODO: MAKE ALL MARGINS TOP-ONLY. USE * + * STYLE SELECTORS
margin-bottom : 0.8em; display : block;
line-height : 1.3em; line-height : 1.3em;
&+* {
margin-top : 0.27cm;
}
&+p{ &+p{
margin-top : -0.8em; margin-top : 0;
} }
} }
ul{ ul{
@@ -124,50 +129,49 @@ body {
color : @headerText; color : @headerText;
} }
h1{ h1{
margin-bottom : 0.18cm; margin-bottom : 0.18cm; //Margin-bottom only because this is WIDE
column-span : all; column-span : all;
font-size : 0.89cm; font-size : 0.89cm;
-webkit-column-span : all; -webkit-column-span : all;
-moz-column-span : all; -moz-column-span : all;
&+p::first-letter{ &+p::first-letter{
float : left; float : left;
font-family : SolberaImitationRemake; font-family : SolberaImitationRemake;
line-height : 0.8em; line-height : 1em;
font-size: 3.5cm; font-size : 3.5cm;
padding-left: 40px; padding-left : 40px; //Allow background color to extend into margins
margin-left: -40px; margin-left : -40px;
padding-top:10px; margin-top :-0.3cm;
margin-top:-8px; padding-bottom :2px;
padding-bottom:10px; margin-bottom :-20px;
margin-bottom:-20px; background-image : linear-gradient(-45deg, #322814, #998250, #322814);
background-image: linear-gradient(-45deg, #322814, #998250, #322814); background-clip : text;
background-clip: text; -webkit-background-clip : text;
-webkit-background-clip: text; color : rgba(0, 0, 0, 0);
color: rgba(0, 0, 0, 0);
} }
&+p::first-line{ &+p::first-line{
font-variant : small-caps; font-variant : small-caps;
} }
} }
h2{ h2{
margin-top : 0px; //margin-top : 0px; //Font is misaligned. Shift up slightly
margin-bottom : 0.05cm; //margin-bottom : 0.05cm;
font-size : 0.75cm; font-size : 0.75cm;
} }
h3{ h3{
margin-top : -0.1cm; //margin-top : -0.1cm; //Font is misaligned. Shift up slightly
margin-bottom : 0.1cm; //margin-bottom : 0.1cm;
font-size : 0.575cm; font-size : 0.575cm;
border-bottom : 2px solid @headerUnderline; border-bottom : 2px solid @headerUnderline;
} }
h4{ h4{
margin-top : -0.02cm; //margin-top : -0.02cm; //Font is misaligned. Shift up slightly
margin-bottom : 0.02cm; //margin-bottom : 0.02cm;
font-size : 0.458cm; font-size : 0.458cm;
} }
h5{ h5{
margin-top : -0.02cm; //margin-top : -0.02cm; //Font is misaligned. Shift up slightly
margin-bottom : 0.02cm; //margin-bottom : 0.02cm;
font-family : ScalySansSmallCapsRemake; font-family : ScalySansSmallCapsRemake;
font-size : 0.423cm; font-size : 0.423cm;
font-weight : 900; font-weight : 900;
@@ -362,6 +366,9 @@ body {
dl { dl {
color : @headerText; color : @headerText;
} }
hr:last-of-type~dl{
color : inherit; // After the HRs, hanging indents remain black.
}
// Monster Ability table // Monster Ability table
hr + table:first-of-type{ hr + table:first-of-type{
@@ -480,6 +487,9 @@ body {
break-after : always; break-after : always;
-moz-column-break-after : always; -moz-column-break-after : always;
break-before : column; break-before : column;
&+* {
margin-top: 0;
}
} }
//Avoid breaking up //Avoid breaking up
blockquote,table{ blockquote,table{
@@ -541,6 +551,10 @@ body {
-webkit-column-span : all; -webkit-column-span : all;
-moz-column-span : all; -moz-column-span : all;
display : block; display : block;
margin-bottom : 0.34cm;
&+* {
margin-top : 0;
}
} }
//***************************** //*****************************
// * CLASS TABLE // * CLASS TABLE
@@ -659,15 +673,18 @@ body {
line-height : 1.3em; line-height : 1.3em;
padding-left : 1em; padding-left : 1em;
text-indent : -1em; text-indent : -1em;
& + * {
margin-top : 0.28cm;
}
& + dl {
margin-top : 0;
}
} }
dl + * { dl + * {
margin-top : 0.28cm; margin-top : 0.17cm;
}
dl + p {
margin-top : 0.5em;
} }
p + dl { p + dl {
margin-top: -0.5em; margin-top: 0.17cm;
} }
dt { dt {
display : inline; display : inline;