{#- Navigation, rendered from data. Used by `ads/shell.html`; usable on its own. Each group is `{"section": str | None, "items": [{"href", "label", "icon"?, "image"?}]}`. A group with no section renders its items flat. `image` is a URL (a project's favicon, a customer's logo) shown where an icon would be; an entry with neither shows its initial in the folded rail. A section is a `
`, which is what lets ONE markup serve all four layouts: open in a column it is a heading and its links; closed in a bar it is a dropdown trigger and its menu. Twenty destinations in a single row is the wrong shape whatever the CSS does. -#} {% macro item(entry, current="") %}
  • {#- the icon is optional, and so is the application having an `icon()` at all -#} {% if entry.image is defined and entry.image %} {% elif icon is defined and entry.icon is defined and entry.icon %} {{ icon(entry.icon) }} {% else %} {% endif %} {{ entry.label }}
  • {% endmacro %} {% macro menu(groups, current="", layout_class="", label="Menu") %} {% endmacro %}