diff options
Diffstat (limited to 'web/static')
-rw-r--r-- | web/static/css/kill.ccss | 24 | ||||
-rw-r--r-- | web/static/js/kill.js | 14 |
2 files changed, 29 insertions, 9 deletions
diff --git a/web/static/css/kill.ccss b/web/static/css/kill.ccss index 6ef779c..6a97f32 100644 --- a/web/static/css/kill.ccss +++ b/web/static/css/kill.ccss @@ -76,24 +76,36 @@ table#attackers: width: 336px margin-top: 10px + th: + &:nth-child(1): + width: 33px + &:nth-child(2): + width: 200px + &:nth-child(3): + width: 33px + &:nth-child(4): + width: 70px + td: height: 64px &:nth-child(1): - width: 33px white-space: normal line-height: 0 &:nth-child(2): - width: 200px padding-left: 5px &:nth-child(3): - width: 33px white-space: normal line-height: 0 &:nth-child(4): - width: 70px text-align: right padding-right: 8px + td.attacker_type: + height: auto + line-height: normal + background-color: #222 + padding: 2px 8px + tr:nth-child(even): background-color: #181818 @@ -113,7 +125,7 @@ table#items: background-color: #222 padding: 2px 8px - tr:nth-child(odd): + tr:nth-child(even): background-color: #181818 td:nth-child(1):not(.slot): @@ -123,6 +135,6 @@ table#items: font-weight: bold padding-right: 8px .dropped: - background-color: #050 + background-color: #041 .destroyed: color: #a22 diff --git a/web/static/js/kill.js b/web/static/js/kill.js index 2c12d2d..a37c30c 100644 --- a/web/static/js/kill.js +++ b/web/static/js/kill.js @@ -79,10 +79,18 @@ window.addEvent('domready', function() { }); table = $('attackers'); + table.grab(new Element('tr').grab( + new Element('td', {'class': 'attacker_type', 'colspan': 4, 'html': 'final blow'}) + )); show_attacker(table, data['final_blow']); - data['attackers'].each(function(char) { - show_attacker(table, char); - }); + if (data['attackers'].length) { + table.grab(new Element('tr').grab( + new Element('td', {'class': 'attacker_type', 'colspan': 4, 'html': 'attackers'}) + )); + data['attackers'].each(function(char) { + show_attacker(table, char); + }); + } table = $('items'); var slots = ['subsystem', 'high', 'medium', 'low', 'rig', 'drone bay', 'cargo', 'special hold', 'implant', '???']; |