Sticky header with centered tabs, scroll-spy, and full-width layout
- Move tab bar into header (centered between title and toolbar) - Make entire header sticky with border-bottom separator - Remove container max-width for full-width layout - Add scroll-spy: tree sidebar tracks visible section on scroll - Remember scroll position per tab when switching - Remove sticky section headers, use scroll-margin-top instead - Update sticky offsets to use --sticky-top CSS variable Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -524,13 +524,13 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
// Show content now that translations are loaded and tabs are set
|
||||
document.body.style.visibility = 'visible';
|
||||
|
||||
// Set CSS variable for sticky header height so section headers stack below it
|
||||
// Set CSS variable for sticky header height (header now includes tab bar)
|
||||
const headerEl = document.querySelector('header');
|
||||
if (headerEl) {
|
||||
const updateHeaderHeight = () => {
|
||||
document.documentElement.style.setProperty(
|
||||
'--header-height', headerEl.offsetHeight + 'px'
|
||||
);
|
||||
const hh = headerEl.offsetHeight;
|
||||
document.documentElement.style.setProperty('--header-height', hh + 'px');
|
||||
document.documentElement.style.setProperty('--sticky-top', hh + 'px');
|
||||
};
|
||||
updateHeaderHeight();
|
||||
window.addEventListener('resize', updateHeaderHeight);
|
||||
|
||||
Reference in New Issue
Block a user