section-icons
Semantic icon resolvers — section(slug), tradition(slug), event_type(slug), render(id). All consult data/icons.json.
On this page
macros/section-icons.html is the single entry point for rendering icons across Bifrost. Four resolver macros expose semantic lookups (section, tradition, event-type) plus a by-id renderer.
Source: themes/bifrost/templates/macros/section-icons.html · registry: data/icons.json · live registry: Reference → Icons
Public API#
{%/* import "macros/section-icons.html" as section_icons */%}
{# Semantic resolvers — slug → icon via data/icons.json bindings #}
{{ section_icons::section(slug="library") }}
{{ section_icons::tradition(slug="raelian") }}
{{ section_icons::event_type(slug="announcement") }}
{# Generic by-id renderer #}
{{ section_icons::render(id="arrow-right") }}Adding a new icon#
- Drop the SVG into
templates/partials/icons/<id>.html. - Add an entry under
iconsindata/icons.json(family, source, viewBox, usage). - Add a render-branch in the relevant macro below.
Adding a new binding#
For a new tradition slug, event-type slug, etc.:
- Edit
bindingsindata/icons.json. - Ensure the chosen
icon_idhas a render-branch in the matching resolver macro.
Why each macro has its own if-elif chain#
Tera doesn’t support computed include paths (you can’t pass a variable to {%/* include */%}), and Tera 1.x stack-overflows on self-import — so delegating semantic resolvers to a shared render(id) macro in the same file isn’t possible. The duplication is small: each kind-macro only branches on the icons actually bound to that kind.
Related#
- Reference → Icons — the live registry page that renders every icon and binding.
- Chrome → Section mark — the visual surface around resolved icons in headings.