Skip to content
course-kit
Menu

<masthead>

The page header: institution, term, course title and the navigation. Reads site, term and course. The menu is Home, Syllabus, then every page of the site menu that has not set menu: false. A page other pages name as their eleventyNavigation.parent is a group: its link, then theirs. When the instructor has a booking link, it is shown under the meeting line on every page, and the menu leaves Contact to the footer.

Site sections

Examples

Default

Color scheme
Width

Open on its own

Source
<masthead></masthead>

One Column Menu

Color scheme
Width

Open on its own

Source
<masthead :@nav-columns="1"></masthead>

Two Column Menu

Color scheme
Width

Open on its own

Source
<masthead :@nav-columns="2"></masthead>

With a booking link

Color scheme
Width

Open on its own

Source
<masthead></masthead>

Props

Write them with the @ prefix, and :@ for an expression. A prop in square brackets is optional.

Name Type Description
[navColumns] 'auto' | 1 | 2 how many columns the menu is set in: auto (the default) sets it in two columns when it has more than 3 links, so a long menu keeps the header short, and in one stack otherwise; 1 and 2 fix it either way. The same as "navColumns" in course.json, and wins over it

Color tokens

The tokens this component's styles read. Set one in _data/theme.json to change it everywhere.

Pick a color to try it in every example above.

Token Colors Try a color
--color-accent Brand color: fills, buttons, rules, the masthead wash
--color-accent-text Brand color for type, dark enough to read
--color-border Lines, rules and borders
--color-on-accent Text on a brand-color fill
--color-page Page background
--color-text Body text
--color-text-muted Secondary text