0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 01:02:47 +00:00

Merge pull request #3836 from dbolack-ab/MigrateGlobaltocToggles

Migrate .tocGlobalH? toggles
This commit is contained in:
Trevor Buckner
2024-10-18 10:56:33 -04:00
committed by GitHub
2 changed files with 21 additions and 37 deletions

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)