A browser source overlay for winter vibes for your Live Streams or Videos

Adding settings page

Changed files
+143 -3
src
-1
index.html
···
<body>
<canvas id="main"></canvas>
-
<div id="contextMenu" class="context-menu" style="display:none">
<ul>
<li><a href="src/pages/config.html">Settings</a></li>
+70 -1
src/pages/config.html
···
</head>
<body>
<div class="container">
-
<h1>Settings</h1>
+
+
<h1>Settings</h1>
+
+
<form action="/index.html" method="get" class="form-container">
+
+
<input type="hidden" name="v" value="1">
+
+
<div class="settings-group">
+
<span class="title">Window</span>
+
<div class="separator"></div>
+
+
<label for="cw">Width</label>
+
<input type="number" name="cw" id="cw" placeholder="320">
+
+
<label for="ch">Height</label>
+
<input type="number" name="ch" id="ch" placeholder="180">
+
</div>
+
+
<div class="settings-group">
+
<span class="title">Snow</span>
+
<div class="separator"></div>
+
+
<label for="smx">Snow max</label>
+
<input type="number" name="smx" id="smx" placeholder="40">
+
+
<label for="smnsz">Snow min size</label>
+
<input type="number" name="smnsz" id="smnz" placeholder="1">
+
+
<label for="smxsz">Snow max size</label>
+
<input type="number" name="smxsz" id="smxsz" placeholder="4">
+
+
<label for="smxspd">Snow max speed</label>
+
<input type="number" step=".01" name="smxspd" id="smxspd" placeholder="0.07">
+
+
<label for="snmnspd">Snow min speed</label>
+
<input type="number" step=".01" name="snmnspd" id="snmnspd" placeholder="0.04">
+
</div>
+
+
<div class="settings-group">
+
<span class="title">Plow</span>
+
<div class="separator"></div>
+
+
<label for="plwspd">Plow speed</label>
+
<input type="number" step=".01" name="plwspd" id="plwspd" placeholder="0.1">
+
+
<label for="smnsz">Plow direction</label>
+
<select name="plwd" id="plwd" placeholder="left">
+
<option value="left">left</option>
+
<option value="right">right</option>
+
<option value="random">random</option>
+
</select>
+
+
<label for="plws">Plow scale</label>
+
<input type="number" name="plws" id="plws" placeholder="1">
+
</div>
+
+
<div class="settings-group">
+
<span class="title">Ground</span>
+
<div class="separator"></div>
+
+
<label for="gamax">Ground accumulator max</label>
+
<input type="number" name="gamax" id="gamax" placeholder="4">
+
+
<label for="gas">Ground accumulatior slices</label>
+
<input type="number" name="gas" id="gas" placeholder="20">
+
</div>
+
+
<button type="button" onclick="window.location.href='/'">Cancel</button>
+
<button type="submit" value="submit">Submit</button>
+
</form>
</div>
</body>
</html>
+72 -1
src/styles/config.css
···
@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap');
-
body {
+
* {
font-family: "Pixelify Sans", sans-serif;
font-style: normal;
+
}
+
+
body {
background-color: #091e36;
min-width: 100vw;
min-height: 100vh;
···
width: 100%;
margin: 0;
padding: 0;
+
display: flex;
+
justify-content: center;
+
align-items: center;
+
}
+
+
h1 {
+
color: white;
+
font-weight: 100;
+
}
+
+
input {
+
border-radius: 10px;
+
padding: 5px;
+
border: none;
+
}
+
+
select {
+
border-radius: 10px;
+
padding: 5px;
+
border: none;
+
}
+
+
button {
+
border-radius: 10px;
+
padding: 5px;
+
background-color: bisque;
+
}
+
+
button:hover {
+
border-radius: 10px;
+
padding: 5px;
+
background-color: beige;
+
cursor: pointer;
+
}
+
+
.form-container {
+
display: grid;
+
grid-template-columns: repeat(2, 1fr);
+
gap: 20px;
+
max-width: 600px;
+
width: 100%;
+
}
+
+
.settings-group {
+
width: 300px;
+
padding: 10px;
+
display: flex;
+
flex-direction: column;
+
border: 1px black solid;
+
border-radius: 10px;
+
background-color: bisque;
+
}
+
+
.container {
+
text-align: center;
+
width: 650px;
+
}
+
+
.title {
+
padding: 5px;
+
font-size: 20px;
+
}
+
+
.separator {
+
width: 100%;
+
height: 1px;
+
background-color: black;
+
margin: 10px 0;
}
+1
src/styles/main.css
···
border-radius: 10px;
text-decoration: none;
color: black;
+
display: block;
}
.context-menu ul li:hover {