1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-12-22 18:34:25 +01:00
doorlockd-mirror/share/doorlockd/templates/display.html
Ralf Ramsauer 3dc71db095 doorlockd: templated: improve layout
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-10 01:32:47 +02:00

85 lines
2.2 KiB
HTML

{% extends "layout.html" %}
{% block head %}
{{ title }}
{{ super() }}
<meta http-equiv="refresh" content="600">
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="static/socket.io.slim.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
function request_status() {
socket.emit('request_status');
}
var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port);
var timer = setInterval(request_status, 120000);
socket.on('connect', function() {
socket.emit('connected');
});
socket.on('status', function(status) {
$('#led').attr('src', status.led);
$('#message').html(status.message);
clearInterval(timer);
timer = setInterval(request_status, 120000);
});
});
</script>
{% endblock %}
{% block content %}
<h1 class="text-center display-4">Willkommen in der Binary Kitchen!</h1>
<div class="row">
<div class="col">
<div class="text-center">
<img id="led" src="">
<div class="h2" id="message"></div>
</div>
<hr>
<div>
<h4 class="text">Kontakt</h4>
<table class="table-sm">
<thead>
<tr>
<th scope="col">Raum</th>
<th scope="col">Telefonnummer</th>
</tr>
</thead>
<tbody>
<tr>
<td>Hauptraum</td>
<td>0941 - ...</td>
</tr>
<tr>
<td>Kellergeschoss</td>
<td>0941 - ...</td>
</tr>
<tr>
<td>Werkstatt</td>
<td>0941 - ...</td>
</tr>
</tbody>
</table>
<hr>
Keine App? Kein Problem! WiFi anschalten und https://lock.binary.kitchen besuchen.
</div>
</div>
<div class="col-6">
<a class="twitter-grid" data-partner="tweetdeck" href="https://twitter.com/binary_kitchen/timelines/1038927503446949888?ref_src=twsrc%5Etfw">gallery</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
<div class="col text-center">
<img src="static/token.svg" height="300">
<img width=175 src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png'/>
<img width=175 src='https://fdroid.gitlab.io/artwork/badge/get-it-on.png' />
</div>
</div>
{{ super() }}
{% endblock %}