Skip to content

Commit

Permalink
Arrows highlight based on user vote
Browse files Browse the repository at this point in the history
  • Loading branch information
cletusw committed Jun 21, 2014
1 parent 1fb18e8 commit 84f4387
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cw-vote.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ svg {
width: 32px;
}

svg.highlight {
fill: #ff8c00;
}

div {
padding: 5px 0;
text-align: center;
Expand Down
4 changes: 2 additions & 2 deletions cw-vote.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

<link rel="stylesheet" href="cw-vote.css" />

<svg viewBox="0 0 10 5" on-tap="{{ voteUp }}">
<svg viewBox="0 0 10 5" on-tap="{{ voteUp }}" class="{{ { highlight: userValue === 1 } | tokenList }}">
<polygon points="0,5 5,0 10,5"></polygon>
</svg>
<div on-tap="{{ voteCancel }}">{{ value }}</div>
<svg viewBox="0 0 10 5" on-tap="{{ voteDown }}">
<svg viewBox="0 0 10 5" on-tap="{{ voteDown }}" class="{{ { highlight: userValue === -1 } | tokenList }}">
<polygon points="0,0 5,5 10,0 "></polygon>
</svg>

Expand Down

0 comments on commit 84f4387

Please sign in to comment.