-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
122 lines (107 loc) · 3.63 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Students</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<main class="container">
<h1>Add teacher / student</h1>
<div class="alert hide">
<p>the fields name and age are required</p>
</div>
<form id="form" novalidate>
<select id="select" name="select" class="input input-inner">
<option value="teacher">Teacher</option>
<option value="student">Student</option>
</select>
<input
type="text"
placeholder="Name"
id="name"
name="name"
minlength="3"
maxlength="10"
class="input input-inner"
autocomplete="off"
required
/>
<p id="alertName" class="hide">Not valid name</p>
<input
type="number"
placeholder="Age"
id="age"
name="age"
min="10"
max="75"
class="input input-inner"
autocomplete="off"
required
/>
<p id="alertNum" class="hide">Not valid age</p>
<input
type="text"
placeholder="Subject"
id="subject"
name="subject"
class="input input-inner"
autocomplete="off"
required
/>
<button type="submit" id="button-add">Add</button>
</form>
<section class="sub-container">
<div class="students-container">
<h2>Students</h2>
<ul class="students">
</ul>
</div>
<div class="teachers-container">
<h2>Teachers</h2>
<ul class="teachers">
</ul>
</div>
</section>
</main>
<template id="student-template">
<li class="student-li">
<div class="student">
<div class="student-pass-fail-sub">
<div class="pass-fail">
<h3><span class="name">Name</span><span class="passed">Passed</span></h3>
</div>
<p>Student</p>
<p class="grades">Grades: </p>
<p class="prom">PROM: </p>
<p class="age">Age</p>
</div>
<div class="buttons">
<div class="pass-fail-buttons">
<button class="pass" data-passed="true">Pass</button>
<button class="fail" data-passed="false">Fail</button>
</div>
<div class="buttons-del-add">
<button class="delete-student">Delete</button>
<button class="add-grade">Add</button>
</div>
</div>
</div>
</li>
</template>
<template id="teacher-template">
<li class="teacher-li">
<div class="teacher">
<h3>Name</h3>
<p>Teacher</p>
<p id="area">Area</p>
<p id="age">Age</p>
<button class="delete-teacher">Delete</button>
</div>
</li>
</template>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
</body>
</html>