{% if options.hide_when_null is not defined or options.hide_when_null is same as false or nb > 0 %}
<div class="rating-stars-container{% if options.class is defined %} {{ options.class }}{% endif %}">
{% if options.display_value is not defined or options.display_value is not same as false %}
<span class="displayed-value">{{ nb_value }}</span>
{% endif %}
{% if nb > 0 %}
{% for fullStar in 1..nb %}
<i class="fas fa-star" {% if options.color is defined %} style="color: {{ options.color }}" {% endif %}></i>
{% endfor %}
{% endif %}
{% set nbStarLeft = nbMax - nb %}
{% if (nbStarLeft > 0) %}
{% for emptyStar in 1..nbStarLeft %}
<i class="fal fa-star" {% if options.color is defined %} style="color: {{ options.color }}" {% endif %}></i>
{% endfor %}
{% endif %}
</div>
{% endif %}