show owned badges
fix table width
This commit is contained in:
parent
1267e8984c
commit
26105a3969
126
graph
126
graph
@ -180,53 +180,134 @@ then
|
|||||||
if (( last["$stat"] >= bronze["$stat"] ))
|
if (( last["$stat"] >= bronze["$stat"] ))
|
||||||
then
|
then
|
||||||
(( bronzecount++ ))
|
(( bronzecount++ ))
|
||||||
|
bronzes+=( "$stat" )
|
||||||
else
|
else
|
||||||
upbronze[last["$stat"] * 100 / bronze["$stat"]]+="$stat "
|
upbronze[last["$stat"] * 100 / bronze["$stat"]]+="$stat "
|
||||||
fi
|
fi
|
||||||
if (( last["$stat"] >= silver["$stat"] ))
|
if (( last["$stat"] >= silver["$stat"] ))
|
||||||
then
|
then
|
||||||
(( silvercount++ ))
|
(( silvercount++ ))
|
||||||
|
silvers+=( "$stat" )
|
||||||
else
|
else
|
||||||
upsilver[last["$stat"] * 100 / silver["$stat"]]+="$stat "
|
upsilver[last["$stat"] * 100 / silver["$stat"]]+="$stat "
|
||||||
fi
|
fi
|
||||||
if (( last["$stat"] >= gold["$stat"] ))
|
if (( last["$stat"] >= gold["$stat"] ))
|
||||||
then
|
then
|
||||||
(( goldcount++ ))
|
(( goldcount++ ))
|
||||||
|
golds+=( "$stat" )
|
||||||
else
|
else
|
||||||
upgold[last["$stat"] * 100 / gold["$stat"]]+="$stat "
|
upgold[last["$stat"] * 100 / gold["$stat"]]+="$stat "
|
||||||
fi
|
fi
|
||||||
if (( last["$stat"] >= platinum["$stat"] ))
|
if (( last["$stat"] >= platinum["$stat"] ))
|
||||||
then
|
then
|
||||||
(( platinumcount++ ))
|
(( platinumcount++ ))
|
||||||
|
platinums+=( "$stat" )
|
||||||
else
|
else
|
||||||
upplatinum[last["$stat"] * 100 / platinum["$stat"]]+="$stat "
|
upplatinum[last["$stat"] * 100 / platinum["$stat"]]+="$stat "
|
||||||
fi
|
fi
|
||||||
if (( last["$stat"] >= black["$stat"] ))
|
if (( last["$stat"] >= black["$stat"] ))
|
||||||
then
|
then
|
||||||
(( blackcount++ ))
|
(( blackcount++ ))
|
||||||
|
blacks+=( "$stat" )
|
||||||
else
|
else
|
||||||
upblack[last["$stat"] * 100 / black["$stat"]]+="$stat "
|
upblack[last["$stat"] * 100 / black["$stat"]]+="$stat "
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
cat <<-EOHTML
|
cat <<-EOHTML
|
||||||
<div>
|
<div>
|
||||||
<table>
|
<table style="width:840px">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Level</td>
|
<td>Level</td>
|
||||||
<td>AP</td>
|
<td>AP</td>
|
||||||
<td>Silver</td>
|
<td style="width:170px">Silver</td>
|
||||||
<td>Gold</td>
|
<td style="width:170px">Gold</td>
|
||||||
<td>Platinum</td>
|
<td style="width:170px">Platinum</td>
|
||||||
<td>Black</td>
|
<td style="width:170px">Black</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>${last["AP"]}</td>
|
<td>${last["AP"]}</td>
|
||||||
<td>$silvercount</td>
|
<td>
|
||||||
<td>$goldcount</td>
|
EOHTML
|
||||||
<td>$platinumcount</td>
|
for stat in ${silvers[@]}
|
||||||
<td>$blackcount</td>
|
do
|
||||||
</tr>
|
img=${stat,,}
|
||||||
|
cat <<-EOHTML
|
||||||
|
<a
|
||||||
|
style="color:black;text-decoration:none"
|
||||||
|
href="#$stat">
|
||||||
|
<img
|
||||||
|
width="30"
|
||||||
|
height="30"
|
||||||
|
src="/${img//_/-}-silver.png"
|
||||||
|
title="$stat"
|
||||||
|
alt="$stat silver" />
|
||||||
|
</a>
|
||||||
|
EOHTML
|
||||||
|
done
|
||||||
|
cat <<-EOHTML
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
EOHTML
|
||||||
|
for stat in ${golds[@]}
|
||||||
|
do
|
||||||
|
img=${stat,,}
|
||||||
|
cat <<-EOHTML
|
||||||
|
<a
|
||||||
|
style="color:black;text-decoration:none"
|
||||||
|
href="#$stat">
|
||||||
|
<img
|
||||||
|
width="30"
|
||||||
|
height="30"
|
||||||
|
src="/${img//_/-}-gold.png"
|
||||||
|
title="$stat"
|
||||||
|
alt="$stat gold" />
|
||||||
|
</a>
|
||||||
|
EOHTML
|
||||||
|
done
|
||||||
|
cat <<-EOHTML
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
EOHTML
|
||||||
|
for stat in ${platinums[@]}
|
||||||
|
do
|
||||||
|
img=${stat,,}
|
||||||
|
cat <<-EOHTML
|
||||||
|
<a
|
||||||
|
style="color:black;text-decoration:none"
|
||||||
|
href="#$stat">
|
||||||
|
<img
|
||||||
|
width="30"
|
||||||
|
height="30"
|
||||||
|
src="/${img//_/-}-platinum.png"
|
||||||
|
title="$stat"
|
||||||
|
alt="$stat platinum" />
|
||||||
|
</a>
|
||||||
|
EOHTML
|
||||||
|
done
|
||||||
|
cat <<-EOHTML
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
EOHTML
|
||||||
|
for stat in ${blacks[@]}
|
||||||
|
do
|
||||||
|
img=${stat,,}
|
||||||
|
cat <<-EOHTML
|
||||||
|
<a
|
||||||
|
style="color:black;text-decoration:none"
|
||||||
|
href="#$stat">
|
||||||
|
<img
|
||||||
|
width="30"
|
||||||
|
height="30"
|
||||||
|
src="/${img//_/-}-black.png"
|
||||||
|
title="$stat"
|
||||||
|
alt="$stat black" />
|
||||||
|
</a>
|
||||||
|
EOHTML
|
||||||
|
done
|
||||||
|
cat <<-EOHTML
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
EOHTML
|
EOHTML
|
||||||
for level in {1..16}
|
for level in {1..16}
|
||||||
do
|
do
|
||||||
@ -237,11 +318,10 @@ then
|
|||||||
printf "%'li" ${lvl[level]}
|
printf "%'li" ${lvl[level]}
|
||||||
echo '</td>'
|
echo '</td>'
|
||||||
else
|
else
|
||||||
echo '<td style="background:lightgrey">'
|
readable=$(printf "%'li" ${lvl[level]})
|
||||||
printf "%'li" ${lvl[level]}
|
echo '<td style="background:lightgrey">'"${readable// / }"
|
||||||
echo " (<span style=\"color:#FF2020;font-weight:bold\">"
|
readable=$(printf "%'li" $(( last["AP"] - lvl[level] )))
|
||||||
printf "%'li" $(( last["AP"] - lvl[level] ))
|
echo "<br />(<span style=\"color:#FF2020;font-weight:bold\">${readable// / }</span>)</td>"
|
||||||
echo '</span>)</td>'
|
|
||||||
fi
|
fi
|
||||||
if (( silvercount >= lvlsilver[level] ))
|
if (( silvercount >= lvlsilver[level] ))
|
||||||
then
|
then
|
||||||
@ -261,8 +341,8 @@ then
|
|||||||
style="background:#$(printf %02x%02x $redlevel $greenlevel )00;color:black;text-decoration:none"
|
style="background:#$(printf %02x%02x $redlevel $greenlevel )00;color:black;text-decoration:none"
|
||||||
href="#$stat">
|
href="#$stat">
|
||||||
<img
|
<img
|
||||||
width="40"
|
width="30"
|
||||||
height="40"
|
height="30"
|
||||||
src="/${img//_/-}-silver.png"
|
src="/${img//_/-}-silver.png"
|
||||||
title="$stat $id%"
|
title="$stat $id%"
|
||||||
alt="$stat silver" />
|
alt="$stat silver" />
|
||||||
@ -290,8 +370,8 @@ then
|
|||||||
style="background:#$(printf %02x%02x $redlevel $greenlevel )00;color:black;text-decoration:none"
|
style="background:#$(printf %02x%02x $redlevel $greenlevel )00;color:black;text-decoration:none"
|
||||||
href="#$stat">
|
href="#$stat">
|
||||||
<img
|
<img
|
||||||
width="40"
|
width="30"
|
||||||
height="40"
|
height="30"
|
||||||
src="/${img//_/-}-gold.png"
|
src="/${img//_/-}-gold.png"
|
||||||
title="$stat $id%"
|
title="$stat $id%"
|
||||||
alt="$stat gold" />
|
alt="$stat gold" />
|
||||||
@ -319,8 +399,8 @@ then
|
|||||||
style="background:#$(printf %02x%02x $redlevel $greenlevel )00;color:black;text-decoration:none"
|
style="background:#$(printf %02x%02x $redlevel $greenlevel )00;color:black;text-decoration:none"
|
||||||
href="#$stat">
|
href="#$stat">
|
||||||
<img
|
<img
|
||||||
width="40"
|
width="30"
|
||||||
height="40"
|
height="30"
|
||||||
src="/${img//_/-}-platinum.png"
|
src="/${img//_/-}-platinum.png"
|
||||||
title="$stat $id%"
|
title="$stat $id%"
|
||||||
alt="$stat platinum" />
|
alt="$stat platinum" />
|
||||||
@ -348,8 +428,8 @@ then
|
|||||||
style="background:#$(printf %02x%02x $redlevel $greenlevel )00;color:black;text-decoration:none"
|
style="background:#$(printf %02x%02x $redlevel $greenlevel )00;color:black;text-decoration:none"
|
||||||
href="#$stat">
|
href="#$stat">
|
||||||
<img
|
<img
|
||||||
width="40"
|
width="30"
|
||||||
height="40"
|
height="30"
|
||||||
src="/${img//_/-}-black.png"
|
src="/${img//_/-}-black.png"
|
||||||
title="$stat $id%"
|
title="$stat $id%"
|
||||||
alt="$stat black" />
|
alt="$stat black" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user