-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
456 lines (437 loc) · 14.8 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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Bootstrap 5 -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="custom.css" />
<title>Dark mode Switch</title>
</head>
<body>
<div class="container-fluid px-0">
<!-- Content here -->
<nav class="navbar navbar-expand-sm navbar-light bg-light border-bottom">
<!-- Navbar content -->
<div class="container-fluid">
<a class="navbar-brand" href="#">Light Switch</a>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
</ul>
<form class="d-flex">
<input
class="form-control me-2"
type="search"
placeholder="Search"
aria-label="Search"
/>
<button class="btn btn-outline-success" type="submit">
Search
</button>
</form>
</div>
</div>
</nav>
<!-- LIGHT SWITCH -->
<div class="form-check form-switch ms-auto mt-3 me-3" id="formSwitch">
<label class="form-check-label ms-3" for="inputSwicher">
<i class="fas fa-sun light-mode"></i>
<i class="fas fa-moon dark-mode d-none"></i>
</label>
<input class="form-check-input" type="checkbox" id="inputSwicher" />
</div>
<!-- BUTTONS -->
<div class="text-center mx-5 mb-4">
<h1 class="display-3 border-bottom">Buttons</h1>
<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-secondary">Secondary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-light">Light</button>
<button type="button" class="btn btn-dark">Dark</button>
<button type="button" class="btn btn-link">Link</button>
</div>
<div class="text-center">
<div class="btn-group m-5 d-inline">
<button
type="button"
class="btn btn-danger dropdown-toggle"
data-bs-toggle="dropdown"
aria-expanded="false"
>
Action
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
<li><hr class="dropdown-divider" /></li>
<li><a class="dropdown-item" href="#">Separated link</a></li>
</ul>
</div>
<!-- DROPDOWN -->
<div class="dropdown me-5 d-inline">
<button
class="btn btn-secondary dropdown-toggle"
type="button"
id="dropdownMenu2"
data-bs-toggle="dropdown"
aria-expanded="false"
>
Dropdown
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
<li><button class="dropdown-item" type="button">Action</button></li>
<li>
<button class="dropdown-item" type="button">
Another action
</button>
</li>
<li>
<button class="dropdown-item" type="button">
Something else here
</button>
</li>
</ul>
</div>
<!-- BUTTON GROUPS -->
<div
class="btn-group"
role="group"
aria-label="Button group with nested dropdown"
>
<button type="button" class="btn btn-primary">1</button>
<button type="button" class="btn btn-primary">2</button>
<div class="btn-group" role="group">
<button
id="btnGroupDrop1"
type="button"
class="btn btn-primary dropdown-toggle"
data-bs-toggle="dropdown"
aria-expanded="false"
>
Dropdown
</button>
<ul class="dropdown-menu" aria-labelledby="btnGroupDrop1">
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
</ul>
</div>
</div>
<!-- BADGE -->
<h3 class="d-inline m-5">
Example badge <span class="badge bg-secondary">New</span>
</h3>
<!-- SPINNERS -->
<div class="spinner-border text-light" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<div class="spinner-border text-dark" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<!-- HEADINGS -->
<div class="text-center m-5">
<h1 class="display-3 border-bottom">Typography</h1>
<h1>h1. Bootstrap heading</h1>
<h2>h2. Bootstrap heading</h2>
<h3>h3. Bootstrap heading</h3>
<h4>h4. Bootstrap heading</h4>
<h5>h5. Bootstrap heading</h5>
<h6>h6. Bootstrap heading</h6>
<h3>
Fancy display heading
<small class="text-muted">With faded secondary text</small>
</h3>
</div>
<!-- TABLES -->
<div class="mx-5">
<h1 class="display-3 text-center border-bottom">Tables</h1>
<table class="table">
<thead>
<tr>
<th>Class</th>
<th>Heading</th>
<th>Heading</th>
</tr>
</thead>
<tbody>
<tr class="table-primary">
<td>primary</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr class="table-secondary">
<td>secondary</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr class="table-success">
<td>success</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr class="table-light">
<td>light</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr class="table-dark">
<td>dark</td>
<td>Cell</td>
<td>Cell</td>
</tr>
</tbody>
</table>
</div>
<!-- INPUT: SWITCHES -->
<div class="mx-5">
<h1 class="display-3 text-center border-bottom">Switches</h1>
<div class="row">
<div class="col-4 border-end">
<div class="form-check form-switch">
<input
class="form-check-input"
type="checkbox"
id="flexSwitchCheckDefault"
/>
<label class="form-check-label" for="flexSwitchCheckDefault"
>Default switch checkbox input</label
>
</div>
<div class="form-check form-switch">
<input
class="form-check-input"
type="checkbox"
id="flexSwitchCheckChecked"
checked
/>
<label class="form-check-label" for="flexSwitchCheckChecked"
>Checked switch checkbox input</label
>
</div>
<div class="form-check form-switch">
<input
class="form-check-input"
type="checkbox"
id="flexSwitchCheckDisabled"
disabled
/>
<label class="form-check-label" for="flexSwitchCheckDisabled"
>Disabled switch checkbox input</label
>
</div>
<div class="form-check form-switch">
<input
class="form-check-input"
type="checkbox"
id="flexSwitchCheckCheckedDisabled"
checked
disabled
/>
<label
class="form-check-label"
for="flexSwitchCheckCheckedDisabled"
>Disabled checked switch checkbox input</label
>
</div>
</div>
<div class="col-4 border-end">
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
value=""
id="defaultCheck1"
/>
<label class="form-check-label" for="defaultCheck1">
Default checkbox
</label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
value=""
id="defaultCheck2"
disabled
/>
<label class="form-check-label" for="defaultCheck2">
Disabled checkbox
</label>
</div>
</div>
<div class="col-4">
<div class="form-check">
<input
class="form-check-input"
type="radio"
name="exampleRadios"
id="exampleRadios1"
value="option1"
checked
/>
<label class="form-check-label" for="exampleRadios1">
Default radio
</label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="radio"
name="exampleRadios"
id="exampleRadios2"
value="option2"
/>
<label class="form-check-label" for="exampleRadios2">
Second default radio
</label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="radio"
name="exampleRadios"
id="exampleRadios3"
value="option3"
disabled
/>
<label class="form-check-label" for="exampleRadios3">
Disabled radio
</label>
</div>
</div>
</div>
</div>
<!-- Custom Theming -->
<h1 class="display-6 text-center border-top mt-5 mx-5">Custom Theming</h1>
<div class="card mx-5 mb-5">
<div class="card-body custom-theme bg-light">
This is component has a custom class applied to it.
</div>
</div>
<!-- FORMS -->
<div class="mx-5 my-3">
<form class="row g-3">
<h1 class="text-center border-bottom">FORMS</h1>
<div class="col-md-4">
<label for="validationDefault01" class="form-label"
>First name</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
value="Mark"
required
/>
</div>
<div class="col-md-4">
<label for="validationDefault02" class="form-label"
>Last name</label
>
<input
type="text"
class="form-control"
id="validationDefault02"
value="Otto"
required
/>
</div>
<div class="col-md-4">
<label for="validationDefaultUsername" class="form-label"
>Username</label
>
<div class="input-group">
<span class="input-group-text" id="inputGroupPrepend2">@</span>
<input
type="email"
class="form-control"
id="validationDefaultUsername"
aria-describedby="inputGroupPrepend2"
required
/>
</div>
</div>
<div class="col-md-6">
<label for="validationDefault03" class="form-label">City</label>
<input
type="text"
class="form-control"
id="validationDefault03"
required
/>
</div>
<div class="col-md-3">
<label for="validationDefault04" class="form-label">State</label>
<select class="form-select" id="validationDefault04" required>
<option selected disabled value="">Choose...</option>
<option>...</option>
</select>
</div>
<div class="col-md-3">
<label for="validationDefault05" class="form-label">Zip</label>
<input
type="text"
class="form-control"
id="validationDefault05"
required
/>
</div>
<div class="col-12">
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
value=""
id="invalidCheck2"
required
/>
<label class="form-check-label" for="invalidCheck2">
Agree to terms and conditions
</label>
</div>
</div>
<div class="col-12 text-center">
<button class="btn btn-primary" type="submit">Submit form</button>
</div>
</form>
</div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"
></script>
<!-- Light Switch -->
<script src="switch.js"></script>
</body>
</html>