-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbook.html
More file actions
108 lines (91 loc) · 2.58 KB
/
book.html
File metadata and controls
108 lines (91 loc) · 2.58 KB
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
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="author" content="Florian Pépin">
<title>Carnet d'adresses</title>
<!--<link type="text/css" rel="stylesheet" href="book.css" />-->
<script src="book/address-book.js"></script>
<script src="chance/chance.js"></script>
<style>
body {
margin: 0;
padding: 20px;
}
main {
display: grid;
grid-template-columns: 300px 1fr;
}
main > section {
box-sizing: border-box;
min-height: 500px;
}
#details {
box-sizing: border-box;
padding: 10px;
}
#liste {
width: 100%;
margin-top: 20px;
border-spacing: 0;
border-collapse: collapse;
}
#liste tr {
padding: 5px;
margin: 0;
cursor: pointer;
}
#liste td {
padding: 5px;
}
#liste tr:nth-child(even) {
background-color: #9CAFD4;
}
#details div {
margin: 10px auto;
}
#no-show {
display: none;
}
label {
display: block;
margin: 5px auto;
}
label input[type="text"] {
width: 250px;
}
label span {
float: left;
width: 150px;
}
</style>
</head>
<body>
<header>
<h1>Carnet d'adresses</h1>
</header>
<main>
<div id="carnet">
<div><button id="ajouter">Ajouter un contact</button></div>
<table id="liste">
<tr><th id="nom">Nom</th><th>Surnom</th><th>Prénom</th></tr>
</table>
</div>
<div id="details">
</div>
</main>
<!-- le formulaire est mis en display none avec CSS et sert de "modèle" pour le formulaire de création/modification -->
<div id="no-show">
<form>
<input type="hidden" name="id">
<label><span>Nom</span> <input type="text" name="nom" placeholder="Nom"></label>
<label><span>Prenom</span> <input type="text" name="prenom" placeholder="Prénom"></label>
<label><span>Pseudo</span> <input type="text" name="pseudo" placeholder="Pseudo"></label>
<label><span>Email</span><input type="text" name="email" placeholder="Email"></label>
<label><span>Téléphone</span> <input type="text" name="telephone" placeholder="Téléphone"></label>
<label><input type="submit" name="go" value="Enregistrer"></label>
</form>
</div>
<script src="book.js"></script>
</body>
</html>