mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-01 19:32:42 +00:00
Merge pull request #3689 from dbolack-ab/GlobalToCToggles
Add Style Tab Snippets for Globally toggling additional header inclusion
This commit is contained in:
@@ -27,35 +27,154 @@ module.exports = [
|
|||||||
experimental : true,
|
experimental : true,
|
||||||
subsnippets : [
|
subsnippets : [
|
||||||
{
|
{
|
||||||
name : 'Table of Contents',
|
name : 'Generate Table of Contents',
|
||||||
icon : 'fas fa-book',
|
icon : 'fas fa-book',
|
||||||
gen : TableOfContentsGen,
|
gen : TableOfContentsGen,
|
||||||
experimental : true
|
experimental : true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'Include in ToC up to H3',
|
name : 'Table of Contents Individual Inclusion',
|
||||||
icon : 'fas fa-dice-three',
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocInclude# CHANGE # to your header level
|
||||||
|
}}\n`,
|
||||||
|
subsnippets : [
|
||||||
|
{
|
||||||
|
name : 'Individual Inclusion H1',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocIncludeH1 \n
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Individual Inclusion H2',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocIncludeH2 \n
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Individual Inclusion H3',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocIncludeH3 \n
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Individual Inclusion H4',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocIncludeH4 \n
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Individual Inclusion H5',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocIncludeH5 \n
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Individual Inclusion H6',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocIncludeH6 \n
|
||||||
|
}}\n`,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Table of Contents Range Inclusion',
|
||||||
|
icon : 'fas fa-book',
|
||||||
gen : dedent `\n{{tocDepthH3
|
gen : dedent `\n{{tocDepthH3
|
||||||
}}\n`,
|
}}\n`,
|
||||||
|
subsnippets : [
|
||||||
|
{
|
||||||
|
name : 'Include in ToC up to H3',
|
||||||
|
icon : 'fas fa-dice-three',
|
||||||
|
gen : dedent `\n{{tocDepthH3
|
||||||
|
}}\n`,
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Include in ToC up to H4',
|
||||||
|
icon : 'fas fa-dice-four',
|
||||||
|
gen : dedent `\n{{tocDepthH4
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Include in ToC up to H5',
|
||||||
|
icon : 'fas fa-dice-five',
|
||||||
|
gen : dedent `\n{{tocDepthH5
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Include in ToC up to H6',
|
||||||
|
icon : 'fas fa-dice-six',
|
||||||
|
gen : dedent `\n{{tocDepthH6
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'Include in ToC up to H4',
|
name : 'Table of Contents Individual Exclusion',
|
||||||
icon : 'fas fa-dice-four',
|
icon : 'fas fa-book',
|
||||||
gen : dedent `\n{{tocDepthH4
|
gen : dedent `\n{{tocExcludeH1 \n
|
||||||
}}\n`,
|
}}\n`,
|
||||||
|
subsnippets : [
|
||||||
|
{
|
||||||
|
name : 'Individual Exclusion H1',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocExcludeH1 \n
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Individual Exclusion H2',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocExcludeH2 \n
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Individual Exclusion H3',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocExcludeH3 \n
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Individual Exclusion H4',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocExcludeH4 \n
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Individual Exclusion H5',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocExcludeH5 \n
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name : 'Individual Exclusion H6',
|
||||||
|
icon : 'fas fa-book',
|
||||||
|
gen : dedent `\n{{tocExcludeH6 \n
|
||||||
|
}}\n`,
|
||||||
|
},
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name : 'Include in ToC up to H5',
|
name : 'Table of Contents Toggles',
|
||||||
icon : 'fas fa-dice-five',
|
icon : 'fas fa-book',
|
||||||
gen : dedent `\n{{tocDepthH5
|
gen : `{{tocGlobalH4}}\n\n`,
|
||||||
}}\n`,
|
subsnippets : [
|
||||||
},
|
{
|
||||||
{
|
name : 'Enable H1-H4 all pages',
|
||||||
name : 'Include in ToC up to H6',
|
icon : 'fas fa-dice-four',
|
||||||
icon : 'fas fa-dice-six',
|
gen : `{{tocGlobalH4}}\n\n`,
|
||||||
gen : dedent `\n{{tocDepthH6
|
},
|
||||||
}}\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`,
|
||||||
|
},
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -94,7 +213,7 @@ module.exports = [
|
|||||||
background-image: linear-gradient(-45deg, #322814, #998250, #322814);
|
background-image: linear-gradient(-45deg, #322814, #998250, #322814);
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
}\n\n`
|
}\n\n`
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
--HB_Color_CaptionText : #766649; // Brown
|
--HB_Color_CaptionText : #766649; // Brown
|
||||||
--HB_Color_WatercolorStain : #BBAD82; // Light brown
|
--HB_Color_WatercolorStain : #BBAD82; // Light brown
|
||||||
--HB_Color_Footnotes : #C9AD6A; // Gold
|
--HB_Color_Footnotes : #C9AD6A; // Gold
|
||||||
|
--TOC : 'include';
|
||||||
}
|
}
|
||||||
|
|
||||||
.useSansSerif() {
|
.useSansSerif() {
|
||||||
@@ -797,7 +798,7 @@
|
|||||||
// *****************************/
|
// *****************************/
|
||||||
|
|
||||||
// Default Exclusions
|
// Default Exclusions
|
||||||
// Anything not exlcuded is included, default Headers are H1, H2, and H3.
|
// Anything not excluded is included, default Headers are H1, H2, and H3.
|
||||||
h4,
|
h4,
|
||||||
h5,
|
h5,
|
||||||
h6,
|
h6,
|
||||||
@@ -808,12 +809,23 @@ h6,
|
|||||||
.noToC,
|
.noToC,
|
||||||
.toc { --TOC: exclude; }
|
.toc { --TOC: exclude; }
|
||||||
|
|
||||||
.tocDepthH2 :is(h1, h2) {--TOC: include; }
|
|
||||||
.tocDepthH3 :is(h1, h2, h3) {--TOC: include; }
|
|
||||||
.tocDepthH4 :is(h1, h2, h3, h4) {--TOC: include; }
|
|
||||||
.tocDepthH5 :is(h1, h2, h3, h4, h5) {--TOC: include; }
|
|
||||||
.tocDepthH6 :is(h1, h2, h3, h4, h5, h6) {--TOC: include; }
|
|
||||||
|
|
||||||
|
// Brew level default inclusion changes.
|
||||||
|
// These add Headers 'back' to inclusion.
|
||||||
|
.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)
|
||||||
.tocIncludeH1 h1 {--TOC: include; }
|
.tocIncludeH1 h1 {--TOC: include; }
|
||||||
.tocIncludeH2 h2 {--TOC: include; }
|
.tocIncludeH2 h2 {--TOC: include; }
|
||||||
.tocIncludeH3 h3 {--TOC: include; }
|
.tocIncludeH3 h3 {--TOC: include; }
|
||||||
@@ -821,6 +833,21 @@ h6,
|
|||||||
.tocIncludeH5 h5 {--TOC: include; }
|
.tocIncludeH5 h5 {--TOC: include; }
|
||||||
.tocIncludeH6 h6 {--TOC: include; }
|
.tocIncludeH6 h6 {--TOC: include; }
|
||||||
|
|
||||||
|
.tocDepthH2 :is(h1, h2) {--TOC: include; }
|
||||||
|
.tocDepthH3 :is(h1, h2, h3) {--TOC: include; }
|
||||||
|
.tocDepthH4 :is(h1, h2, h3, h4) {--TOC: include; }
|
||||||
|
.tocDepthH5 :is(h1, h2, h3, h4, h5) {--TOC: include; }
|
||||||
|
.tocDepthH6 :is(h1, h2, h3, h4, h5, h6) {--TOC: include; }
|
||||||
|
|
||||||
|
// Block level exclusion changes
|
||||||
|
// These exclude a single block level
|
||||||
|
.tocExcludeH1 h1 {--TOC: exclude; }
|
||||||
|
.tocExcludeH2 h2 {--TOC: exclude; }
|
||||||
|
.tocExcludeH3 h3 {--TOC: exclude; }
|
||||||
|
.tocExcludeH4 h4 {--TOC: exclude; }
|
||||||
|
.tocExcludeH5 h5 {--TOC: exclude; }
|
||||||
|
.tocExcludeH6 h6 {--TOC: exclude; }
|
||||||
|
|
||||||
.page:has(.partCover) {
|
.page:has(.partCover) {
|
||||||
--TOC: exclude;
|
--TOC: exclude;
|
||||||
& h1 {
|
& h1 {
|
||||||
|
|||||||
Reference in New Issue
Block a user