updated conditional styling
This commit is contained in:
parent
60f28672d3
commit
4cb62d830d
8 changed files with 1115 additions and 30 deletions
|
|
@ -6,7 +6,7 @@
|
|||
<h1 class="text-2xl text-white">{{ name }}'s SK TCG Trader</h1>
|
||||
|
||||
<table id="card_table" class="my-4 border-collapse text-center">
|
||||
<tr class="text-gray-100 bg-gray-500 font-bold text-xl">
|
||||
<tr class="text-gray-100 bg-blue-500 font-bold text-xl">
|
||||
<th class="p-2 border-2 border-gray-950">Card Name</th>
|
||||
<th class="p-2 border-2 border-gray-950">Card Value</th>
|
||||
<th class="p-2 border-2 border-gray-950">Card Count</th>
|
||||
|
|
@ -14,13 +14,21 @@
|
|||
</tr>
|
||||
<!-- TODO: Add for loop for cards in data -->
|
||||
{% for card in cards %}
|
||||
<tr class="text-gray-900 bg-gray-300 text-lg">
|
||||
<td class="p-2 border-2 border-gray-950">{{ card.name }}</td>
|
||||
<td class="p-2 border-2 border-gray-950">{{ card.usd_value }}</td>
|
||||
<td class="p-2 border-2 border-gray-950">{{ card.count }}</td>
|
||||
<tr class="text-gray-900 bg-blue-400 text-lg">
|
||||
<td class="p-2 border-2 border-gray-950">{{ card.name|capitalize }}</td>
|
||||
{% if card.usd_value > 5.00 %}
|
||||
<td class="p-2 border-2 bg-green-400 border-gray-950">{{ card.usd_value }}</td>
|
||||
{% else if card.usd_value < 1.00 %}
|
||||
<td class="p-2 border-2 bg-red-400 border-gray-950">{{ card.usd_value }}</td>
|
||||
{% else %}
|
||||
<td class="p-2 border-2 bg-yellow-400 border-gray-950">{{ card.usd_value }}</td>
|
||||
{% endif %}
|
||||
<td class="p-2 border-2 border-gray-950">{{ card.count }}</td>
|
||||
<td class="p-2 border-2 border-gray-950">
|
||||
<button class="p-2 rounded-xl bg-purple-500 text-lg font-bold text-gray-100">
|
||||
{% include "icons/data.html"%}
|
||||
<button class="p-2 rounded-xl bg-purple-500 text-lg text-gray-100">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-8 h-8">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25M9 16.5v.75m3-3v3M15 12v5.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" />
|
||||
</svg>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue