From afb5ccec8169ef960bae5b24741185ba2c94bf1b Mon Sep 17 00:00:00 2001 From: David Bolack Date: Sun, 12 May 2024 12:00:55 -0500 Subject: [PATCH] Slight Rearrange of ToC theme names and menu Reorders ToC inclusion options with slight relabel for clarity. Changes assumptions on H4, H5, and H6 snippets to assume H1-H3 class should be explicitly stated. change naming of addToToCH# to tocH# more explicitly define .addToC to h1 to h3 changes for --TOC var. --- themes/V3/5ePHB/snippets.js | 38 ++++++++++++++++++------------------- themes/V3/5ePHB/style.less | 12 ++++++++---- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index 081ab3ef3..149517fbb 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -31,29 +31,29 @@ module.exports = [ gen : TableOfContentsGen, }, { - name : 'Include up to H4', - icon : 'fas fa-dice-four', - gen : dedent `{{addToCH4 - }}`, - }, - { - name : 'Include up to H5', - icon : 'fas fa-dice-five', - gen : dedent `{{addToCH5 - }}`, - }, - { - name : 'Include up to H6', - icon : 'fas fa-dice-six', - gen : dedent `{{addToCH6 - }}`, - }, - { - name : 'Include in ToC', + name : 'Include in ToC up to H3', icon : 'fas fa-dice-six', gen : dedent `{{addToC }}`, + }, + { + name : 'Include in ToC up to H4', + icon : 'fas fa-dice-four', + gen : dedent `{{addToC,tocH4 + }}`, + }, + { + name : 'Include in ToC up to H5', + icon : 'fas fa-dice-five', + gen : dedent `{{addToC,tocH5 + }}`, + }, + { + name : 'Include in ToC up to H6', + icon : 'fas fa-dice-six', + gen : dedent `{{addToC,tocH6 + }}`, } ] }, diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 06bc7b1ac..41318cfe6 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -794,20 +794,24 @@ h6, .noToC, .toc { --TOC: exclude; } -.addToCH4 { +.tocH4 { h4 { --TOC: include; } } -.addToCH5 { +.tocH5 { h4 { --TOC: include; } h5 { --TOC: include; } } -.addToCH6 { +.tocH6 { h4 { --TOC: include; } h5 { --TOC: include; } h6 { --TOC: include; } } -.addToC { --TOC: include; } +.addToC { + h1 {--TOC: include; } + h2 {--TOC: include; } + h3 {--TOC: include; } +} .page { &:has(.toc)::after { display : none; }