Skip to content

Instantly share code, notes, and snippets.

@rdegges
Created July 21, 2017 01:34
Show Gist options
  • Save rdegges/f862bad1df00e64a627bc235a25a396a to your computer and use it in GitHub Desktop.
Save rdegges/f862bad1df00e64a627bc235a25a396a to your computer and use it in GitHub Desktop.
Crypto Compare styling.
<tbody>
<tr v-for="coin in coins">
<td>{{ coin.rank }}</td>
<td><img v-bind:src="getCoinImage(coin.symbol)"> {{ coin.name }}</td>
<td>{{ coin.symbol }}</td>
<td>{{ coin.price_usd | currency }}</td>
<td v-bind:style="getColor(coin.percent_change_1h)">
<span v-if="coin.percent_change_1h > 0">+</span>{{ coin.percent_change_1h }}%
</td>
<td v-bind:style="getColor(coin.percent_change_24h)">
<span v-if="coin.percent_change_24h > 0">+</span>{{ coin.percent_change_24h }}%
</td>
<td v-bind:style="getColor(coin.percent_change_7d)">
<span v-if="coin.percent_change_7d > 0">+</span>{{ coin.percent_change_7d }}%
</td>
<td>{{ coin.market_cap_usd | currency }}</td>
</tr>
</tbody>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment