{% macro entry(ent) %} {% set icon = ent.guess_icon() %} {% if icon %} {% endif %} {%- if ent.name == ".." -%} Parent folder {%- else -%} {{ ent.name }} {%- endif -%} {% if ent.size %} {{ ent.size|filesizeformat }} {% else %} - {% endif %} {% endmacro %} {% macro th(key, label, colspan=1) %} {%- if sort_by == key and order > 0 -%} {{ label }} {%- else -%} {{ label }} {%- endif -%} {%- if sort_by == key -%} {%- if order > 0 -%} ASC {%- elif order < 0 -%} DESC {%- endif -%} {%- endif -%} {% endmacro %} {% macro thead() %} {{ th("name", "Name", 2) }} {{ th("modified", "Last modified") }} {{ th("size", "Size") }} {% endmacro %} {% macro breadcrumb(ent) %} {% set parent = ent.parent %} {% if parent %} {{ breadcrumb(parent) }} » {% endif %} {% set icon = ent.guess_icon() %} {% if icon %} {% endif %} {% if not ent.is_root() %} {{ ent.name }} {% endif %} {% endmacro %}