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