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

Customizing The Header

Files: src/config/config.toml, src/config/menu.<lang>.json, src/i18n/<lang>.json, src/layouts/components/global/header/ · Skill level: Beginner

The Folex header holds these parts:

In the Tina edition, edit these in Site settings > Settings, Menus, and Interface labels at /admin/. In the Sanity edition, they are in Site settings > Settings, and the Menus and Interface labels of each language, in the Studio. The options for each page, at the end of this page, stay in code in every edition.

Customizing The Navigation Button

To show or edit the button in the header, open src/config/config.toml and find this section:

src/config/config.toml
[settings.navigationButton]
enable = true # Show or hide the button
label = "" # Button text. Leave empty to use the text in each language file
url = "/contact/" # Button link

The label is in each language file, so it can change with the language:

  1. Open src/i18n/en.json, then the same file for each of your other languages, such as src/i18n/fr.json and src/i18n/ar.json.
  2. Find the navigation group.
  3. Change the buttonLabel value.
"navigation": {
"buttonLabel": "Get Started"
}

A value in label in config.toml replaces the text in every language.

Customizing The Side Panel

The round button opens a panel from the side, with your logo, a description, your address, phone, and email, your social links, and a button. On small screens, the panel also holds the menu.

src/config/config.toml
[settings.headerOffcanvas]
enable = true
logo = "/images/logo-light.svg"
description = "" # Leave empty to use the text in each language file
[settings.headerOffcanvas.button]
enable = true
label = "" # Leave empty to use the text in each language file
url = "/contact/"

The description and button label are in each language file, under headerOffcanvas: description and buttonLabel. The address, phone, and email come from your contact information.

stickyHeader under [settings] turns on the scroll behavior of the header, such as hiding it as you scroll down.

src/config/config.toml
[settings]
stickyHeader = true

Options For Each Page

Each page file in src/pages/[...lang]/ can set these options on Base:

OptionValuesWhat it does
headerPositionsticky (the default), fixed, staticWhere the header sits
hasHeaderDarkBackgroundtrue or false (the default)Uses logoAlternate and light colors, for a dark page top
hideOffcanvastrue or false (the default)Hides the side panel and its button on large screens

This is how the pages use them:

PageheaderPositionhasHeaderDarkBackgroundhideOffcanvas
/creative-agency/fixedtruetrue
/personal-portfolio/fixedtrueNo
/startup-agency/fixedtruetrue
/about/DefaultNotrue
Every other pageDefaultNoNo

For example, in src/pages/[...lang]/startup-agency.astro:

<Base
{...page?.data}
hideOffcanvas={true}
headerPosition="fixed"
footerLayout={"footer-3"}
hasHeaderDarkBackground={true}>

Do It With AI

On the page [ROUTE FILE] in src/pages/[...lang]/, make the header [fixed / sticky] with a
[dark / light] background, using headerPosition and hasHeaderDarkBackground on Base. Don't change
any other page. Keep settings.headerOffcanvas enabled, because the mobile menu is inside it. Then
run npm run astro-check.
Type something to search...