Commit 80776b8923215cb35b61e4b0cd2b6ba619dd19c8

Authored by Victor Costa
1 parent c9700e48

proposals_discussion: new score image

public/images/score.png

651 Bytes | W: | H:

1.61 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
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">&nbsp;</span>
  5 + <% pos = 26 * (normalized_score*4 - 1).round %>
  6 + <span title="<%= normalized_score %>" style="background-position-y: -<%= pos %>px">&nbsp;</span>
7 7 <% end %>
8 8 </div>
9 9 <div class="content">
... ...