0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +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
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
{{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)
##### Gazook:
* [x] Several updates to bug reporting and error popups

View File

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

View File

@@ -91,6 +91,7 @@ const PrintPage = createClass({
return <div>
<Meta name='robots' content='noindex, nofollow' />
<link href={`/themes/${rendererPath}/Blank/style.css`} rel='stylesheet'/>
{baseThemePath &&
<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:site_name" content="The Homebrewery - Make your Homebrew content look legit!">
<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>
</head>
<body>

3720
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -77,9 +77,12 @@ body {
text-rendering : optimizeLegibility;
page-break-before : always;
page-break-after : always;
}
//*****************************
// * BASE
// *****************************/
.page{
p{
overflow-wrap : break-word; //TODO: MAKE ALL MARGINS TOP-ONLY. USE * + * STYLE SELECTORS
display : block;
@@ -155,9 +158,9 @@ body {
padding-bottom : 2px;
margin-bottom : -20px;
background-image : linear-gradient(-45deg, #322814, #998250, #322814);
background-clip : text;
-webkit-background-clip : text;
color : rgba(0, 0, 0, 0);
background-clip : text;
-webkit-background-clip : text;
color : rgba(0, 0, 0, 0);
}
&+p::first-line{
font-variant : small-caps;
@@ -175,12 +178,24 @@ body {
font-size : 0.575cm;
border-bottom : 2px solid var(--HB_Color_HeaderUnderline);;
line-height : 0.995em; //Font is misaligned. Shift up slightly
& + * {
margin-top: 0.17cm;
}
}
* + h3 {
margin-top : 0.155cm; //(0.325 - 0.17)
}
h4{
//margin-top : -0.02cm; //Font is misaligned. Shift up slightly
//margin-bottom : 0.02cm;
font-size : 0.458cm;
line-height : 0.971em; //Font is misaligned. Shift up slightly
& + * {
margin-top: 0.09cm;
}
}
* + h4 {
margin-top : 0.235cm; //(0.325 - 0.09)
}
h5{
//margin-top : -0.02cm; //Font is misaligned. Shift up slightly
@@ -199,6 +214,7 @@ body {
table{
.useSansSerif();
width : 100%;
line-height : 16px;
& + * {
margin-top : 0.325cm;
}
@@ -207,15 +223,17 @@ body {
font-weight : 800;
th{
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{
tr{
td{
//padding : 0.14em 0.4em;
padding : 0px 5px; // Both of these are temporary, just to force
height : 16px; // PDF to render at same height until Chrome 108
padding : 0px 1.5px; // Both of these are temporary, just to force
//line-height : 16px; // PDF to render at same height until Chrome 108
}
&:nth-child(odd){
background-color : var(--HB_Color_Accent);
@@ -627,6 +645,9 @@ body {
&.wide:first-child {
margin-top: 0.12cm;
}
& + * {
margin-top: 0;
}
}
&.decoration {
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
// *****************************/
@@ -781,26 +784,13 @@ body {
}
}
//*****************************
// * BLANK LINE
// *****************************/
.page {
.blank {
height : 1em;
margin-top : 0;
}
}
//*****************************
// * WIDE
// *****************************/
.page .wide{
column-span : all;
-webkit-column-span : all;
-moz-column-span : all;
display : block;
margin-bottom : 0.34cm;
&+* {
margin-top : 0;
}
margin-bottom : 0.325cm;
}
.page h1 + *{
margin-top : 0;
}

View File

@@ -43,7 +43,7 @@ body {
//*****************************
// * BASE
// *****************************/
:where(.page){
.page{
p{
overflow-wrap : break-word;
display : block;
@@ -77,13 +77,7 @@ body {
img{
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
// *****************************/
@@ -116,6 +110,9 @@ body {
font-weight : bold;
}
}
div:not(.columnWrapper) > table + table { // Side-by-side tables should not
margin-top : 0; // have vertical spacing.
}
/* Watermark */
.watermark {
@@ -191,6 +188,10 @@ body {
-webkit-column-break-after : always;
break-after : always;
-moz-column-break-after : always;
margin-top : 0;
& + * {
margin-top : 0;
}
}
//Avoid breaking up
blockquote,table{
@@ -214,13 +215,11 @@ body {
//*****************************
// * MUSTACHE DIVS/SPANS
// *****************************/
:where(.page) {
.page {
.block {
break-inside : avoid;
display : inline-block;
.page :where(&) {
width : 100%;
}
width : 100%;
}
.inline-block {
display : inline-block;
@@ -231,7 +230,7 @@ body {
//*****************************
// * DEFINITION LISTS
// *****************************/
:where(.page) {
.page {
dl {
padding-left : 1em;
white-space : pre-line;
@@ -251,17 +250,20 @@ body {
//*****************************
// * BLANK LINE
// *****************************/
:where(.page) {
.page {
.blank {
height : 1em;
margin-top : 0;
& + * {
margin-top : 0;
}
}
}
//*****************************
// * WIDE
// *****************************/
:where(.page) {
.page {
.wide{
column-span : all;
display : block;

View File

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