0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 05:22:38 +00:00

Merge branch 'master' of https://github.com/naturalcrit/homebrewery into snippet-bar-wrapping

This commit is contained in:
Víctor Losada Hernández
2024-10-20 12:19:26 +02:00
5 changed files with 28 additions and 44 deletions

View File

@@ -179,8 +179,8 @@ const BrewRenderer = (props)=>{
styleObject.backgroundImage = `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='40px' width='200px'><text x='0' y='15' fill='%23fff7' font-size='20'>${global.config.deployment}</text></svg>")`;
}
const renderedStyle = useMemo(()=> renderStyle(), [props.style?.length, props.themeBundle]);
renderedPages = useMemo(() => renderPages(), [props.text?.length]);
const renderedStyle = useMemo(()=> renderStyle(), [props.style, props.themeBundle]);
renderedPages = useMemo(() => renderPages(), [props.text]);
return (
<>

8
package-lock.json generated
View File

@@ -39,7 +39,7 @@
"marked-smartypants-lite": "^1.0.2",
"markedLegacy": "npm:marked@^0.3.19",
"moment": "^2.30.1",
"mongoose": "^8.7.1",
"mongoose": "^8.7.2",
"nanoid": "3.3.4",
"nconf": "^0.12.1",
"react": "^18.3.1",
@@ -10661,9 +10661,9 @@
}
},
"node_modules/mongoose": {
"version": "8.7.1",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.7.1.tgz",
"integrity": "sha512-RpNMyhyzLVCVbf8xTVbrf/18G3MqQzNw5pJdvOJ60fzbCa3cOZzz9L+8XpqzBXtRlgZGWv0T7MmOtvrT8ocp1Q==",
"version": "8.7.2",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.7.2.tgz",
"integrity": "sha512-Ok4VzMds9p5G3ZSUhmvBm1GdxanbzhS29jpSn02SPj+IXEVFnIdfwAlHHXWkyNscZKlcn8GuMi68FH++jo0flg==",
"dependencies": {
"bson": "^6.7.0",
"kareem": "2.6.3",

View File

@@ -115,7 +115,7 @@
"marked-smartypants-lite": "^1.0.2",
"markedLegacy": "npm:marked@^0.3.19",
"moment": "^2.30.1",
"mongoose": "^8.7.1",
"mongoose": "^8.7.2",
"nanoid": "3.3.4",
"nconf": "^0.12.1",
"react": "^18.3.1",

View File

@@ -154,31 +154,6 @@ module.exports = [
]
},
{
name : 'Table of Contents Toggles',
icon : 'fas fa-book',
//gen : `{{tocGlobalH4}}\n\n`,
disabled : true
// RELIES ON .PAGES:HAS() WHICH IS VERY SLOW
// WILL BE MOVED TO STYLE TAB SNIPPETS
// subsnippets : [
// {
// name : 'Enable H1-H4 all pages',
// icon : 'fas fa-dice-four',
// gen : `{{tocGlobalH4}}\n\n`,
// },
// {
// name : 'Enable H1-H5 all pages',
// icon : 'fas fa-dice-five',
// gen : `{{tocGlobalH5}}\n\n`,
// },
// {
// name : 'Enable H1-H6 all pages',
// icon : 'fas fa-dice-six',
// gen : `{{tocGlobalH6}}\n\n`,
// },
// ]
}
]
},
{
@@ -217,6 +192,27 @@ module.exports = [
line-height: 1em;
}\n\n`
},
{
name : 'Table of Contents Toggles',
icon : 'fas fa-book',
subsnippets : [
{
name : 'Enable H1-H4 all pages',
icon : 'fas fa-dice-four',
gen : `.page {\n\th4 {--TOC: include; }\n}\n\n`,
},
{
name : 'Enable H1-H5 all pages',
icon : 'fas fa-dice-five',
gen : `.page {\n\th4, h5 {--TOC: include; }\n}\n\n`,
},
{
name : 'Enable H1-H6 all pages',
icon : 'fas fa-dice-six',
gen : `.page {\n\th4, h5, h6 {--TOC: include; }\n}\n\n`,
},
]
}
]
},

View File

@@ -814,18 +814,6 @@ h6,
// These add Headers 'back' to inclusion.
//NOTE: DO NOT USE :HAS WITH .PAGES!!! EXTREMELY SLOW TO RENDER ON LARGE DOCS!
//WILL BE MOVED TO A STYLE TAB SNIPPET INSTEAD
// .pages:has(.tocGlobalH4) {
// h4 {--TOC: include; }
// }
// .pages:has(.tocGlobalH5) {
// h4, h5 {--TOC: include; }
// }
// .pages:has(.tocGlobalH6) {
// h4, h5, h6 {--TOC: include; }
// }
// Block level inclusion changes
// These include either a single (include) or a range (depth)