{% from "_bytesize_icons.html" import bytesize_icon %} {%- macro icon_for_material(material) -%} {%- if material.type == 'lesson' -%} {{- bytesize_icon('chevron-right') -}} {%- elif material.type == 'cheatsheet' -%} {{- bytesize_icon('eye') -}} {%- elif material.type == 'homework' -%} {{- bytesize_icon('edit') -}} {%- elif material.type == 'special' -%} {{- bytesize_icon('flag') -}} {%- else %} {{- bytesize_icon('link') -}} {%- endif -%} {%- endmacro -%} {%- macro material_li(material) %} {%- set url = material.url_or_none() %}
  • {% if url %} {% endif %} {{- icon_for_material(material) | sanitize }} {#- XXX: no need to sanitize the icon #} {{- material.title -}} {% if url %} {% endif %}
  • {%- endmacro -%} {%- macro material_list(materials, filter_type=None) %} {%- endmacro -%}