Docs · The theme
The header and the bar
The floating header, the menu on a phone, and the announcement bar above them.
The header
The header is Velocity’s, floating: a rounded glass bar with the logo, the menu, the theme toggle, a GitHub icon and a button. From 1024px wide it shows the menu; narrower screens get a menu button instead. On a phone, upright or on its side, the header’s button is left out: the phone menu has it. It’s set up in src/components/site/SiteHeader.astro, and its items come from src/config/nav.config.ts (see Name, links and menu).
On a phone the menu opens as a panel (src/components/site/MobileMenu.astro): a search field, the pages with an icon each, the current page in violet, and the header’s button.
The announcement bar
The bar sits above the header, on a violet gradient, with one or two announcements. Each is a link with an optional label such as “New”, a title and a line. Visitors can close it.
It’s set in announcement in src/config/aurora.config.mjs:
announcement: {
show: true,
mobile: false,
id: 'aurora-docs',
items: [
{ href: '/docs/', key: 'announcement.first' },
{ href: '/pricing', key: 'announcement.second', icon: 'sparkles' },
],
},
| Field | What it does |
|---|---|
show |
false removes the bar. |
mobile |
false hides it on a phone, below 640px, where the top of the screen is short. Tablets and desktops keep it. |
id |
A closed bar stays closed for this id. Give a new announcement a new id, so visitors who closed the last one see it. |
items |
One or two announcements: the link, and the key of its words in the translations (tag, title and text). icon, a Lucide name, replaces the label. |
On a phone only the first announcement shows, with its label and title.
How they move together
The bar and the header are one sticky block. The bar scrolls away with the page, and the block sticks once the header reaches the top. The browser moves both, so they stay joined, and no script moves the header.