2018-03-13 18:26:12 +01:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
|
|
|
|
{% block scripts %}
|
|
|
|
{{ super() }}
|
2018-03-18 16:11:17 +01:00
|
|
|
<script type="text/javascript" src="static/socket.io.slim.js"></script>
|
2018-03-13 18:26:12 +01:00
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
$(document).ready(function() {
|
|
|
|
var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port)
|
|
|
|
socket.on('connect', function() {
|
|
|
|
socket.emit('connected');
|
|
|
|
});
|
|
|
|
socket.on('status', function(status) {
|
|
|
|
$('#led').html(status.led)
|
|
|
|
$('#message').html(status.message)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<h1>Willkommen in der Binary Kitchen!</h1>
|
|
|
|
<div id="led"></div>
|
|
|
|
<div id="message"></div>
|
|
|
|
{{ super() }}
|
|
|
|
{% endblock %}
|