From 4ac80942b1a7322379a878ac22ac39daa263c663 Mon Sep 17 00:00:00 2001 From: Yi Lei Feng Date: Thu, 9 Jan 2025 10:41:51 -0500 Subject: [PATCH] fix highlighting for items not included in custom ToC --- ...000000-0000-0000-0000-000000000000_en.json | 55 ++++++------------- ...000000-0000-0000-0000-000000000000_fr.json | 12 +--- src/components/story/chapter-menu.vue | 36 ++++++++++-- src/components/story/horizontal-menu.vue | 40 +++++++++++--- src/components/story/mobile-menu.vue | 36 ++++++++++-- 5 files changed, 114 insertions(+), 65 deletions(-) diff --git a/public/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000_en.json b/public/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000_en.json index e96e34b7..2fb3ac26 100644 --- a/public/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000_en.json +++ b/public/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000_en.json @@ -648,101 +648,78 @@ "slideIndex": 0, "sublist": [ { - "title": "Community Directory", + "title": "Interactive Content + Maps", "slideIndex": 1 }, - { - "title": "Interactive Map", - "slideIndex": 2 - }, - { - "title": "RAMP Carousel", - "slideIndex": 3 - }, { "title": "Dynamic Panel", - "slideIndex": 4 - }, - { - "title": "YouTube Video", "slideIndex": 5 }, { - "title": "Cumulative Effects Video", + "title": "YouTube Video", "slideIndex": 6 } ] }, { "title": "Oil Sands Deposits", - "slideIndex": 7 - }, - { - "title": "Oil Sands Extraction", - "slideIndex": 8, - "sublist": [] + "slideIndex": 8 }, { "title": "In-situ Extraction", - "slideIndex": 9 + "slideIndex": 10 }, { "title": "Where are Facilities Located?", - "slideIndex": 10, + "slideIndex": 11, "sublist": [ { "title": "NPRI Substances Reported for Oil Sands Mining Faciltiies", - "slideIndex": 11 + "slideIndex": 12 }, { "title": "NPRI Substances Reported for Oil Sands Mining Facilities (2)", - "slideIndex": 12 + "slideIndex": 13 }, { "title": "Criteria Air Contaminant Releases From Oil Sands Mines", - "slideIndex": 13 + "slideIndex": 14 }, { "title": "Reported Mine Tailings From Oil Sands Surface Mining Facilities", - "slideIndex": 14 + "slideIndex": 15 }, { "title": "Reported Mine Tailings From Oil Sands Surface Mining Facilities (2)", - "slideIndex": 15 + "slideIndex": 16 }, { "title": "Trends in Mine Tailings Reported From Surface Mining Facilities", - "slideIndex": 16 + "slideIndex": 17 }, { "title": "Thermal in Situ Facilities", - "slideIndex": 17 + "slideIndex": 18 }, { "title": "NPRI Releases From Thermal in-situ Faciltiies", - "slideIndex": 18 + "slideIndex": 19 } ] }, { "title": "Highcharts Demo (╯°□°)╯︵ ┻━┻", - "slideIndex": 19, + "slideIndex": 20, "sublist": [ { "title": "Dynamic Slideshow with Hybrid Chart", - "slideIndex": 20 + "slideIndex": 21 } ] }, { "title": "Managing Environmental Impacts", - "slideIndex": 21, - "sublist": [ - { - "title": "Last Slide", - "slideIndex": 22 - } - ] + "slideIndex": 22 } ], "tocOrientation": "horizontal", diff --git a/public/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000_fr.json b/public/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000_fr.json index 4226782c..53187d2d 100644 --- a/public/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000_fr.json +++ b/public/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000_fr.json @@ -342,17 +342,7 @@ }, { "title": "Extraction de sables bitumineux", - "slideIndex": 2, - "sublist": [ - { - "title": "Extraction des sables bitumineux (2)", - "slideIndex": 3 - }, - { - "title": "Où sont situées les installations?", - "slideIndex": 4 - } - ] + "slideIndex": 2 }, { "title": "Substances de l'INRP déclarées par les installations d’exploitation minière de sables bitumineux", diff --git a/src/components/story/chapter-menu.vue b/src/components/story/chapter-menu.vue index dae4220e..147f7ea3 100644 --- a/src/components/story/chapter-menu.vue +++ b/src/components/story/chapter-menu.vue @@ -149,7 +149,7 @@ v-for="(item, idx) in customToc" :key="idx" :class="{ - 'is-active': lastActiveIdx === item.slideIndex + 'is-active': lastActiveIdx === item.slideIndex || isSublistActive(item.sublist) }" > @@ -221,7 +221,7 @@ diff --git a/src/components/story/horizontal-menu.vue b/src/components/story/horizontal-menu.vue index 325439ef..aa44545f 100644 --- a/src/components/story/horizontal-menu.vue +++ b/src/components/story/horizontal-menu.vue @@ -44,7 +44,7 @@ v-for="(item, idx) in customToc" :key="idx" :class="{ - 'is-active': lastActiveIdx === item.slideIndex, + 'is-active': lastActiveIdx === item.slideIndex || isSublistActive(item.sublist), separator: (!returnToTop && idx !== 0) || returnToTop }" ref="itemContainer" @@ -120,7 +120,7 @@