Skip to content
New: Customize your theme with an AI assistant. Read the guide

Files: src/config/config.toml, src/config/menu.<language>.json, src/i18n/<language>.json, src/content/sections/english/announcement-bar.md, page frontmatter · Skill level: Beginner

Every header has the logo, the menu with its Properties mega menu and its dropdowns, your phone number, a round search button that opens the listings, and one main button (“Book a valuation”). Below 1024 px the menu folds into a menu button. Lotline has three header layouts and an optional announcement bar above them.

Lotline overlay header over the homepage photo

Choose A Header Layout

src/config/config.toml
[settings.layout]
# overlay | bar | utility
header = "overlay"
LayoutWhat it looks likeDemo page
overlayTransparent over the photo at the top of the page, with white links, a lime mark and the lime button. It turns solid white once the page scrolls. On a page that doesn’t open with a photo, it’s a solid white bar from the start. Used by the inner pages/
barSolid white from the top, with ink links and a pine button/home-2/
utilityA thin pine strip with your phone, email and opening hours above a white bar with a lime button. The phone moves from the bar into the strip/home-3/

Lotline bar header

Lotline utility header with the pine strip

One page, another layout. Add headerLayout to the page’s frontmatter. It wins over [settings.layout] header:

---
title: "Contact"
headerLayout: "bar" # overlay | bar | utility
---

The second and third homepages set their own this way (src/content/homepage/english/home-2.md and home-3.md). A misspelled value is caught by npm run astro-check.

Which pages start with a photo. Inner pages open with a photo band (the band and tall page header layouts), and the photo-search hero on the first homepage is a full photo. The overlay header sits on top of those. Legal pages use the plain page header, so the header there is solid white. See Pages.

In the utility strip, the phone, email and hours come from [business]. Below 768 px only the phone shows. The strip and the announcement bar scroll away, and only the white bar stays pinned.

The Menu

The header menu is plain data: the headerPrimary list in src/config/menu.<language>.json. Lotline ships six items, in this order: Properties, Services, Neighborhoods, Agents, Company and Contact. Menus explains every kind of item, and Navigation explains how the menu behaves.

Properties is a mega menu. It has two columns of links (Search, with For sale, For rent, New developments and All properties, and By type, with Houses, Apartments, Townhouses and Studios), a featured listing card on the side, and a strip along the bottom with “Thinking of selling?”, a Book a valuation link and your phone number. The links are filtered views of /properties/, such as /properties/?status=sale.

Services is a dropdown of the six services, each with a short line under its name. Company is a dropdown with About us, How it works, Reviews, Careers, Blog and FAQ, plus a Homepages flyout that opens to the side with the three homepages.

On wide screens every dropdown opens in one shared panel under the header. Hover or click an item and move between items without the panel closing. The keyboard works too: Enter or Space on a menu item opens it, Tab moves through its links, and Esc closes it.

The Phone Number

From 1320 px wide, the overlay and bar headers show [business] phoneDisplay as a call link next to the search button. It’s hidden when phone is empty, and the utility layout shows the number in its strip instead. The mobile menu has a Call button with the same number. See Agency Details.

The Search Button

[settings.headerSearch]
enable = true
url = "/properties/"

The round button with the magnifier opens the listings page, where the filters are. Set enable = false to hide it, or point url at another page, such as /properties/?status=rent for a rentals agency. There is no site-wide text search. See Listing Search & Filters.

The Main Button

[settings.navigationButton]
enable = true
label = "" # i18n `navigation.buttonLabel`; a value here replaces it in every language
url = "/valuation/" # Primary header button, hidden on this page itself

To change the words, edit navigation.buttonLabel in each language file, such as src/i18n/en.json (“Book a valuation”). The button is hidden on the page it links to, so /valuation/ doesn’t show a button to itself. The mobile menu shows the same button next to Call.

A different button on one page. A primaryCta block in the page’s frontmatter changes the header button, the announcement link and the footer link to the default button page, on that page only:

primaryCta:
label: "Book a viewing"
url: "#contact" # a section id on this page, or a path
announcement: "hide" # link (swap the bar's link) | hide (no bar) | keep

Without label and url the page keeps the site default.

A text link before the search button. [settings.navigationSecondaryLink] adds a plain link (“Contact”) from 1320 px wide. It ships off:

[settings.navigationSecondaryLink]
enable = false
label = "" # navigation.secondaryLabel ("Contact")
url = "/contact/"
[settings]
stickyHeader = true # Keeps the header pinned while scrolling (the announcement bar scrolls away)

With true, the header stays at the top while you scroll. false lets it scroll away with the page.

The Announcement Bar

A thin bar above the header for a notice, with one link and a close button. It ships off. Turn it on in src/content/sections/english/announcement-bar.md (and each other language folder):

---
enable: false # Show the strip above the header on every page
id: "saturday-hours" # Change it when the message changes: visitors who closed the old one see the new one
text: "Our rentals office in Harbor District is now open on **Saturdays**, 10 AM to 4 PM." # Inline markdown and {phone} work
link:
enable: true # One link, shown after the text
label: "Office hours"
url: "/contact/"
dismissible: true # Visitors can close it; the choice is kept in their browser
start: "" # Optional first day, YYYY-MM-DD
end: "" # Optional last day, YYYY-MM-DD
hideOn: ["/contact/"] # Path prefixes where the bar stays hidden (no language prefix)
tone: "ink" # ink | mist
---
  • Change id whenever you change the text. Visitors who closed the old notice then see the new one.
  • start and end show the bar only between two dates. The end date is also checked in the visitor’s browser, so a notice doesn’t outlive its date on an old build.
  • tone is ink (a dark bar) or mist (a light one).

Do It With AI

Switch the site header to the "bar" layout in [settings.layout] of src/config/config.toml.
Change the main button to "[LABEL]" linking to [URL]: set navigation.buttonLabel in every
src/i18n/<lang>.json (translated) and url in [settings.navigationButton]. Then turn on the
announcement bar in src/content/sections/<language>/announcement-bar.md with the text
"[TEXT]" and a new id, in every language.
Type something to search...