{#- Expects: f (file). Sets nothing; prints the CSS type class for its extension. -#} {%- set e = f.ext|lower -%} {%- if e == 'pdf' -%}ft-pdf{%- elif e in ['doc', 'docx', 'odt', 'rtf'] -%}ft-doc{%- elif e in ['xls', 'xlsx', 'ods', 'csv'] -%}ft-xls{%- elif e in ['ppt', 'pptx', 'odp'] -%}ft-ppt{%- else -%}ft-other{%- endif -%}