Commit b9397778b127f7b83c18fcba6e76dc0525c3f47a
1 parent
b8cfce84
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
proposals_discussion: new score image
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
plugins/proposals_discussion/public/images/score.png
plugins/proposals_discussion/views/content_viewer/_proposal_card.html.erb
... | ... | @@ -2,8 +2,8 @@ |
2 | 2 | <div class="score"> |
3 | 3 | <% if proposal_card.published? %> |
4 | 4 | <% normalized_score = proposal_card.normalized_score(@holder) %> |
5 | - <% size = 25 - [5, normalized_score*25].max %> | |
6 | - <span title="<%= normalized_score %>" style="left:-<%= size %>px;background-position-x: <%= size %>px"> </span> | |
5 | + <% pos = 26 * (normalized_score*4 - 1).round %> | |
6 | + <span title="<%= normalized_score %>" style="background-position-y: -<%= pos %>px"> </span> | |
7 | 7 | <% end %> |
8 | 8 | </div> |
9 | 9 | <div class="content"> | ... | ... |