diff --git a/css/style.css b/css/style.css index 1aefdb7..3a9f681 100644 --- a/css/style.css +++ b/css/style.css @@ -252,6 +252,12 @@ body > .container-wide { max-width: 1400px; } +/* Align the navbar's inner container with the wider article layout so the + brand lines up with the ToC and the nav items line up with the right sidebar. */ +body.has-toc .navbar .container { + max-width: 1400px; +} + img { max-width: 100%; height: auto; diff --git a/index.php b/index.php index b8ed8cc..eec1f65 100644 --- a/index.php +++ b/index.php @@ -14,13 +14,18 @@ : 'light'; $blowditBg = $blowditThemeBg[$blowditTheme]; $blowditScheme = ($blowditTheme === 'light') ? 'light' : 'dark'; + + // Pre-compute before
so we can stamp the has-toc class on it, + // which lets CSS align the navbar container with the wider article container. + $blowditIsArticle = ($WHERE_AM_I === 'page' && isset($page) && !$page->isStatic() && !$url->notFound()); + $blowditHasHeadings = $blowditIsArticle && (bool) preg_match('/