Sith/pedagogy/templates/pedagogy/macros.jinja
Sli 271d57051e Upgrade to fontawesome 6
* Adapt fontawesome usage when needed
* Fix uv guide not importing css
* Remove utf8 usage for fontawesome
2024-10-03 00:06:03 +02:00

16 lines
521 B
Django/Jinja

{% macro display_star(grade) -%}
{% if grade >= 0 %}
{% for i in range(5) %}
{% if i <= grade %}
<span class="fa-solid fa-star pedagogy star-checked grade-with-star"></span>
{% else %}
<span class="fa-solid fa-star pedagogy star-not-checked grade-with-star"></span>
{% endif %}
{% endfor %}
<span class="pedagogy grade-without-star">{{ grade }}/5</span>
{% else %}
<span class="grade-text"> {% trans %} not rated {% endtrans %} </span>
{% endif %}
{%- endmacro %}