www-from-model/config/_default
Stephan Heunis 175054e4f6
All checks were successful
Deploy on webserver / Build site and deploy on success (push) Successful in 1m29s
Customize header to render submenu dropdowns
Our previous approach to allow menu item grouping, a.k.a. submenus, was to
create a menu item with a 'pageRef', and to link to other pages from that
associated content page. E.g. the 'outputs' menu links to '/outputs' and that
page links to e.g. '/instruments' and '/datasets' which aren't menu items
themselves. While functional, this approach has the drawback that the top-level,
or parent, menu item needs a 'pageRef', which means that namespace is taken and
cannot be used for a different purpose.

This new approach uses Hugo's support for submenus along with a customized
version of congo's hybrid header template and new custom CSS in order to define
parent and child menu items that are rendered as dropdown groups. Importantly,
the parent menu item needs the 'identifier' property (e.g. 'identifier = outputs')
such that its children menu items can refer to it as their parent (e.g. 'parent
= outputs'). The 'hybrid.html' template is updated for both the hamburger and
basic menu sections (which render on narrow and wide screens respectively). For
the basic menu, the parent icon will show and the dropdown will appear on hover,
containing the icons and names of all of its children menus. For the hamburger
menu, the parent is ignored and all children are rendered.

In this commit, the 'datasets' and 'instruments' menu items are created as submenus
of the 'outputs' menu item, which now has no 'pageRef' specified anymore.
2026-05-28 22:41:37 +02:00
..
hugo.toml chore: remove placeholder content and show state of things 2026-01-16 07:42:00 +01:00
languages.en.toml chore: update copyright 2026-05-19 07:59:30 +02:00
markup.toml TMP Example site to have something to build while finishing the setup 2025-10-31 10:37:20 +01:00
menus.en.toml Customize header to render submenu dropdowns 2026-05-28 22:41:37 +02:00
module.toml [DATALAD RUNCMD] chore: initialize with congo configuration defaults 2025-10-31 09:12:23 +01:00
params.toml override recent articles partial to list term pages 2026-04-22 12:24:00 +00:00
taxonomies.toml feat: build and integrate dataset records 2026-05-21 13:22:52 +02:00