Delete index_html.py
This commit is contained in:
parent
4a36ff0da0
commit
fa0578349b
|
@ -1,94 +0,0 @@
|
||||||
# Autogenerated file
|
|
||||||
def render(settings, patterns):
|
|
||||||
yield """<!DOCTYPE html>
|
|
||||||
<html lang=\"en\">
|
|
||||||
<head>
|
|
||||||
<meta charset=\"UTF-8\">
|
|
||||||
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
|
||||||
<title>LED Control</title>
|
|
||||||
<script src=\"static/main.js\"></script>
|
|
||||||
<link rel=\"stylesheet\" href=\"static/main.css\">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Control LEDs</h1>
|
|
||||||
<button onclick=\"selectControls()\">Controls</button>
|
|
||||||
<button onclick=\"selectSettings()\">Settings</button>
|
|
||||||
|
|
||||||
<!-- Main LED Controls -->
|
|
||||||
<div id=\"controls\">
|
|
||||||
<div id=\"pattern_buttons\">
|
|
||||||
"""
|
|
||||||
for p in patterns:
|
|
||||||
yield """ <button class=\"pattern_button\" value=\""""
|
|
||||||
yield str(p)
|
|
||||||
yield """\">"""
|
|
||||||
yield str(p)
|
|
||||||
yield """</button>
|
|
||||||
"""
|
|
||||||
yield """
|
|
||||||
<!-- Pattern buttons will be inserted here -->
|
|
||||||
</div>
|
|
||||||
<form id=\"delay_form\" method=\"post\" action=\"/delay\">
|
|
||||||
<label for=\"delay\">Delay:</label>
|
|
||||||
<input type=\"range\" id=\"delay\" name=\"delay\" min=\"1\" max=\"1000\" value=\""""
|
|
||||||
yield str(settings['delay'])
|
|
||||||
yield """\" step=\"10\">
|
|
||||||
</form>
|
|
||||||
<form id=\"brightness_form\" method=\"post\" action=\"/brightness\">
|
|
||||||
<label for=\"brightness\">Brightness:</label>
|
|
||||||
<input type=\"range\" id=\"brightness\" name=\"brightness\" min=\"0\" max=\"100\" value=\""""
|
|
||||||
yield str(settings['brightness'])
|
|
||||||
yield """\" step=\"1\">
|
|
||||||
</form>
|
|
||||||
<form id=\"color_form\" method=\"post\" action=\"/color\">
|
|
||||||
<input type=\"color\" id=\"color\" name=\"color\" value=\""""
|
|
||||||
yield str(settings['color1'])
|
|
||||||
yield """\">
|
|
||||||
</form>
|
|
||||||
<form id=\"color2_form\" method=\"post\" action=\"/color2\">
|
|
||||||
<input type=\"color\" id=\"color2\" name=\"color2\" value=\""""
|
|
||||||
yield str(settings['color2'])
|
|
||||||
yield """\">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Settings Menu for num_leds, Wi-Fi SSID, and Password -->
|
|
||||||
|
|
||||||
<div id=\"settings_menu\" style=\"display: none;\">
|
|
||||||
<h2>Settings</h2>
|
|
||||||
|
|
||||||
<!-- Separate form for submitting num_leds -->
|
|
||||||
<form id=\"num_leds_form\" method=\"post\" action=\"/num_leds\">
|
|
||||||
<label for=\"num_leds\">Number of LEDs:</label>
|
|
||||||
<input type=\"text\" id=\"num_leds\" name=\"num_leds\" value=\""""
|
|
||||||
yield str(settings['num_leds'])
|
|
||||||
yield """\">
|
|
||||||
<input type=\"submit\" value=\"Update Number of LEDs\">
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<!-- Form for Wi-Fi SSID and password -->
|
|
||||||
<form id=\"wifi_form\" method=\"post\" action=\"/wifi_settings\">
|
|
||||||
<label for=\"ssid\">Wi-Fi SSID:</label>
|
|
||||||
<input type=\"text\" id=\"ssid\" name=\"ssid\" value=\""""
|
|
||||||
yield str(settings['wifi']['ssid'])
|
|
||||||
yield """\">
|
|
||||||
<br>
|
|
||||||
<label for=\"password\">Wi-Fi Password:</label>
|
|
||||||
<input type=\"password\" id=\"password\" name=\"password\">
|
|
||||||
<br>
|
|
||||||
<label for=\"ip\">Wi-Fi IP:</label>
|
|
||||||
<input type=\"ip\" id=\"ip\" name=\"ip\" value=\""""
|
|
||||||
yield str(settings.get('wifi', {}).get('ip', ''))
|
|
||||||
yield """\">
|
|
||||||
<br>
|
|
||||||
<label for=\"gateway\">Wi-Fi Gateway:</label>
|
|
||||||
<input type=\"gateway\" id=\"gateway\" name=\"gateway\" value=\""""
|
|
||||||
yield str(settings.get('wifi', {}).get('gateway', ''))
|
|
||||||
yield """\">
|
|
||||||
<br>
|
|
||||||
<input type=\"submit\" value=\"Save Wi-Fi Settings\">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
"""
|
|
Loading…
Reference in New Issue