-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
163 lines (145 loc) · 5.33 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta name="theme-color" content="#0E619C">
<title>Calendario scolastico</title>
<meta name="author" content="Biolghini Paolo, Bianchin Tommaso">
<meta content="orario, scuola, scolastico, orariofacile, timetable, lezioni" name="keywords">
<meta content="L'intelligenza artificiale che ti aiuta a creare l'orario per la tua scuola" name="description">
<link href="assets/img/favicon.png" rel="icon">
<link rel="stylesheet" href="assets/css/draw.css">
<link rel="stylesheet" href="assets/css/paper.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha384-SZXxX4whJ79/gErwcOYf+zWLeJdY/qpuqC4cAa9rOGUstPomtqpuNWT9wdPEn2fk" crossorigin="anonymous">
</head>
<body>
<div class="container">
<form action="paper2.php" method="post">
<div class="paper">
<div class="lines">
<div class="text" spellcheck="false">
<h2 class=" titolo1">Orario</h2>
<h2 class=" titolo2">Generator</h2>
<div class="divClasse">
<b>Nome Classe </b>
<input type="text" class="nomeClassetext" name="nomeClasse" required>
</div>
<div class="divClasseNumeroMaestre">
<b>Numero Maestre </b>
<input type="number" class="numertoMaestretext" name="numeroMaestre" required>
</div>
</div>
</div>
<div class="holes hole-top"></div>
<div class="holes hole-middle"></div>
<div class="holes hole-bottom"></div>
</div>
<div class="paper1">
<div class="lines">
<div class="text1" spellcheck="false">
<b>Inserisci Le Materie</b> <br>
<div>
<input type="button" class="addMateriaButton" value="+" onclick="addMateria()">
<input type="button" class="deleteMateriaButton" value="-" onclick="deleteMateria()">
</div>
<div id="inputs-materie"></div>
<input name="numeroMaterie" id="numeroMaterie" type="hidden" value="0">
<input type="submit" class="next" value="Procedi">
</div>
</div>
<div class="holes1 hole-top"></div>
<div class="holes1 hole-middle"></div>
<div class="holes1 hole-bottom"></div>
</div>
</div>
</div>
</form>
<div class="pa diary hover">
<div class="main">
<div class="cover">
<div class="pa less"></div>
</div>
</div>
</div>
<div class="pa pencil hover">
<div class="pa pencil-bottom"></div>
<div class="pencil-nip">
<div class="pencil-tip"></div>
</div>
</div>
<div class="pa mug hover">
<div class="pr mug_head">
<div class="pa coffee"></div>
<div class="pa ear"></div>
</div>
</div>
<div class="pa notes hover">
<div class="note pr"></div>
</div>
<div class="pa pen hover">
<div class="pen-nip">
<div class="pen-tip"></div>
</div>
<div class="pa pen-bottom"></div>
</div>
<div class="pa handwatch hover">
<div class="pr">
<div class="belt"></div>
<div class="pa dial">
<div class="pa sun-hand"></div>
<div class="pa hand1"></div>
<div class="pa hand2"></div>
<div class="pa button1"></div>
<div class="pa button2"></div>
</div>
</div>
</div>
</div>
<script>
let counter = 0;
function addMateria() {
const inputsContainer = document.getElementById('inputs-materie');
const nuovoDiv = document.createElement('div');
const newInput = document.createElement('input');
const newInputOre = document.createElement('input');
const labelPome = document.createElement('label');
const newInputPome = document.createElement('input');
const numMaterie = document.getElementById("numeroMaterie");
nuovoDiv.classList.add("righeMaterie");
labelPome.textContent = 'Pomeriggio:';
labelPome.classList.add("pomeriggioLabel");
newInput.type = 'text';
newInputOre.type = 'number';
newInputPome.type = 'checkbox';
newInput.name = 'materia' + counter;
newInput.classList.add("nomeMateriain");
newInputOre.name = 'materiaOre' + counter;
newInputPome.name = 'materiaPome' + counter;
counter++;
numMaterie.setAttribute("value", counter);
newInput.setAttribute("required", "true");
newInputOre.setAttribute("required", "true");
newInputOre.setAttribute("min", "1");
newInputOre.setAttribute("max", "30");
newInput.placeholder = 'Nome materia';
newInputOre.placeholder = 'Ore settimanali';
inputsContainer.appendChild(nuovoDiv);
nuovoDiv.appendChild(newInput);
nuovoDiv.appendChild(newInputOre);
labelPome.appendChild(newInputPome);
nuovoDiv.appendChild(labelPome);
}
function deleteMateria() {
const inputsContainer = document.getElementById('inputs-materie');
const righeMaterie = document.getElementsByClassName('righeMaterie');
const numMaterie = document.getElementById("numeroMaterie");
if (counter > 0) {
inputsContainer.removeChild(righeMaterie[counter - 1]);
counter--;
}
numMaterie.setAttribute("value", counter);
}
</script>
</body>
</html>