improved ui

This commit is contained in:
RaffaelW 2024-10-28 23:35:29 +01:00
parent d961291c78
commit 7b7ecec534
2 changed files with 158 additions and 120 deletions

View file

@ -10,30 +10,35 @@
<script type="module" src="/submit.js" defer></script> <script type="module" src="/submit.js" defer></script>
</head> </head>
<body> <body>
<main>
<h1>Konfiguration</h1> <h1>Konfiguration</h1>
<form> <form>
<fieldset> <fieldset>
<legend>Verbindung</legend> <legend>Verbindung</legend>
<label for="ip-method"
>IP-Zuweisung:
<select <select
name="ip-method" name="ip-method"
id="input-ip-method" id="input-ip-method"
title="IP-Methode" title="IP-"
> >
<option value="static">Statisch</option> <option value="static">Statisch</option>
<option value="dhcp">DHCP</option> <option value="dhcp">DHCP</option>
</select> </select>
</label>
<div data-field="input-ip-method" data-values="static"> <div data-field="input-ip-method" data-values="static">
<label>
IP-Adresse/CIDR:
<input <input
type="text" type="text"
name="ip" name="ip"
id="input-ip" id="input-ip"
placeholder="IP-Adresse/CIDR" placeholder="IP-Adresse/CIDR"
/> />
</label>
</div> </div>
<label>
Verbindungsmethode:
<select <select
name="connection" name="connection"
id="input-connection" id="input-connection"
@ -43,37 +48,43 @@
<option value="wifi-ap">WiFi-AccessPoint</option> <option value="wifi-ap">WiFi-AccessPoint</option>
<option value="ethernet">Ethernet</option> <option value="ethernet">Ethernet</option>
</select> </select>
</label>
<div data-field="input-connection" data-values="wifi-sta"> <div data-field="input-connection" data-values="wifi-sta">
<label>
SSID:
<input <input
type="text" type="text"
name="ssid" name="ssid"
id="input-ssid" id="input-ssid"
placeholder="SSID" placeholder="SSID"
/> />
</label>
</div> </div>
<div data-field="input-connection" data-values="wifi-ap"> <div data-field="input-connection" data-values="wifi-ap">
<label>
Netzwerk:
<select <select
name="network" name="network"
id="input-network" id="input-network"
title="Netzwerk" title="Netzwerk"
></select> ></select>
</label>
</div> </div>
<div <div
data-field="input-connection" data-field="input-connection"
data-values="wifi-sta|wifi-ap" data-values="wifi-sta|wifi-ap"
> >
<label>
Password:
<input <input
type="password" type="password"
name="password" name="password"
id="input-password" id="input-password"
placeholder="Passwort" placeholder="Passwort"
/> />
</label>
</div> </div>
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend>Input/Output 1</legend> <legend>Input/Output 1</legend>
<label class="switch"> <label class="switch">
@ -88,7 +99,8 @@
<span class="slider"></span> <span class="slider"></span>
<span>Input</span> <span>Input</span>
</label> </label>
<label>
ArtNet-Universe:
<input <input
type="number" type="number"
name="universe-1" name="universe-1"
@ -97,11 +109,10 @@
min="0" min="0"
max="15" max="15"
/> />
</label>
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend>Input/Output 2</legend> <legend>Input/Output 2</legend>
<label class="switch"> <label class="switch">
<span>Output</span> <span>Output</span>
<input <input
@ -114,7 +125,8 @@
<span class="slider"></span> <span class="slider"></span>
<span>Input</span> <span>Input</span>
</label> </label>
<label>
ArtNet-Universe:
<input <input
type="number" type="number"
name="universe-2" name="universe-2"
@ -123,9 +135,10 @@
min="0" min="0"
max="15" max="15"
/> />
</label>
</fieldset> </fieldset>
<button type="submit">Speichern</button> <button type="submit">Speichern</button>
</form> </form>
</main>
</body> </body>
</html> </html>

View file

@ -4,9 +4,25 @@
} }
body { body {
background-color: #222; margin: 0;
padding: 0;
background: linear-gradient(to left, #065760, black, black, #065760);
color: white; color: white;
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
overflow: hidden;
}
main {
background-color: #222;
max-width: 700px;
padding: 8px max(5%, 8px);
margin: 0 auto;
height: 100vh;
overflow: scroll;
}
h1 {
text-align: center;
} }
form > * { form > * {
@ -17,10 +33,17 @@ fieldset {
border-radius: 8px; border-radius: 8px;
} }
label {
display: block;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
input, input,
select { select {
display: block; width: clamp(200px, 100%, 400px);
width: 300px;
background-color: #222; background-color: #222;
color: white; color: white;
border: 1px solid white; border: 1px solid white;
@ -36,12 +59,14 @@ select:focus {
} }
button { button {
display: block;
border: none; border: none;
inset: none; inset: none;
border-radius: 8px; border-radius: 8px;
background-color: var(--color-primary); background-color: var(--color-primary);
color: var(--color-on-primary); color: var(--color-on-primary);
padding: 8px 16px; padding: 8px 16px;
margin: 0 auto;
} }
:is(div:has(:is(input, select)), input, select, label) :is(div:has(:is(input, select)), input, select, label)