Skip to content

Add announcement.position (above / below navbar) - #286

Merged
rich-iannone merged 6 commits into
posit-dev:mainfrom
has2k1:announcement-position
Jul 27, 2026
Merged

Add announcement.position (above / below navbar)#286
rich-iannone merged 6 commits into
posit-dev:mainfrom
has2k1:announcement-position

Conversation

@has2k1

@has2k1 has2k1 commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

This PR adds an announcement.position config key that lets users choose whether the site-wide announcement banner renders above or below the navbar.

announcement:
  content: "Version 2.0 is out!"
  position: below-navbar   # or above-navbar (default)

above-navbar
above-navbar

below-navbar
image

closes #273.

has2k1 added 6 commits July 25, 2026 00:54
Appending the banner after .quarto-secondary-nav broke the secondary
nav's mobile headroom positioning: when the fixed header unpins with
translateY(-100%), the secondary nav counter-translates by its own
height to stay pinned, which only lands at the viewport top when it is
the header's last child. Inserting the banner before the secondary nav
(instead of appending) keeps that invariant while still rendering the
banner below the navbar.

@rich-iannone rich-iannone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@rich-iannone
rich-iannone merged commit 393af82 into posit-dev:main Jul 27, 2026
8 checks passed
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.

Customise announcement banner position

2 participants