{# Inline SVG icons for docs nav (Phosphor-style, no icon() dependency). #} {% def section_icon_name(title, href) %} {%- let key = ((title ?? '') ~ ' ' ~ (href ?? '')) | lower -%} {%- if 'component' in key -%}cube {%- elif 'release' in key -%}rocket {%- elif 'api' in key or 'reference' in key -%}code {%- elif 'blog' in key or 'forum' in key -%}newspaper {%- elif 'doc' in key or 'guide' in key or 'start' in key or 'install' in key -%}book-open {%- elif 'tutorial' in key -%}graduation-cap {%- elif 'example' in key -%}stack {%- elif 'quality' in key or 'test' in key -%}check-circle {%- elif 'about' in key -%}info {%- elif 'build' in key or 'app' in key -%}hammer {%- else -%}{%- end -%} {% end %} {% def docs_icon(name, size=14) %} {% let s = size | string %} {% let view_box = '0 0 272 256' if name == 'folder-open' else '0 0 256 256' %} {% end %} {% def nav_type_icon(kind, branch=false) %} {% if branch %} {{ docs_icon('folder', 14) }} {% elif kind == 'api' %} {{ docs_icon('file-code', 14) }} {% else %} {{ docs_icon('article', 14) }} {% end %} {% end %} {% def catalog_rail_mark(title, href, index, icon_name=none) %} {% let _name = (icon_name ?? (section_icon_name(title, href) | trim)) | trim %} {% if _name %} {{ docs_icon(_name, 18) }} {% else %} {{ index }} {% end %} {% end %}