feat: Replace custom navbar with mdbook's native navigation

Dropped the custom HTML navbar in favor of mdbook's built-in navigation.
This also resolved an issue where relative anchor links were incorrectly
appearing as entries in the mdbook sidebar.
This commit is contained in:
Matthew Binning 2026-03-22 17:21:32 -07:00
parent 0eaeee4a7f
commit e9f40ed11a
15 changed files with 9 additions and 987 deletions

View file

@ -1,9 +0,0 @@
document.addEventListener('DOMContentLoaded', function () {
fetch('/includes/navbar.html')
.then(function (res) { return res.text(); })
.then(function (html) {
var wrapper = document.createElement('div');
wrapper.innerHTML = html.trim();
document.body.insertBefore(wrapper.firstChild, document.body.firstChild);
});
});

View file

@ -1,75 +1,4 @@
/* Sepia theme override for mdbook */
/* This makes the mdbook-generated blog match the rest of the site */
/* Navbar overrides - ensure navbar looks identical to main site */
.navbar {
background-color: #5d4037 !important;
box-shadow: 0 2px 4px rgba(62, 39, 35, 0.3) !important;
position: fixed !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
z-index: 200 !important;
border-bottom: 2px solid #4e342e !important;
margin: 0 !important;
padding: 0 !important;
}
/* Push mdbook chrome below the fixed navbar */
.sidebar {
top: 3.5rem !important;
}
.page-wrapper {
padding-top: 3.5rem !important;
}
.nav-container {
max-width: 1200px !important;
margin: 0 auto !important;
padding: 1rem 2rem !important;
display: flex !important;
justify-content: space-between !important;
align-items: center !important;
}
.nav-brand {
color: #f4ecd8 !important;
text-decoration: none !important;
font-size: 1.5rem !important;
font-weight: bold !important;
}
.nav-brand:hover {
color: #d7ccc8 !important;
}
.nav-menu {
list-style: none !important;
display: flex !important;
gap: 2rem !important;
margin: 0 !important;
padding: 0 !important;
}
.nav-menu li {
margin: 0 !important;
padding: 0 !important;
line-height: 1.5 !important;
}
.nav-menu a {
color: #f4ecd8 !important;
text-decoration: none !important;
font-size: 1rem !important;
line-height: 1.5 !important;
transition: color 0.3s ease !important;
display: inline-block !important;
}
.nav-menu a:hover {
color: #d7ccc8 !important;
}
:root {
--bg: #f4ecd8;