forked from Chaospott/site
Clubstatus. Versuch 1.
This commit is contained in:
parent
a84dcabeeb
commit
ecd8119880
@ -2,7 +2,7 @@
|
|||||||
<hr id="status_bar">
|
<hr id="status_bar">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<a class="navbar-brand" href="//chaospott.de">
|
<a class="navbar-brand" href="https://chaospott.de">
|
||||||
chaospott
|
chaospott
|
||||||
</a>
|
</a>
|
||||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
@ -36,23 +36,37 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<script>
|
<script>
|
||||||
$.getJSON("https://status.chaospott.de/chaospott_mumble.json").done(function (data) {
|
$.getJSON("https://status.chaospott.de/status.json").done(function (data) {
|
||||||
if (data.connected_users > 0) {
|
if (data.state.open) {
|
||||||
$("#status_open").css("display", "block");
|
$("#status_open").css("display", "block");
|
||||||
$("#status_bar").css("borderColor", "#29A900");
|
$("#status_bar").css("borderColor", "#29A900");
|
||||||
document.getElementById("mumble_users_online").textContent=data.connected_users;
|
|
||||||
} else {
|
} else {
|
||||||
$("#status_closed").css("display", "block");
|
$("#status_closed").css("display", "block");
|
||||||
$("#status_bar").css("borderColor", "#D9534F");
|
$("#status_bar").css("borderColor", "#D9534F");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$.getJSON("https://status.chaospott.de/chaospott_mumble.json").done(function (data) {
|
||||||
|
if (data.connected_users > 0) {
|
||||||
|
$("#status_mumble_open").css("display", "block");
|
||||||
|
document.getElementById("mumble_users_online").textContent=data.connected_users;
|
||||||
|
} else {
|
||||||
|
$("#status_mumble_closed").css("display", "block");
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<li id="status_open" style="background-color:#29A900;">
|
<li id="status_open" style="background-color:#29A900;">
|
||||||
|
Club: Offen
|
||||||
|
</li>
|
||||||
|
<li id="status_closed" style="background-color:#D9534F;">
|
||||||
|
Club: Geschlossen
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li id="status_mumble_open" style="background-color:#29A900;">
|
||||||
<a href="mumble://mumble.chaospott.de" style="color:#ffffff !important;">
|
<a href="mumble://mumble.chaospott.de" style="color:#ffffff !important;">
|
||||||
<i class="fa fa-microphone"></i> Nutzer im Mumble: <span id="mumble_users_online"></span>
|
<i class="fa fa-microphone"></i> Nutzer im Mumble: <span id="mumble_users_online"></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li id="status_closed" style="background-color:#D9534F;">
|
<li id="status_mumble_closed" style="background-color:#D9534F;">
|
||||||
<a href="mumble://mumble.chaospott.de" style="color:#ffffff !important;">
|
<a href="mumble://mumble.chaospott.de" style="color:#ffffff !important;">
|
||||||
<i class="fa fa-microphone-slash"></i> Keine Nutzer im Mumble
|
<i class="fa fa-microphone-slash"></i> Keine Nutzer im Mumble
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user