Skip to content

Commit

Permalink
Merge pull request #1226 from codidact/0valt/1097/score-tooltips-for-…
Browse files Browse the repository at this point in the history
…post-lists

Add score tooltips for post list vote counts
  • Loading branch information
cellio authored Oct 25, 2023
2 parents be6f490 + efb6b0b commit e5574b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/posts/_article_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<% @show_category_tag = !!defined?(show_category_tag) ? show_category_tag : false %>
<% @last_activity = !!defined?(last_activity) ? last_activity : true %>
<div class="item-list--item <%= post.deleted ? 'deleted-content' : '' %>" data-ckb-list-item data-ckb-item-type="link">
<div class="item-list--number-value">
<div class="item-list--number-value" title="Score: <%= post.score %>">
<div class="meter is-question-score">
<div class="meter--bar is-<%= (post.score * 100).to_i %>%"><%= (post.score * 100).to_i %>%</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/posts/_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div class="item-list--item <%= post.deleted ? 'deleted-content' : '' %>" data-ckb-list-item data-ckb-item-type="link">
<% if post.post_type.has_votes %>
<div class="item-list--number-value">
<div class="item-list--number-value" title="Score: <%= post.score %>">
<div class="meter is-question-score">
<div class="meter--bar is-<%= (post.score * 100).to_i %>%"><%= (post.score * 100).to_i %>%</div>
</div>
Expand Down

0 comments on commit e5574b9

Please sign in to comment.