flask gpio test
This commit is contained in:
23
templates/main.html
Normal file
23
templates/main.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>RPi Web Server</title>
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||
<!-- Latest compiled and minified JavaScript -->
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>RPi Web Server</h1>
|
||||
{% for pin in pins %}
|
||||
<h2>{{ pins[pin].name }}
|
||||
{% if pins[pin].state == true %}
|
||||
ist gerade <strong>an</strong></h2><div class="row"><div class="col-md-2">
|
||||
<a href="/{{pin}}/off" class="btn btn-block btn-lg btn-default" role="button">Turn off</a></div></div>
|
||||
{% else %}
|
||||
ist gerade <strong>aus</strong></h2><div class="row"><div class="col-md-2">
|
||||
<a href="/{{pin}}/on" class="btn btn-block btn-lg btn-primary" role="button">Turn on</a></div></div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user