Skip to content

fix: restore navbar/footer styling broken by the shared-chrome partials - #29

Merged
seabbs merged 1 commit into
mainfrom
fix/shared-navbar-styling
Aug 13, 2026
Merged

seabbs merged 1 commit into
mainfrom
fix/shared-navbar-styling

Conversation

@seabbs-bot

Copy link
Copy Markdown
Collaborator

Summary

PR #26 (shared-chrome) moved the navbar/footer from Quarto's
config-driven website.navbar/website.page-footer to static HTML
partials injected via include-before-body/include-after-body. The
hand-rolled markup diverged from what Quarto's own navbar renderer
used to produce, and the injection point turned out to land inside
<main> rather than at the body root, breaking several things
visually:

  • Navbar was forced dark (navbar-dark bg-dark) regardless of the
    site's light/dark theme.
  • The epinowcast forum link used the Discord icon instead of the
    Discourse one, in both the navbar and footer.
  • No dark-mode toggle in the navbar, so Quarto's JS fallback floated
    an unstyled toggle button in the page's top-right corner.
  • Search rendered as a permanently-open text box jammed into the
    navbar instead of the compact icon-triggered overlay, because
    website.search had no location/type to infer from.
  • Footer used a generic Bootstrap grid instead of Quarto's
    .nav-footer classes, losing the muted link colour/border, and
    causing the per-page "Edit this page / Report an issue" injection
    to append as a second, differently styled row.

This restores parity with the pre-#26 styling while keeping the
partials as the single source of truth shared with the tutorials
site.

Test plan

  • Rendered approaches/composed-distributions.qmd before (main)
    and after this change and compared screenshots — navbar/footer
    now match the pre-feat: shared navbar/footer partials + Packages nav + add Sebastian Funk to team #26 design (light navbar, correct icons, dark
    mode toggle, compact search, muted footer links, single merged
    footer row).
  • CI build/deploy succeeds
  • Spot-check the homepage and a page with a left TOC sidebar in a
    real browser, including toggling dark mode

This was opened by a bot. Please ping @seabbs for any questions.

PR #26 replaced the config-driven navbar/footer with static HTML
partials injected via include-before-body/include-after-body, but the
hand-rolled markup diverged from what Quarto's own navbar renderer
produced, and the injection point turned out to sit inside <main>
rather than at the body root:

- navbar forced navbar-dark bg-dark, giving a dark bar even in light
  mode; theme-light.scss/theme-dark.scss already drive the navbar
  colours via $navbar-bg/$navbar-fg, so drop the hardcoded background.
- the epinowcast forum link used bi-discord instead of bi-discourse,
  in both the navbar and the footer.
- the navbar had no dark-mode toggle, so Quarto's fallback JS floated
  an unstyled toggle button in the top-right corner of the page.
- website.search had no location/type, so Quarto defaulted to a
  sidebar textbox — rendered as a permanently-open input jammed into
  the navbar instead of the icon-triggered overlay a navbar location
  gets.
- the footer used a generic Bootstrap row/col grid instead of Quarto's
  .nav-footer classes, losing the muted link colour and hairline
  border, and causing the per-page repo-actions injection (Edit this
  page/Report an issue) to append as a second, differently styled row
  instead of merging into the existing one.
- header#quarto-header.fixed-top (to restore headroom hide-on-scroll)
  was tried and reverted: include-before-body content lands inside
  <main>, and <main> has its own CSS transform, which becomes the
  containing block for position:fixed descendants — that pinned the
  bar partway down the page and overlapped the title. position:sticky
  needs no such containing block and was already the right choice.

Verified by rendering before/after and comparing screenshots.
@github-actions

Copy link
Copy Markdown

📄 Site preview built

The rendered site for this PR is available as the site-preview artifact on this run. Download it and open _site/index.html to review.

@seabbs
seabbs merged commit 4b69c28 into main Aug 13, 2026
3 checks passed
@seabbs
seabbs deleted the fix/shared-navbar-styling branch August 13, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants