diff --git a/ingrrd.css b/ingrrd.css
index b8fa4cc..f0b34dd 100644
--- a/ingrrd.css
+++ b/ingrrd.css
@@ -126,11 +126,23 @@ img.badge {
height: 30px;
}
+img.nobadge {
+ width: 30px;
+ height: 30px;
+ opacity: 0.8;
+}
+
img.minibadge {
width: 20px;
height: 20px;
}
+img.nominibadge {
+ width: 20px;
+ height: 20px;
+ opacity: 0.5;
+}
+
span.missing {
color: red;
font-weight: bold;
diff --git a/lib/globals b/lib/globals
index cb43991..c45e2a4 100644
--- a/lib/globals
+++ b/lib/globals
@@ -1,7 +1,11 @@
#!/bin/bash
-declare -A \
- last \
+declare -A \
+ last \
+ nosilver \
+ nogold \
+ noplatinum \
+ noblack \
declare -a \
bronzes \
diff --git a/lib/medals b/lib/medals
index 2bf68b7..d96a712 100644
--- a/lib/medals
+++ b/lib/medals
@@ -17,29 +17,41 @@ medals() {
then
(( silvercount++ ))
silvers+=( "$stat" )
+ elif (( last["$stat"] >= bronze["$stat"] ))
+ then
+ upsilver[( last["$stat"] - bronze["$stat"] ) * 100 / ( silver["$stat"] - bronze["$stat"] )]+="$stat "
else
- upsilver[last["$stat"] * 100 / silver["$stat"]]+="$stat "
+ nosilver["$stat"]=1
fi
if (( last["$stat"] >= gold["$stat"] ))
then
(( goldcount++ ))
golds+=( "$stat" )
+ elif (( last["$stat"] >= silver["$stat"] ))
+ then
+ upgold[( last["$stat"] - silver["$stat"] ) * 100 / ( gold["$stat"] - silver["$stat"] )]+="$stat "
else
- upgold[last["$stat"] * 100 / gold["$stat"]]+="$stat "
+ nogold["$stat"]=1
fi
if (( last["$stat"] >= platinum["$stat"] ))
then
(( platinumcount++ ))
platinums+=( "$stat" )
+ elif (( last["$stat"] >= gold["$stat"] ))
+ then
+ upplatinum[( last["$stat"] - gold["$stat"] ) * 100 / ( platinum["$stat"] - gold["$stat"] )]+="$stat "
else
- upplatinum[last["$stat"] * 100 / platinum["$stat"]]+="$stat "
+ noplatinum["$stat"]=1
fi
if (( last["$stat"] >= black["$stat"] ))
then
(( blackcount++ ))
blacks+=( "$stat" )
+ elif (( last["$stat"] >= platinum["$stat"] ))
+ then
+ upblack[( last["$stat"] - platinum["$stat"] ) * 100 / ( black["$stat"] - platinum["$stat"] )]+="$stat "
else
- upblack[last["$stat"] * 100 / black["$stat"]]+="$stat "
+ noblack["$stat"]=1
fi
done
}
diff --git a/lib/show_current_level b/lib/show_current_level
index 5412104..8b4ee3a 100644
--- a/lib/show_current_level
+++ b/lib/show_current_level
@@ -84,6 +84,21 @@ show_current_level() {
EOHTML
done
done
+ for stat in ${!nosilver[@]}
+ do
+ img=${stat,,}
+ cat <<-EOHTML
+
+
+
+ EOHTML
+ done
cat <<-EOHTML
+
+ EOHTML
+ done
cat <<-EOHTML
+
+ EOHTML
+ done
cat <<-EOHTML
+
+ EOHTML
+ done
cat <<-EOHTML