Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Tweak server list style
- Loading branch information
Showing
with
24 additions
and
8 deletions.
-
+2
−2
static/list.js
-
+4
−2
static/servers.jst
-
+18
−4
static/style.css
|
@@ -58,7 +58,7 @@ function tooltipString(str, maxLen) { |
|
|
function hoverList(name, list) { |
|
|
if (!list || list.length == 0) return ''; |
|
|
var str = '<div class="mts_hover_list">' |
|
|
str += name + '(' + list.length + ')<br />'; |
|
|
str += name + ' (' + list.length + ')<br />'; |
|
|
for (var i in list) { |
|
|
str += escapeHTML(list[i]) + '<br />'; |
|
|
} |
|
@@ -74,7 +74,7 @@ function hoverString(name, string) { |
|
|
} |
|
|
|
|
|
function draw(json) { |
|
|
html = window.render.servers(json); |
|
|
var html = window.render.servers(json); |
|
|
jQuery(master.output).html(html); |
|
|
} |
|
|
|
|
|
|
@@ -5,7 +5,7 @@ |
|
|
</div> |
|
|
{{?}} |
|
|
<table> |
|
|
<tr> |
|
|
<thead><tr> |
|
|
{{? !master.no_address}}<th>Address[:Port]</th>{{?}} |
|
|
{{? !master.no_clients}}<th>Players / Max{{? !master.no_avgtop}}<br/>Average / Top{{?}}</th>{{?}} |
|
|
{{? !master.no_version}}<th>Version, Subgame, Mapgenerator</th>{{?}} |
|
@@ -14,7 +14,8 @@ |
|
|
{{? !master.no_flags}}<th>Flags</th>{{?}} |
|
|
{{? !master.no_uptime}}<th>Uptime, Age</th>{{?}} |
|
|
{{? !master.no_ping}}<th>Ping, Lag</th>{{?}} |
|
|
</tr> |
|
|
</tr></thead> |
|
|
<tbody> |
|
|
{{~it.list :server:index}} |
|
|
{{ if (master.limit && index + 1 > master.limit) break;}} |
|
|
{{ if (master.min_clients && server.clients < master.min_clients) continue;}} |
|
@@ -68,6 +69,7 @@ |
|
|
</td>{{?}} |
|
|
</tr> |
|
|
{{~}} |
|
|
</tbody> |
|
|
</table> |
|
|
{{? master.min_clients || master.limit}} |
|
|
<a class="clickable" onclick="delete master.min_clients; delete master.limit; get();">More...</a> |
|
|
|
|
@@ -1,3 +1,7 @@ |
|
|
#server_list .total { |
|
|
font-weight: bold; |
|
|
} |
|
|
|
|
|
#server_list table { |
|
|
max-width: 100%; |
|
|
width: 100%; |
|
@@ -11,16 +15,25 @@ |
|
|
border: 1px solid gray; |
|
|
} |
|
|
|
|
|
tr:hover { |
|
|
background-color: #f0f0f0; |
|
|
#server_list thead { |
|
|
background-color: #FFA; |
|
|
} |
|
|
|
|
|
#server_list tbody tr:nth-child(even) { |
|
|
background-color: #EEE; |
|
|
} |
|
|
|
|
|
#server_list tbody tr:hover { |
|
|
background-color: #CCC; |
|
|
} |
|
|
|
|
|
.mts_hover_list { |
|
|
display: none; |
|
|
border: gray solid 1px; |
|
|
border: 1px solid #88F; |
|
|
border-radius: 4px; |
|
|
background-color: white; |
|
|
position: absolute; |
|
|
z-index: 100; |
|
|
background-color: white; |
|
|
padding: 0.5em; |
|
|
} |
|
|
|
|
@@ -37,3 +50,4 @@ td:hover .mts_hover_list { |
|
|
text-decoration: underline; |
|
|
cursor: pointer; |
|
|
} |
|
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.