nicer table
This commit is contained in:
parent
5bdb22b32a
commit
4991bfa107
34
index
34
index
@ -148,12 +148,12 @@ then
|
||||
<div>
|
||||
<table style="width:840px">
|
||||
<tr>
|
||||
<td>Level</td>
|
||||
<td>AP</td>
|
||||
<td style="width:170px">Silver</td>
|
||||
<td style="width:170px">Gold</td>
|
||||
<td style="width:170px">Platinum</td>
|
||||
<td style="width:170px">Black</td>
|
||||
<th>Level</th>
|
||||
<th>AP</th>
|
||||
<th style="width:170px">Silver</th>
|
||||
<th style="width:170px">Gold</th>
|
||||
<th style="width:170px">Platinum</th>
|
||||
<th style="width:170px">Black</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@ -242,23 +242,23 @@ then
|
||||
EOHTML
|
||||
for level in {1..16}
|
||||
do
|
||||
echo "<tr><td>$level</td>"
|
||||
echo "<tr><th style=\"text-align:right\">$level</th>"
|
||||
if (( last["AP"] >= lvl[level] ))
|
||||
then
|
||||
echo '<td style="background:lightgreen">'
|
||||
echo '<td style="text-align:right; background:lightgreen">'
|
||||
printf "%'li" ${lvl[level]}
|
||||
echo '</td>'
|
||||
else
|
||||
readable=$(printf "%'li" ${lvl[level]})
|
||||
echo '<td style="background:lightgrey">'"${readable// / }"
|
||||
echo '<td style="text-align:right; background:lightgrey">'"${readable// / }"
|
||||
readable=$(printf "%'li" $(( last["AP"] - lvl[level] )))
|
||||
echo "<br />(<span style=\"color:#FF2020;font-weight:bold\">${readable// / }</span>)</td>"
|
||||
fi
|
||||
if (( silvercount >= lvlsilver[level] ))
|
||||
then
|
||||
echo '<td style="background:lightgreen">'${lvlsilver[level]}'</td>'
|
||||
echo '<td style="text-align:center; background:lightgreen">'${lvlsilver[level]}'</td>'
|
||||
else
|
||||
echo "<td style=\"background:lightgrey\">${lvlsilver[level]} (<span style=\"color:#FF2020;font-weight:bold\">$(( silvercount - lvlsilver[level] ))</span>)<br />"
|
||||
echo "<td style=\"text-align:center; background:lightgrey\">${lvlsilver[level]} (<span style=\"color:#FF2020;font-weight:bold\">$(( silvercount - lvlsilver[level] ))</span>)<br />"
|
||||
for id in {100..0}
|
||||
do
|
||||
[ -z "${upsilver[id]}" ] && continue
|
||||
@ -285,9 +285,9 @@ then
|
||||
fi
|
||||
if (( goldcount >= lvlgold[level] ))
|
||||
then
|
||||
echo '<td style="background:lightgreen">'${lvlgold[level]}'</td>'
|
||||
echo '<td style="text-align:center; background:lightgreen">'${lvlgold[level]}'</td>'
|
||||
else
|
||||
echo "<td style=\"background:lightgrey\">${lvlgold[level]} (<span style=\"color:#FF2020;font-weight:bold\">$(( goldcount - lvlgold[level] ))</span>)<br />"
|
||||
echo "<td style=\"text-align:center; background:lightgrey\">${lvlgold[level]} (<span style=\"color:#FF2020;font-weight:bold\">$(( goldcount - lvlgold[level] ))</span>)<br />"
|
||||
for id in {100..0}
|
||||
do
|
||||
[ -z "${upgold[id]}" ] && continue
|
||||
@ -314,9 +314,9 @@ then
|
||||
fi
|
||||
if (( platinumcount >= lvlplatinum[level] ))
|
||||
then
|
||||
echo '<td style="background:lightgreen">'${lvlplatinum[level]}'</td>'
|
||||
echo '<td style="text-align:center; background:lightgreen">'${lvlplatinum[level]}'</td>'
|
||||
else
|
||||
echo "<td style=\"background:lightgrey\">${lvlplatinum[level]} (<span style=\"color:#FF2020;font-weight:bold\">$(( platinumcount - lvlplatinum[level] ))</span>)<br />"
|
||||
echo "<td style=\"text-align:center; background:lightgrey\">${lvlplatinum[level]} (<span style=\"color:#FF2020;font-weight:bold\">$(( platinumcount - lvlplatinum[level] ))</span>)<br />"
|
||||
for id in {100..0}
|
||||
do
|
||||
[ -z "${upplatinum[id]}" ] && continue
|
||||
@ -343,9 +343,9 @@ then
|
||||
fi
|
||||
if (( blackcount >= lvlblack[level] ))
|
||||
then
|
||||
echo '<td style="background:lightgreen">'${lvlblack[level]}'</td>'
|
||||
echo '<td style="text-align:center; background:lightgreen">'${lvlblack[level]}'</td>'
|
||||
else
|
||||
echo "<td style=\"background:lightgrey\">${lvlblack[level]} (<span style=\"color:#FF2020;font-weight:bold\">$(( blackcount - lvlblack[level] ))</span>)<br />"
|
||||
echo "<td style=\"text-align:center; background:lightgrey\">${lvlblack[level]} (<span style=\"color:#FF2020;font-weight:bold\">$(( blackcount - lvlblack[level] ))</span>)<br />"
|
||||
for id in {100..0}
|
||||
do
|
||||
[ -z "${upblack[id]}" ] && continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user