Browse Source

touch up styles on right side of kill

victim, attackers
raylu 12 years ago
parent
commit
48d146a1cb
3 changed files with 44 additions and 18 deletions
  1. 7 4
      web/static/css/base.ccss
  2. 32 9
      web/static/css/kill.ccss
  3. 5 5
      web/static/js/kill.js

+ 7 - 4
web/static/css/base.ccss

@@ -22,10 +22,13 @@ form:
 		border: 1px solid #cdd
 		padding: 5px 10px
 
-td:
-	white-space: nowrap
-	overflow: hidden
-	text-overflow: ellipsis
+table:
+	border-collapse: collapse
+
+	td:
+		white-space: nowrap
+		overflow: hidden
+		text-overflow: ellipsis
 
 .clear:
 	clear: both

+ 32 - 9
web/static/css/kill.ccss

@@ -44,41 +44,64 @@
 table#victim:
 	float: right
 	table-layout: fixed
-	width: 388px
+	width: 336px
+	background-color: #181818
+
+	td:nth-child(1):
+		width: 65px
+		line-height: 0
+	td:nth-child(2):
+		width: 271px
+		padding-left: 8px
 
 table#attackers:
 	float: right
 	table-layout: fixed
-	width: 388px
+	width: 336px
+	margin-top: 10px
 
 	td:
 		height: 64px
 		&:nth-child(1):
-			width: 66px
+			width: 33px
 			white-space: normal
+			line-height: 0
 		&:nth-child(2):
 			width: 200px
+			padding-left: 5px
 		&:nth-child(3):
-			width: 32px
+			width: 33px
 			white-space: normal
-		&:nth-child(3):
-			width: 50px
+			line-height: 0
+		&:nth-child(4):
+			width: 70px
+			text-align: right
+			padding-right: 8px
+
+	tr:nth-child(even):
+		background-color: #181818
 
 table#items:
 	table-layout: fixed
-	width: 460px
+	width: 500px
+	margin-top: 10px
 
 	th:nth-child(1):
-		width: 32px
+		width: 33px
 	th:nth-child(2):
-		width: 300px
+		width: 417px
 	th:nth-child(3):
 		width: 50px
 
 	.slot:
 		background-color: #222
+		padding: 2px 8px
+
 	tr:nth-child(odd):
 		background-color: #181818
+
+	td:nth-child(1):not(.slot):
+		line-height: 0
 	td:nth-child(3):
 		text-align: right
 		font-weight: bold

+ 5 - 5
web/static/js/kill.js

@@ -130,14 +130,14 @@ window.addEvent('domready', function() {
 	function show_attacker(table, char) {
 		var tr = new Element('tr');
 
-		var td = new Element('td').adopt(
-			ykill.portrait(char['character_id'], char['character_name'], 'character', '_32.jpg'),
-			ykill.portrait(char['corporation_id'], char['corporation_name'], 'corporation', '_32.png')
-		);
+		var td = new Element('td');
+		td.grab(ykill.portrait(char['character_id'], char['character_name'], 'character', '_32.jpg'));
 		if (char['alliance_id'])
 			td.grab(ykill.portrait(char['alliance_id'], char['alliance_name'], 'alliance', '_32.png'));
-		if (char['faction_id'])
+		else if (char['faction_id'])
 			td.grab(ykill.portrait(char['faction_id'], char['faction_name'], 'alliance', '_32.png'));
+		else
+			td.grab(ykill.portrait(char['corporation_id'], char['corporation_name'], 'corporation', '_32.png'));
 		tr.grab(td);
 
 		td = new Element('td');