Better way to show online players Attempt 2

This commit is contained in:
aggelosQQ 2016-08-28 03:28:47 +03:00
parent 21c4894582
commit 4129b2b9bf
3 changed files with 28 additions and 38 deletions

View file

@ -217,4 +217,23 @@ i.rules-icon:hover {
float: left;
margin-right: 5px;
border-radius: 50%;
}
.modal {
background: rgba(0,0,0,0.5);
color: #ccc;
}
.modal a {
color: rgb(200,200,200);
}
.modal ul {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
display: inline-block;
}
.modal h4 {
margin-bottom: 38px;
}
.modal > .modal-footer {
background: rgba(50,50,50,0.6);
}

View file

@ -56,20 +56,16 @@
</div>
</nav>
</div>
<div class="section active cover-1" id="header">
<h3 id="status"> <span id="online" ></span></h3>
<a href="#onlineplayers" class="button modal-trigger" data-target="onlineplayers">Online Players</a>
<div id="onlineplayers" class="modal">
<div class="modal-content">
<h4>Current Online Players</h4>
<ul id="players"></ul>
</div>
<div class="modal-footer">
<a href="#!" class=" modal-action modal-close btn-flat">Close</a>
</div>
</div>
<div id="onlineplayers" class="modal modal-fixed-footer">
<div class="modal-content">
<h4>Current Online Players</h4>
<ul id="players"></ul>
</div>
<div class="modal-footer">
<a href="#!" class=" modal-action modal-close btn-flat">Close</a>
</div>
</div>
</div>
<div class="section cover-2" id="rules">
<h1 class="section-title">TotalFreedom Rules</h1>
<div class="rules-section">

View file

@ -1,25 +0,0 @@
var parseArray = function (array, type) {
var result = "";
if (type == "developers") {
for (var i in array) {
var append = " - ";
if (array[i] == "Madgeek1450") {
append += "TFM Creator";
} else if (array[i] == "Prozza") {
append += "Lead Developer";
} else {
append += "Developer";
}
result += "<li><a href=\"#\">" + array[i] + append + "</a></li>"
}
} else {
for (var i in array) {
result += "<li><a href=\"#\">" + array[i] + "</a></li>"
}
}
return result;
};