-
Notifications
You must be signed in to change notification settings - Fork 39
/
index.html
291 lines (241 loc) · 12.6 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="msapplication-TileColor" content="#603cba">
<meta name="msapplication-config" content="./favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link rel="apple-touch-icon" sizes="180x180" href="./favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./favicons/favicon-16x16.png">
<link rel="manifest" href="./favicons/site.webmanifest">
<link rel="mask-icon" href="./favicons/safari-pinned-tab.svg" color="#21bf73">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<title>COVID-19 – Générateur d'attestation de déplacement</title>
<style>
body {
padding: 20px;
}
h4, form, footer, #alert-official {
margin: 30px auto;
max-width: 400px;
}
footer {
margin-top: 40px;
}
canvas {
border: 1px solid #ced4da;
border-radius: .25rem;
}
#form-profile .form-check {
margin-bottom: 1rem;
}
#form-profile .form-check-label {
font-size: 80%;
font-weight: 400;
transform: translateY(-2px);
}
#form-generate .form-check {
margin: 10px;
}
#alert-facebook {
position: fixed;
top: 10px;
left: 10px;
right: 10px;
}
#alert-official {
margin: 1rem auto 0;
}
#date-selector-group {
position: relative;
overflow: hidden;
}
#date-selector {
position: absolute;
top: 0;
left: 50%;
height: 100%;
transform: translateX(-50%); /* center the input to avoid reset buttons */
opacity: 0;
z-index: 1;
cursor: pointer;
}
svg {
height: 1em;
}
.close {
margin: 0 0 15px 15px;
}
.btn-loader:not([disabled]) svg {
display: none;
}
.btn-loader[disabled] {
position: relative;
padding-right: 2.5rem;
}
.btn-loader[disabled] svg {
position: absolute;
top: 50%;
right: .75rem;
animation: svg-button-spin 1000ms infinite ease;
}
@keyframes svg-button-spin {
from { transform: translateY(-50%) rotate(0deg); }
to { transform: translateY(-50%) rotate(360deg); }
}
</style>
</head>
<body>
<h4>COVID-19 – Générateur d'attestation de déplacement</h4>
<div class="alert alert-success" role="alert" id="alert-official">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<p><small>
<a href="https://media.interieur.gouv.fr/deplacement-covid-19/">
🇫🇷 Le gouvernement a publié son propre générateur !
</a>
Il a été développé à partir de mon code (🥳), la confidentialité de vos données reste donc identique, et
il vous permettra de présenter votre attestation sur smartphone.
</small></p>
<small>
Mon outil restera en place mais je ne continuerai pas à le maintenir, je l'avais créé afin de faciliter le
remplissage des attestations, maintenant il ne me semble plus nécessaire.
<br>Merci pour votre soutien à tous. 🙏
</small>
</div>
<form id="form-profile" style="display: none">
<div class="alert alert-primary" role="alert">
<small>
<p>
Ce générateur est là pour faciliter l'usage des attestations. Les données sont stockées
<u>exclusivement</u> sur votre téléphone et le code peut être consulté
<a href="https://github.com/nesk/covid-19-certificate">sur Github</a>.
</p>
<a href="https://www.interieur.gouv.fr/Actualites/L-actu-du-Ministere/Attestation-de-deplacement-derogatoire-et-justificatif-de-deplacement-professionnel">
Plus d'informations sur le site officiel du gouvernement.
</a>
</small>
</div>
<h5>Remplissez votre profil</h5>
<div class="form-group">
<label for="field-name">Nom et prénom</label>
<input type="text" class="form-control" id="field-name" name="name" autofocus>
</div>
<div class="form-group">
<label for="field-birthday">Date de naissance</label>
<div class="input-group">
<input type="text" class="form-control" id="field-birthday" name="birthday">
<div class="input-group-append" id="date-selector-group">
<input type="date" id="date-selector">
<span class="input-group-text text-primary">
<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="calendar-alt" class="svg-inline--fa fa-calendar-alt fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"></path></svg>
</span>
</div>
</div>
</div>
<div class="form-group">
<label for="field-birthplace">Lieu de naissance</label>
<input type="text" class="form-control" id="field-birthplace" name="birthplace">
</div>
<div class="form-group">
<label for="field-address">Adresse</label>
<input type="text" class="form-control" id="field-address" name="address">
</div>
<div class="form-group">
<label for="field-town">Ville</label>
<input type="text" class="form-control" id="field-town" name="town">
</div>
<div class="form-group">
<label for="field-zipcode">Code Postal</label>
<input type="text" class="form-control" id="field-zipcode" name="zipcode">
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="check-same-town" checked>
<label class="form-check-label" for="check-same-town">Je réside actuellement à cette adresse</label>
</div>
<div class="form-group" id="group-done-at" style="display: none">
<label for="field-done-at">Fait à</label>
<input type="text" class="form-control" id="field-done-at" name="done-at" disabled>
</div>
<div class="form-group">
<label>Signature</label>
<small id="help-signature" class="form-text text-muted">Dessinez votre signature dans la case ci-dessous.</small>
<canvas id="field-signature" width=360 height=240 aria-describedby="help-signature"></canvas>
<button id="reset-signature" type="button" class="btn btn-link btn-sm float-right">Effacer la signature</button>
<br><br>
</div>
<button type="submit" class="btn btn-primary">Enregistrer mon profil</button>
</form>
<form id="form-generate" style="display: none">
<div class="alert alert-warning" role="alert">
<small>
Si vous n'avez pas besoin de sortir, <u>restez chez vous</u> ! Ce générateur est là pour faciliter les
sorties <u>justifiées</u>. Veillez à prendre soin de vous et des autres en limitant la
propagation du virus. 🦠 😷
</small>
</div>
<h5>Choisissez un motif de sortie</h5>
<div class="form-check">
<input class="form-check-input" type="radio" name="field-reason" id="radio-work" value="work" checked>
<label class="form-check-label" for="radio-work">Travail</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="field-reason" id="radio-groceries" value="groceries">
<label class="form-check-label" for="radio-groceries">Courses</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="field-reason" id="radio-health" value="health">
<label class="form-check-label" for="radio-health">Santé</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="field-reason" id="radio-family" value="family">
<label class="form-check-label" for="radio-family">Famille</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="field-reason" id="radio-sport" value="sport">
<label class="form-check-label" for="radio-sport">Sport & animaux</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="field-reason" id="radio-notification" value="notification">
<label class="form-check-label" for="radio-notification">Convocation Judiciaire</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="field-reason" id="radio-mission" value="mission">
<label class="form-check-label" for="radio-mission">Mission d'intérêt général</label>
</div>
<hr>
<div class="form-check">
<input class="form-check-input" type="radio" name="field-reason" id="radio-none" value="">
<label class="form-check-label" for="radio-none">Aucun (remplissage manuel)</label>
</div>
<br><br>
<button type="submit" class="btn btn-primary btn-loader">
Imprimer mon attestation
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-notch" class="svg-inline--fa fa-circle-notch fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M288 39.056v16.659c0 10.804 7.281 20.159 17.686 23.066C383.204 100.434 440 171.518 440 256c0 101.689-82.295 184-184 184-101.689 0-184-82.295-184-184 0-84.47 56.786-155.564 134.312-177.219C216.719 75.874 224 66.517 224 55.712V39.064c0-15.709-14.834-27.153-30.046-23.234C86.603 43.482 7.394 141.206 8.003 257.332c.72 137.052 111.477 246.956 248.531 246.667C393.255 503.711 504 392.788 504 256c0-115.633-79.14-212.779-186.211-240.236C302.678 11.889 288 23.456 288 39.056z"></path></svg>
</button>
<br><br>
<button type="button" class="btn btn-link btn-sm" onclick="localStorage.clear(); location.reload()">
Effacer mon profil
</button>
</form>
<footer class="footer text-center">
<small>
<a href="https://github.com/nesk/covid-19-certificate">Github</a>
-
<a href="https://nesk.dev">nesk.dev</a>
-
<a href="https://twitter.com/johannpardanaud">@johannpardanaud</a>
</small>
</footer>
<div class="alert alert-danger" role="alert" style="display: none" id="alert-facebook">
ATTENTION !! Vous utilisez actuellement le navigateur Facebook, ce générateur ne fonctionne pas correctement au
sein de ce navigateur ! Merci d'ouvrir Chrome sur Android ou bien Safari sur iOS.
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/pdf-lib.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/signature_pad.min.js"></script>
<script src="certificate.js?v=183293d064f4724dacd086cb5cfeee72d758ad3d"></script>
</body>
</html>