@@ -3336,15 +3336,18 @@ https://github.com/nodeca/pako/blob/main/LICENSE
var header = document.querySelector('.app-header');
if (!header) return;
// Don't double-mount if a tool's main.js calls us a second time.
- if (header.nextElementSibling &&
- header.nextElementSibling.classList &&
- header.nextElementSibling.classList.contains('zddc-stage-strip')) {
+ if (header.previousElementSibling &&
+ header.previousElementSibling.classList &&
+ header.previousElementSibling.classList.contains('zddc-stage-strip')) {
return;
}
var project = projectSegment(location.pathname);
var active = currentStage(location.pathname);
var strip = buildStrip(project, active);
- header.parentNode.insertBefore(strip, header.nextSibling);
+ // Mount ABOVE the header — the strip is project-level chrome
+ // (where in the project), the header is tool-level chrome (which
+ // tool, theme, help). Reading order matches outer-to-inner scope.
+ header.parentNode.insertBefore(strip, header);
}
// Expose for tests + opt-out.
diff --git a/zddc/internal/apps/embedded/browse.html b/zddc/internal/apps/embedded/browse.html
index fde5ec6..4b37452 100644
--- a/zddc/internal/apps/embedded/browse.html
+++ b/zddc/internal/apps/embedded/browse.html
@@ -999,7 +999,7 @@ body {
@@ -2805,15 +2805,18 @@ https://github.com/nodeca/pako/blob/main/LICENSE
var header = document.querySelector('.app-header');
if (!header) return;
// Don't double-mount if a tool's main.js calls us a second time.
- if (header.nextElementSibling &&
- header.nextElementSibling.classList &&
- header.nextElementSibling.classList.contains('zddc-stage-strip')) {
+ if (header.previousElementSibling &&
+ header.previousElementSibling.classList &&
+ header.previousElementSibling.classList.contains('zddc-stage-strip')) {
return;
}
var project = projectSegment(location.pathname);
var active = currentStage(location.pathname);
var strip = buildStrip(project, active);
- header.parentNode.insertBefore(strip, header.nextSibling);
+ // Mount ABOVE the header — the strip is project-level chrome
+ // (where in the project), the header is tool-level chrome (which
+ // tool, theme, help). Reading order matches outer-to-inner scope.
+ header.parentNode.insertBefore(strip, header);
}
// Expose for tests + opt-out.
diff --git a/zddc/internal/apps/embedded/index.html b/zddc/internal/apps/embedded/index.html
index 503457b..1906358 100644
--- a/zddc/internal/apps/embedded/index.html
+++ b/zddc/internal/apps/embedded/index.html
@@ -988,7 +988,7 @@ body {
@@ -1908,15 +1908,18 @@ body {
var header = document.querySelector('.app-header');
if (!header) return;
// Don't double-mount if a tool's main.js calls us a second time.
- if (header.nextElementSibling &&
- header.nextElementSibling.classList &&
- header.nextElementSibling.classList.contains('zddc-stage-strip')) {
+ if (header.previousElementSibling &&
+ header.previousElementSibling.classList &&
+ header.previousElementSibling.classList.contains('zddc-stage-strip')) {
return;
}
var project = projectSegment(location.pathname);
var active = currentStage(location.pathname);
var strip = buildStrip(project, active);
- header.parentNode.insertBefore(strip, header.nextSibling);
+ // Mount ABOVE the header — the strip is project-level chrome
+ // (where in the project), the header is tool-level chrome (which
+ // tool, theme, help). Reading order matches outer-to-inner scope.
+ header.parentNode.insertBefore(strip, header);
}
// Expose for tests + opt-out.
diff --git a/zddc/internal/apps/embedded/mdedit.html b/zddc/internal/apps/embedded/mdedit.html
index 725231e..4e41a8d 100644
--- a/zddc/internal/apps/embedded/mdedit.html
+++ b/zddc/internal/apps/embedded/mdedit.html
@@ -1903,7 +1903,7 @@ body.help-open .app-header {