mirror of
https://github.com/silicoflare/silicoflare-website.git
synced 2026-05-26 20:17:58 +05:30
Add files via upload
This commit is contained in:
71
htdocs/creations/passenger_list/pass_info.css
Normal file
71
htdocs/creations/passenger_list/pass_info.css
Normal file
@@ -0,0 +1,71 @@
|
||||
@font-face {
|
||||
font-family: "Orion";
|
||||
src: url("../data/font_little_orion.otf");
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
header {
|
||||
padding: 20px;
|
||||
background-color: yellow;
|
||||
font-family: "Orion";
|
||||
border: 3px solid black;
|
||||
/*border-radius: 5px;*/
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #FFFFFF;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.closebutton {
|
||||
float: right;
|
||||
color: white;
|
||||
background-color: red;
|
||||
border: 2px solid black;
|
||||
font-weight: bold;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: 3px solid black;
|
||||
background-color: #99FFFF;
|
||||
/*border-radius: 5px;*/
|
||||
}
|
||||
|
||||
legend {
|
||||
border: 3px solid black;
|
||||
white-space: pre;
|
||||
padding: 7px;
|
||||
background-color: #FF88FF;
|
||||
font-family: "Orion", sans-serif;
|
||||
font-size: 110%;
|
||||
/*border-radius: 7px;*/
|
||||
}
|
||||
|
||||
label {
|
||||
font-family: "Orion", sans-serif;
|
||||
font-size: 125%;
|
||||
}
|
||||
|
||||
button {
|
||||
font-family: "Orion", sans-serif;
|
||||
font-size: 125%;
|
||||
background-color: #8AFF8A;
|
||||
border: 2px solid black;
|
||||
/*border-radius: 10px;*/
|
||||
}
|
||||
|
||||
input {
|
||||
background-color: #FFFF8A;
|
||||
border: 2px solid black;
|
||||
font-family: cursive;
|
||||
}
|
||||
|
||||
select {
|
||||
background-color: #FFFF8A;
|
||||
border: 2px solid black;
|
||||
font-family: cursive;
|
||||
}
|
||||
54
htdocs/creations/passenger_list/pass_info.html
Normal file
54
htdocs/creations/passenger_list/pass_info.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel = "stylesheet" type = "text/css" href = "pass_info.css">
|
||||
<script src = "pass_info.js"></script>
|
||||
<title>Passenger list</title>
|
||||
</head>
|
||||
<body onload="add();">
|
||||
<header><h1>PASSENGER DETAILS</h1></header>
|
||||
<br><br>
|
||||
<main>
|
||||
<template id = "passTemp">
|
||||
<div class = "passenger">
|
||||
<fieldset>
|
||||
<legend class = "data"></legend>
|
||||
<button class = "closebutton" onclick = "del();">×</button>
|
||||
|
||||
<label for = "passName">Passenger name: </label>
|
||||
<input type = "text" id = "passName" class = "passName" required />
|
||||
   
|
||||
<label for = "age">Age: </label>
|
||||
<input type = "number" id = "age" class = "age" min = 1 max = 500 oninput = "getConc();" required />
|
||||
   
|
||||
<label for = "gender">Gender: </label>
|
||||
<select id = "gender" class = "gender" >
|
||||
<option value = "Male">Male</option>
|
||||
<option value = "Female">Female</option>
|
||||
<option value = "Other">Other</option>
|
||||
</select>
|
||||
   
|
||||
<label for = "berth">Preferred Berth: </label>
|
||||
<select id = "berth" class = "berth" >
|
||||
<option value = "Lower">Lower</option>
|
||||
<option value = "Middle">Middle</option>
|
||||
<option value = "Upper">Upper</option>
|
||||
<option value = "Side-upper">Side upper</option>
|
||||
<option value = "Side-lower">Side lower</option>
|
||||
</select>
|
||||
   
|
||||
<span hidden class = "sp"><label for = "conc"><input type = "checkbox" class = "conc" value = "Avail" />Avail concession</label></span>
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
<br>
|
||||
</template>
|
||||
<div id = "passList"></div>
|
||||
<br>
|
||||
<button onclick = "add();">Add passenger</button>
|
||||
<button onclick = "submit();">Submit</button>
|
||||
<div hidden id = "errors">Please enter your name!</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
47
htdocs/creations/passenger_list/pass_info.js
Normal file
47
htdocs/creations/passenger_list/pass_info.js
Normal file
@@ -0,0 +1,47 @@
|
||||
var passNo = 0;
|
||||
|
||||
|
||||
|
||||
function add() {
|
||||
|
||||
passNo++;
|
||||
|
||||
var temp = document.getElementById("passTemp").content;
|
||||
|
||||
var stuff = document.importNode(temp, true);
|
||||
|
||||
stuff.querySelector(".passenger").setAttribute("id","pass"+passNo);
|
||||
|
||||
stuff.querySelector(".data").textContent = " PASSENGER "+passNo+" ";
|
||||
|
||||
stuff.querySelector(".closebutton").setAttribute("id",passNo);
|
||||
|
||||
stuff.querySelector(".closebutton").setAttribute("onclick","del("+passNo+");");
|
||||
|
||||
stuff.querySelector(".age").setAttribute("oninput","getConc("+passNo+");");
|
||||
|
||||
document.getElementById("passList").appendChild(stuff);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function del(num) {
|
||||
|
||||
var divi = document.getElementById("pass"+num);
|
||||
|
||||
divi.remove();
|
||||
|
||||
for(i=num+1;i<=passNo;i++) {
|
||||
|
||||
var work = document.getElementById("pass"+i);
|
||||
|
||||
work.querySelector(".data").textContent = " PASSENGER "+(i-1)+" ";
|
||||
|
||||
work.querySelector(".closebutton").setAttribute("id",(i-1));
|
||||
|
||||
work.querySelector(".closebutton").setAttribute("onclick","del("+(i-1)+");");
|
||||
|
||||
work.setAttribute("id","pass"+(i-1));
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user