2018-03-13 18:26:12 +01:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
|
2018-03-23 23:13:32 +01:00
|
|
|
{% block head %}
|
|
|
|
{{ super() }}
|
|
|
|
<meta http-equiv="refresh" content="600">
|
|
|
|
{% endblock %}
|
|
|
|
|
2018-03-13 18:26:12 +01:00
|
|
|
{% block scripts %}
|
2018-03-18 17:24:22 +01:00
|
|
|
{{ super() }}
|
|
|
|
<script type="text/javascript" src="static/socket.io.slim.js"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
$(document).ready(function() {
|
2018-03-18 18:21:07 +01:00
|
|
|
function request_status() {
|
|
|
|
socket.emit('request_status');
|
|
|
|
}
|
|
|
|
|
2018-03-18 17:39:01 +01:00
|
|
|
var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port);
|
2018-03-18 18:21:07 +01:00
|
|
|
var timer = setInterval(request_status, 120000);
|
2018-03-18 17:39:01 +01:00
|
|
|
|
2018-03-18 17:24:22 +01:00
|
|
|
socket.on('connect', function() {
|
|
|
|
socket.emit('connected');
|
|
|
|
});
|
|
|
|
socket.on('status', function(status) {
|
2018-03-18 17:39:01 +01:00
|
|
|
$('#led').attr('src', status.led);
|
|
|
|
$('#message').html(status.message);
|
2018-03-18 18:21:07 +01:00
|
|
|
clearInterval(timer);
|
|
|
|
timer = setInterval(request_status, 120000);
|
2018-03-18 17:24:22 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2018-03-13 18:26:12 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2018-03-18 16:31:01 +01:00
|
|
|
<h1 class="text-center">Willkommen in der Binary Kitchen!</h1>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 text-center">
|
2018-03-18 17:22:08 +01:00
|
|
|
<img id="led" src="">
|
2018-03-23 23:51:42 +01:00
|
|
|
<div class="h2" id="message"></div>
|
2018-03-18 16:31:01 +01:00
|
|
|
</div>
|
|
|
|
<div class="col-md-8">
|
2018-03-21 00:06:08 +01:00
|
|
|
<img src="static/token.png" height="400">
|
2018-03-18 16:31:01 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-03-13 18:26:12 +01:00
|
|
|
{{ super() }}
|
|
|
|
{% endblock %}
|