forked from Chris927/generate-sa-idnumbers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
233 lines (218 loc) · 6.86 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
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<link
rel="icon"
type="image/png"
sizes="16x16"
href="./images/favicon-16.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./images/favicon-32.png"
/>
<link
rel="icon"
type="image/png"
sizes="96x96"
href="./images/favicon-96.png"
/>
<meta name="title" content="Generate South African ID Numbers" />
<meta
name="description"
content="Generate South African ID numbers for educational and software testing purposes."
/>
<title>Generate SA ID Numbers</title>
<!-- OpenGraph meta tags -->
<meta
property="og:image"
content="https://thaborach.github.io/generate-sa-idnumbers/images/favicon-96.png"
/>
<meta
property="og:description"
content="Generate South African ID numbers for educational and software testing purposes."
/>
<meta property="og:title" content="Generate South African ID Numbers" />
<meta property="og:type" content="website" />
<meta
property="og:url"
content="https://thaborach.github.io/generate-sa-idnumbers/"
/>
<link rel="stylesheet" href="./styles/main.css" />
<script src="https://cdn.tailwindcss.com"></script>
<script
src="https://unpkg.com/@popperjs/core@2"
charset="utf-8"
defer
></script>
<script src="./script.js" defer></script>
</head>
<body class="bg-slate-100">
<header class="flex flex-col items-center w-full text-center p-6 mb-4">
<h1 class="text-3xl sm:text-5xl font-bold">
Generate South African ID Numbers
</h1>
</header>
<main class="flex flex-col gap-8 items-center w-full flex-[1_0_auto]">
<form
id="mainForm"
name="mainForm"
class="flex flex-col gap-y-4 w-full max-w-[350px] p-4 bg-white rounded-md shadow-lg"
onsubmit="showIdNumber(); return false"
>
<section class="flex gap-x-4 items-center w-full">
<label class="" for="year">Year of Birth:</label>
<select
class="w-[180px] h-[35px] text-center text-white bg-green-900 rounded ml-auto"
id="year"
name="year"
></select>
</section>
<section class="flex gap-x-4 w-full">
<label for="month">Month of Birth</label>
<select
class="w-[90px] h-[35px] text-center text-white bg-green-900 rounded ml-auto"
id="month"
name="month"
></select>
</section>
<section class="flex gap-x-4 w-full">
<label for="day">Day of Birth</label>
<select
class="w-[90px] h-[35px] text-center text-white bg-green-900 rounded ml-auto"
id="day"
name="day"
></select>
</section>
<section class="flex gap-x-4 w-full">
<p>Gender:</p>
<div class="flex gap-x-2">
<input
class="accent-green-900"
type="radio"
name="gender"
id="female"
value="4"
checked
/>
<label for="female">Female</label>
</div>
<div class="flex gap-x-2">
<input
class="accent-green-900"
type="radio"
name="gender"
id="male"
value="5"
/>
<label for="male">Male</label>
</div>
</section>
<section class="flex gap-x-4 w-full">
<label for="sequence">Sequence</label>
<select
class="w-[180px] h-[35px] text-center text-white bg-green-900 rounded ml-auto"
id="sequence"
name="sequence"
></select>
</section>
<section class="flex gap-x-4">
<p>Status:</p>
<div class="flex gap-x-2">
<input
class="accent-green-900"
type="radio"
name="cship"
id="citizen"
value="0"
checked
/>
<label for="citizen">Citizen</label>
</div>
<div class="flex gap-x-2">
<input
class="accent-green-900"
type="radio"
name="cship"
id="resident"
value="1"
/>
<label for="resident">Resident</label>
</div>
</section>
<!-- Button Group -->
<section class="flex gap-x-2 justify-end w-full">
<button
class="w-[120px] h-[35px] bg-white text-black border-2 border-black border-solid rounded"
onclick="generateRandomIdNumber(); return false"
>
Randomise
</button>
<button
type="submit"
class="w-[120px] h-[35px] bg-green-900 text-white rounded self-end"
type="submit"
>
Generate
</button>
</section>
</form>
<!-- RESULT -->
<section class="flex flex-wrap gap-4 items-center justify-center p-4">
<h3 class="text-xl sm:text-2xl font-bold">Result:</h3>
<div
class="relative p-3 bg-slate-400 text-white text-center rounded min-w-[220px] shadow-md"
>
<p id="result">Hint: Click generate/randomise above.</p>
<img
id="copy"
class="absolute right-2 top-2 w-5 h-5 cursor-pointer hidden"
src="./images/clone.png"
alt="copy"
onclick="copyToClipboard()"
aria-describedby="tooltip"
/>
<div id="tooltip" role="tooltip">Click to copy</div>
</div>
</section>
<!-- MORE INFORMATION -->
<section class="flex flex-wrap gap-4 items-center justify-center">
<h4 class="text-lg sm:text-xl font-bold">More Information</h4>
<p>
See
<a
class="text-green-900"
href="https://en.wikipedia.org/wiki/National_identification_number#South_Africa"
>Wikipedia</a
>
or
<a
class="text-green-900"
href="http://knowles.co.za/generating-south-african-id-numbers/"
>this article</a
>.
</p>
</section>
</main>
<footer
class="flex flex-wrap gap-x-8 justify-center sm:justify-between items-center w-full p-4 sm:p-8"
>
<p class="max-w-[250px] text-center sm:text-left">
This is created for educational and software testing purposes only. I
will not be liable for any misuse.
</p>
<a
href="https://github.com/thaboRach/generate-sa-idnumbers"
target="_blank"
><img
class="w-[50px] h-[50px]"
src="./images/github-64.png"
alt="github"
/></a>
</footer>
</body>
</html>