0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-10 22:12:48 +00:00

Merge branch 'master' into pr/2447

This commit is contained in:
Trevor Buckner
2022-10-28 14:04:45 -04:00
9 changed files with 3156 additions and 712 deletions

View File

@@ -45,6 +45,21 @@ pre {
## changelog ## changelog
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery). For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
### Thursday 28/10/2022 - v3.3.1
{{taskList
##### Calculuschild
* [x] Fixes to several broken CSS styles from v3.3.0
Fixes issues [#2468](https://github.com/naturalcrit/homebrewery/issues/2468)
##### Jeddai
* [x] Reduce size of thumbnails on social media links
}}
### Friday 19/10/2022 - v3.3.0 ### Friday 19/10/2022 - v3.3.0
{{taskList {{taskList
@@ -76,8 +91,6 @@ Fixes issues [#2135](https://github.com/naturalcrit/homebrewery/issues/2135)
Fixes issues [#2427](https://github.com/naturalcrit/homebrewery/issues/2427) Fixes issues [#2427](https://github.com/naturalcrit/homebrewery/issues/2427)
##### Gazook: ##### Gazook:
* [x] Several updates to bug reporting and error popups * [x] Several updates to bug reporting and error popups

View File

@@ -117,7 +117,7 @@ const BrewItem = createClass({
<i className='fas fa-tags'/> <i className='fas fa-tags'/>
{brew.tags.map((tag, idx)=>{ {brew.tags.map((tag, idx)=>{
const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/); const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
return <span className={matches[1]}>{matches[2]}</span>; return <span key={idx} className={matches[1]}>{matches[2]}</span>;
})} })}
</div> </div>
</> : <></> </> : <></>

View File

@@ -91,6 +91,7 @@ const PrintPage = createClass({
return <div> return <div>
<Meta name='robots' content='noindex, nofollow' /> <Meta name='robots' content='noindex, nofollow' />
<link href={`/themes/${rendererPath}/Blank/style.css`} rel='stylesheet'/>
{baseThemePath && {baseThemePath &&
<link href={`/themes/${rendererPath}/${baseThemePath}/style.css`} rel='stylesheet'/> <link href={`/themes/${rendererPath}/${baseThemePath}/style.css`} rel='stylesheet'/>
} }

View File

@@ -15,7 +15,7 @@ module.exports = async(name, title = '', props = {})=>{
<meta property="og:description" content="${props.brew?.description || 'No description.'}"> <meta property="og:description" content="${props.brew?.description || 'No description.'}">
<meta property="og:site_name" content="The Homebrewery - Make your Homebrew content look legit!"> <meta property="og:site_name" content="The Homebrewery - Make your Homebrew content look legit!">
<meta property="og:type" content="article"> <meta property="og:type" content="article">
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary">
<title>${title.length ? `${title} - The Homebrewery`: 'The Homebrewery - NaturalCrit'}</title> <title>${title.length ? `${title} - The Homebrewery`: 'The Homebrewery - NaturalCrit'}</title>
</head> </head>
<body> <body>

3720
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{ {
"name": "homebrewery", "name": "homebrewery",
"description": "Create authentic looking D&D homebrews using only markdown", "description": "Create authentic looking D&D homebrews using only markdown",
"version": "3.3.0", "version": "3.3.1",
"engines": { "engines": {
"node": "16.11.x" "node": "16.11.x"
}, },
@@ -51,8 +51,8 @@
] ]
}, },
"dependencies": { "dependencies": {
"@babel/core": "^7.19.3", "@babel/core": "^7.19.6",
"@babel/plugin-transform-runtime": "^7.19.1", "@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.19.4", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.18.6", "@babel/preset-react": "^7.18.6",
"body-parser": "^1.20.1", "body-parser": "^1.20.1",
@@ -60,12 +60,12 @@
"codemirror": "^5.65.6", "codemirror": "^5.65.6",
"cookie-parser": "^1.4.6", "cookie-parser": "^1.4.6",
"create-react-class": "^15.7.0", "create-react-class": "^15.7.0",
"dedent-tabs": "^0.10.1", "dedent-tabs": "^0.10.2",
"express": "^4.18.2", "express": "^4.18.2",
"express-async-handler": "^1.2.0", "express-async-handler": "^1.2.0",
"express-static-gzip": "2.1.7", "express-static-gzip": "2.1.7",
"fs-extra": "10.1.0", "fs-extra": "10.1.0",
"googleapis": "108.0.0", "googleapis": "108.0.1",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"jwt-simple": "^0.5.6", "jwt-simple": "^0.5.6",
"less": "^3.13.1", "less": "^3.13.1",
@@ -74,7 +74,7 @@
"marked-extended-tables": "^1.0.5", "marked-extended-tables": "^1.0.5",
"markedLegacy": "npm:marked@^0.3.19", "markedLegacy": "npm:marked@^0.3.19",
"moment": "^2.29.4", "moment": "^2.29.4",
"mongoose": "^6.6.5", "mongoose": "^6.7.0",
"nanoid": "3.3.4", "nanoid": "3.3.4",
"nconf": "^0.12.0", "nconf": "^0.12.0",
"react": "^16.14.0", "react": "^16.14.0",
@@ -86,9 +86,9 @@
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git" "vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.25.0", "eslint": "^8.26.0",
"eslint-plugin-react": "^7.31.10", "eslint-plugin-react": "^7.31.10",
"jest": "^29.2.1", "jest": "^29.2.2",
"supertest": "^6.3.0" "supertest": "^6.3.1"
} }
} }

View File

@@ -77,9 +77,12 @@ body {
text-rendering : optimizeLegibility; text-rendering : optimizeLegibility;
page-break-before : always; page-break-before : always;
page-break-after : always; page-break-after : always;
}
//***************************** //*****************************
// * BASE // * BASE
// *****************************/ // *****************************/
.page{
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
display : block; display : block;
@@ -155,9 +158,9 @@ body {
padding-bottom : 2px; padding-bottom : 2px;
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;
@@ -175,12 +178,24 @@ body {
font-size : 0.575cm; font-size : 0.575cm;
border-bottom : 2px solid var(--HB_Color_HeaderUnderline);; border-bottom : 2px solid var(--HB_Color_HeaderUnderline);;
line-height : 0.995em; //Font is misaligned. Shift up slightly line-height : 0.995em; //Font is misaligned. Shift up slightly
& + * {
margin-top: 0.17cm;
}
}
* + h3 {
margin-top : 0.155cm; //(0.325 - 0.17)
} }
h4{ h4{
//margin-top : -0.02cm; //Font is misaligned. Shift up slightly //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;
line-height : 0.971em; //Font is misaligned. Shift up slightly line-height : 0.971em; //Font is misaligned. Shift up slightly
& + * {
margin-top: 0.09cm;
}
}
* + h4 {
margin-top : 0.235cm; //(0.325 - 0.09)
} }
h5{ h5{
//margin-top : -0.02cm; //Font is misaligned. Shift up slightly //margin-top : -0.02cm; //Font is misaligned. Shift up slightly
@@ -199,6 +214,7 @@ body {
table{ table{
.useSansSerif(); .useSansSerif();
width : 100%; width : 100%;
line-height : 16px;
& + * { & + * {
margin-top : 0.325cm; margin-top : 0.325cm;
} }
@@ -207,15 +223,17 @@ body {
font-weight : 800; font-weight : 800;
th{ th{
vertical-align : bottom; vertical-align : bottom;
padding : 0.14em 0.4em; //padding : 0.14em 0.4em;
padding : 0px 1.5px; // Both of these are temporary, just to force
//line-height : 16px; // PDF to render at same height until Chrome 108
} }
} }
tbody{ tbody{
tr{ tr{
td{ td{
//padding : 0.14em 0.4em; //padding : 0.14em 0.4em;
padding : 0px 5px; // Both of these are temporary, just to force padding : 0px 1.5px; // Both of these are temporary, just to force
height : 16px; // PDF to render at same height until Chrome 108 //line-height : 16px; // PDF to render at same height until Chrome 108
} }
&:nth-child(odd){ &:nth-child(odd){
background-color : var(--HB_Color_Accent); background-color : var(--HB_Color_Accent);
@@ -627,6 +645,9 @@ body {
&.wide:first-child { &.wide:first-child {
margin-top: 0.12cm; margin-top: 0.12cm;
} }
& + * {
margin-top: 0;
}
} }
&.decoration { &.decoration {
position:relative; position:relative;
@@ -733,24 +754,6 @@ body {
} }
} }
//*****************************
// * MUSTACHE DIVS/SPANS
// *****************************/
.page {
.block {
break-inside : avoid;
display : inline-block;
.page :where(&) {
width : 100%;
}
//-webkit-transform : translateZ(0); //Prevents shadows from breaking across columns
}
.inline-block {
display : inline-block;
text-indent : initial;
}
}
//***************************** //*****************************
// * DEFINITION LISTS // * DEFINITION LISTS
// *****************************/ // *****************************/
@@ -781,26 +784,13 @@ body {
} }
} }
//*****************************
// * BLANK LINE
// *****************************/
.page {
.blank {
height : 1em;
margin-top : 0;
}
}
//***************************** //*****************************
// * WIDE // * WIDE
// *****************************/ // *****************************/
.page .wide{ .page .wide{
column-span : all; margin-bottom : 0.325cm;
-webkit-column-span : all; }
-moz-column-span : all;
display : block; .page h1 + *{
margin-bottom : 0.34cm; margin-top : 0;
&+* {
margin-top : 0;
}
} }

View File

@@ -43,7 +43,7 @@ body {
//***************************** //*****************************
// * BASE // * BASE
// *****************************/ // *****************************/
:where(.page){ .page{
p{ p{
overflow-wrap : break-word; overflow-wrap : break-word;
display : block; display : block;
@@ -77,13 +77,7 @@ body {
img{ img{
z-index : -1; z-index : -1;
} }
:not(:where(.wide,.columnSplit,.blank,hr)) + :where(h1,h2,h3,h4,h5,h6,table,dl,.block) {
margin-top : 1em; //NOTE: MAKE ALL MARGINS TOP-ONLY FOR BEST RESULTS WITH COLUMN BREAKS. USE * + * STYLE SELECTORS
}
:where(h1,h3,h3,h4,h5,h6) + * {
margin-top : 0;
}
//***************************** //*****************************
// * HEADERS // * HEADERS
// *****************************/ // *****************************/
@@ -116,6 +110,9 @@ body {
font-weight : bold; font-weight : bold;
} }
} }
div:not(.columnWrapper) > table + table { // Side-by-side tables should not
margin-top : 0; // have vertical spacing.
}
/* Watermark */ /* Watermark */
.watermark { .watermark {
@@ -191,6 +188,10 @@ body {
-webkit-column-break-after : always; -webkit-column-break-after : always;
break-after : always; break-after : always;
-moz-column-break-after : always; -moz-column-break-after : always;
margin-top : 0;
& + * {
margin-top : 0;
}
} }
//Avoid breaking up //Avoid breaking up
blockquote,table{ blockquote,table{
@@ -214,13 +215,11 @@ body {
//***************************** //*****************************
// * MUSTACHE DIVS/SPANS // * MUSTACHE DIVS/SPANS
// *****************************/ // *****************************/
:where(.page) { .page {
.block { .block {
break-inside : avoid; break-inside : avoid;
display : inline-block; display : inline-block;
.page :where(&) { width : 100%;
width : 100%;
}
} }
.inline-block { .inline-block {
display : inline-block; display : inline-block;
@@ -231,7 +230,7 @@ body {
//***************************** //*****************************
// * DEFINITION LISTS // * DEFINITION LISTS
// *****************************/ // *****************************/
:where(.page) { .page {
dl { dl {
padding-left : 1em; padding-left : 1em;
white-space : pre-line; white-space : pre-line;
@@ -251,17 +250,20 @@ body {
//***************************** //*****************************
// * BLANK LINE // * BLANK LINE
// *****************************/ // *****************************/
:where(.page) { .page {
.blank { .blank {
height : 1em; height : 1em;
margin-top : 0; margin-top : 0;
& + * {
margin-top : 0;
}
} }
} }
//***************************** //*****************************
// * WIDE // * WIDE
// *****************************/ // *****************************/
:where(.page) { .page {
.wide{ .wide{
column-span : all; column-span : all;
display : block; display : block;

View File

@@ -62,7 +62,7 @@
//***************************** //*****************************
// * BASE // * BASE
// *****************************/ // *****************************/
:where(.page){ .page{
color : var(--HB_Color_Text); color : var(--HB_Color_Text);
font-family : ReenieBeanie; font-family : ReenieBeanie;
font-size : 0.53cm; font-size : 0.53cm;
@@ -554,6 +554,6 @@
//***************************** //*****************************
// * WIDE // * WIDE
// *****************************/ // *****************************/
:where(.page) .wide { .page .wide {
margin-bottom : 0.45cm; margin-bottom : 0.45cm;
} }