mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 16:22:44 +00:00
Fix .tocGlobalH?
Based on OH DEAR GOD THE LAG! discoveries related to the global toggles, these are being moved from a markup tag to a styles tab insert.
This commit is contained in:
@@ -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,28 @@ module.exports = [
|
||||
line-height: 1em;
|
||||
}\n\n`
|
||||
},
|
||||
{
|
||||
name : 'Table of Contents Toggles',
|
||||
icon : 'fas fa-book',
|
||||
disabled : false,
|
||||
subsnippets : [
|
||||
{
|
||||
name : 'Enable H1-H4 all pages',
|
||||
icon : 'fas fa-dice-four',
|
||||
gen : `\n.pages {\n h4 {--TOC: include; }\n}\n\n`,
|
||||
},
|
||||
{
|
||||
name : 'Enable H1-H5 all pages',
|
||||
icon : 'fas fa-dice-five',
|
||||
gen : `\n.pages {\n h4, h5 {--TOC: include; }\n}\n\n`,
|
||||
},
|
||||
{
|
||||
name : 'Enable H1-H6 all pages',
|
||||
icon : 'fas fa-dice-six',
|
||||
gen : `\n.pages {\n h4, h5, h6 {--TOC: include; }\n}\n\n`,
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user