mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
mimetype document mapping (temporary)
This commit is contained in:
parent
ce2f64acd0
commit
3ffeaf419a
@ -1,6 +1,8 @@
|
||||
{% macro mimeIcon(type) %}
|
||||
|
||||
{# mapping forkawesome and mime type https://gist.github.com/colemanw/9c9a12aae16a4bfe2678de86b661d922 #}
|
||||
{# mapping
|
||||
forkawesome and mime type https://gist.github.com/colemanw/9c9a12aae16a4bfe2678de86b661d922
|
||||
#}
|
||||
{% set mapmime = {
|
||||
'image': 'fa-file-image-o',
|
||||
'audio': 'fa-file-audio-o',
|
||||
@ -30,8 +32,24 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{# TODO improve mapping
|
||||
mime type and friendly name https://gist.github.com/rosskmurphy/3724501
|
||||
#}
|
||||
{% set maptype = {
|
||||
'fa-file-word-o': 'document/texte',
|
||||
'fa-file-excel-o': 'document/tableur',
|
||||
'fa-file-powerpoint-o': 'document/presentation',
|
||||
} %}
|
||||
|
||||
{% set label = type %}
|
||||
{% for key, val in maptype %}
|
||||
{% if icon == key %}
|
||||
{% set label = val %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="metadata">
|
||||
<i class="fa {{ icon }} fa-lg me-1"></i>
|
||||
{{ type }}
|
||||
{{ label|capitalize }}
|
||||
</div>
|
||||
{% endmacro %}
|
Loading…
x
Reference in New Issue
Block a user