macros.jinja 462 Bytes
Newer Older
1 2 3 4 5
{% macro display_star(grade) -%}

    {% if grade >= 0 %}
        {% for i in range(5) %}
            {% if i <= grade %}
Sli's avatar
Sli committed
6
                <span class="fa fa-star pedagogy star-checked"></span>
7
            {% else %}
Sli's avatar
Sli committed
8
                <span class="fa fa-star pedagogy star-not-checked"></span>
9 10 11
            {% endif %}
        {% endfor %}
    {% else %}
Sli's avatar
Sli committed
12
        <span class="grade-text"> {% trans %} not rated {% endtrans %} </span>
13 14 15
    {% endif %}

{%- endmacro %}