pills_nodejs/views/inputs.ejs
2024-05-25 21:36:14 +05:00

53 lines
1.1 KiB
Plaintext
Executable File

<style>
.pill {
border: 1px black solid;
display: flex;
padding-inline: 3px;
}
.pill input {
margin: 0px;
/* padding: 20px; */
}
.pill label {
padding-inline: 4px;
padding-block: 1px;
}
.pills {
list-style-type: none;
display: flex;
}
.f1 {
display: flex;
justify-content: space-evenly;
margin-block: 15px;
}
input {
text-align: center;
}
*{
font-size: 30pt;
}
</style>
<form class="f1" action="/scripts" method="post">
<input type="submit" value="add">
<select id="pills" name="pill">
<%
let pills = ["4/2","4/1","4","2","2/1","1","0"];
let i=0;
pills.forEach(el => {
let check = (el=="4")? "selected":"";
%>
<option class="pill" id="pill-<%= i %>" value="<%= el %>" <%= check %>><%= el %></option>
<%
i++;
});
%>
</select>
<input type="text" name="comment" value="" placeholder="comment">
<input type="hidden" name="func" value="save">
</form>