templates/website/includes/stars.html.twig line 1

Open in your IDE?
  1. {% from 'utils.html.twig' import ico %}
  2. {% if outline is defined and outline == true %}
  3.     {% set icoKey = 'star-o' %}
  4.     {% set wrapClass = 'stars-o' %}
  5. {% else %}
  6.     {% set icoKey = 'star' %}
  7.     {% set wrapClass = 'stars-full' %}
  8. {% endif %}
  9. {% set halfs = (halfs is defined and halfs == false)? false : true %}
  10. {% set stars = paintStars(score, halfs) %}
  11. <span class="avaliacao-stars {{ wrapClass }}">
  12.     {% for i in 0..4 %}
  13.         {% set key = (stars[i] == 'half')? icoKey ~ '-halfs' : icoKey %}
  14.         <i class="{{ stars[i] }}">{{ ico(key) }}</i>
  15.     {% endfor %}
  16. </span>