site/_includes/header.html
2014-11-04 00:40:10 +01:00

45 lines
1.7 KiB
HTML

<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<hr id="status_bar" style="margin:0; border-width:4px 0px;">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="/">Home</a></li>
<li><a href="/blog.html">Logbuch</a></li>
<li><a href="/#about">&Uuml;ber uns</a></li>
<li><a href="#contact">Kontakt</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<script>
$.getJSON("http://status.chaospott.de/status.json").done(function(data) {
if(data.state.open) {
document.getElementById('status_open').style.display='block';
document.getElementById('status_bar').style.borderColor='#00ff00';
} else {
document.getElementById('status_closed').style.display='block';
document.getElementById('status_bar').style.borderColor='#ff0000';
}
});
</script>
<li id="status_open" style="display:none; border-right:0;">
<a href="#" style="color:#00ff00 !important;">
Raum: offen
</a>
</li>
<li id="status_closed" style="display:none;">
<a href="#" style="color:#ff0000;">
Raum: geschlossen
</a>
</li>
</ul>
</div>
</div>
</nav>