#}
{% set userPoints = 0 %}
{% set maxScore = 0 %}
{% for att in rankingIndividual %}{% if app.user.id == att.id %}{% set userPoints = att.score %}{% endif %}{% endfor %}
{% for att in rankingIndividual %}{% if loop.first %} {% set maxScore = att.score %}{% endif %}{% endfor %}
{% set porcentajeUser = (userPoints * 100)/maxScore %}
{# animacion #}
{#
100
#}
{{maxScore}}
{#
{{userDonated}}
YOU
#}
{# Calacular el max-width para que no se salga del progressbar #}
{% set maxWidthOtherPoints = 100 %}
{% if porcentajeUser <= 20 %}
{# si el usuario tiene menos del 20 hacer la media sobre 80 #}
{% set maxWidthOtherPoints = (80 * porcentajeUser) / 100 %}
{% if maxWidthOtherPoints > 80 %}
{% set maxWidthOtherPoints = 80 %}
{% endif %}
{% else %}
{% set maxWidthOtherPoints = 100 - porcentajeUser %}
{% endif %}
{% for att in rankingIndividual %}{% if app.user.id == att.id %} {{att.score}}{% endif %}{% endfor %}