Raum mit anzeigen

This commit is contained in:
Stefan Bethke 2024-02-27 19:42:19 +01:00
parent 496e41bd4b
commit a29cbd9683
2 changed files with 5 additions and 3 deletions

View file

@ -9,11 +9,12 @@ from bottle import post, request, route, run, static_file, view
from animation import Off
from dmx import DMX, Bar252, StairvilleLedPar56, REDSpot18RGB
room = ''
@route('/')
@view('index')
def index():
return {'foo': 'bar'}
return {'room': room}
@route('/static/<path:path>')
def static(path):
@ -76,6 +77,7 @@ def main(args):
else:
print(f"Unknown room {args.room}", file=sys.stderr)
sys.exit(64)
room = args.room
dmx.animation = Off()
dmx.color = (0, 0, 0)
dmx.animation = "off"

View file

@ -1,11 +1,11 @@
<html>
<head>
<title>Foo Baz DMX</title>
<title>Foo Baz DMX - {{room}}</title>
<link rel="stylesheet" href="static/main.css">
<script src="static/main.js" defer></script>
</head>
<body>
<h1>Foo Baz DMX</h1>
<h1>Foo Baz DMX - {{room}}</h1>
<div class="controls">
<fieldset class="buttons">
<legend>Animation</legend>