ws281x/index.html

61 lines
2.3 KiB
HTML
Raw Normal View History

2024-09-14 08:57:28 +00:00
<!DOCTYPE html>
2024-10-06 09:02:39 +00:00
<html lang="en">
2024-09-14 08:57:28 +00:00
<head>
2024-10-06 09:02:39 +00:00
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2024-09-14 08:57:28 +00:00
<title>LED Control</title>
2024-10-06 09:02:39 +00:00
<script src="main.js"></script>
<link rel="stylesheet" href="main.css">
2024-09-14 08:57:28 +00:00
</head>
<body>
<h1>Control LEDs</h1>
2024-10-06 09:02:39 +00:00
<button onclick="selectControls()">Controls</button>
<button onclick="selectSettings()">Settings</button>
<!-- Main LED Controls -->
<div id="controls">
<div id="pattern_buttons">
<!-- 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="{delay}" 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="{brightness}" step="1">
</form>
<form id="color_form" method="post" action="/color">
<input type="color" id="color" name="color" value="{color}">
</form>
<form id="color2_form" method="post" action="/color2">
<input type="color" id="color2" name="color2" value="{color2}">
</form>
2024-09-14 08:57:28 +00:00
</div>
2024-10-06 09:02:39 +00:00
<!-- 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="{num_leds}">
<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="{ssid}">
<br>
<label for="password">Wi-Fi Password:</label>
<input type="password" id="password" name="password">
<br>
<input type="submit" value="Save Wi-Fi Settings">
</form>
</div>
2024-09-14 08:57:28 +00:00
</body>
</html>