{% from "partials/apps-list-item.html" import app_item with context %} {% from "partials/apps-list-phrases.html" import phrase with context %} {% macro as_heading(item, alpha=false) %} {% set level = 2 if not alpha else 3 %} {% set name = item.name if not alpha else item.name | upper %} {{ name }} {% endmacro %} {% macro as_link(item, append=none, tag=false) %} {% set name = item.name ~ " " ~ append if not append is none else item.name %} {% set text %} {% if tag %} {{ name }} {% else %} {{ name }} {% endif %} {% endset %} {{ text }} {% endmacro %} {% macro as_toc(items, alpha=false, suffix=none) %}
{% endmacro %} {% macro as_list(apps) %} {% endmacro %} {% macro as_groups(section, alpha=false) %} {{ as_toc(section, alpha=alpha) }} {%- for item in section %} {{ as_heading(item, alpha=alpha) }} {{ as_list(item.apps)}} {% endfor -%} {% endmacro %} {% macro apps_list() %} {% if "index" in catalog %} {{ as_groups(catalog.index, alpha=true) }} {% elif "by_discipline" in catalog %} {{ as_groups(catalog.by_discipline) }} {% elif "by_availability" in catalog %}

{{ phrase("Applications available on") }}

{{ as_toc(catalog.by_availability.on_systems) }}

{{ phrase("Interactive web applications available on") }}

{{ as_toc(catalog.by_availability.on_web, suffix=phrase("web interface")) }} {%- for system in catalog.by_availability.on_systems %} {{ as_heading(system) }} {{ as_list(system.apps) }} {% endfor -%} {%- for system in catalog.by_availability.on_web %} {% set web_system = {"name": system.name ~ " " ~ phrase("web interface"), "id": system.id} %} {{ as_heading(web_system) }} {{ as_list(system.apps) }} {% endfor -%} {% endif %} {% endmacro %}