2018-03-13 18:26:12 +01:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
|
|
|
|
{% 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 17:39:01 +01:00
|
|
|
var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port);
|
|
|
|
|
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 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-18 16:31:01 +01:00
|
|
|
<div id="message"></div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-8">
|
|
|
|
<!-- Here's still space left! -->
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-03-13 18:26:12 +01:00
|
|
|
{{ super() }}
|
|
|
|
{% endblock %}
|