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

@ -218,3 +218,22 @@ i.rules-icon:hover {
margin-right: 5px; margin-right: 5px;
border-radius: 50%; 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> </div>
</nav> </nav>
</div> </div>
<div class="section active cover-1" id="header"> <div id="onlineplayers" class="modal modal-fixed-footer">
<h3 id="status"> <span id="online" ></span></h3> <div class="modal-content">
<a href="#onlineplayers" class="button modal-trigger" data-target="onlineplayers">Online Players</a> <h4>Current Online Players</h4>
<ul id="players"></ul>
<div id="onlineplayers" class="modal"> </div>
<div class="modal-content"> <div class="modal-footer">
<h4>Current Online Players</h4> <a href="#!" class=" modal-action modal-close btn-flat">Close</a>
<ul id="players"></ul> </div>
</div>
<div class="modal-footer">
<a href="#!" class=" modal-action modal-close btn-flat">Close</a>
</div>
</div>
</div> </div>
</div>
<div class="section cover-2" id="rules"> <div class="section cover-2" id="rules">
<h1 class="section-title">TotalFreedom Rules</h1> <h1 class="section-title">TotalFreedom Rules</h1>
<div class="rules-section"> <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;
};