-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.html
620 lines (572 loc) · 19.1 KB
/
sample.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
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CSSlib Samples</title>
<!-- CSS Variables & Global Styles -->
<link rel="stylesheet" href="src/styles/_variables.css" />
<link rel="stylesheet" href="src/styles/main.css" />
<link rel="stylesheet" href="src/styles/navbar.css" />
<link rel="stylesheet" href="src/styles/buttons.css" />
<!-- Component Styles -->
<link rel="stylesheet" href="src/styles/badges.css" />
<link rel="stylesheet" href="src/styles/cards.css" />
<link rel="stylesheet" href="src/styles/accordions.css" />
<link rel="stylesheet" href="src/styles/progress.css" />
<style>
/* fixed navbar */
main.container {
padding-top: 100px;
}
</style>
</head>
<body data-theme="dark">
<!-- Fixed Navbar -->
<nav class="navbar">
<div class="container">
<a href="#" class="logo">CSSlib</a>
<ul class="nav-links">
<li><a href="#alerts">Alerts</a></li>
<li><a href="#tooltips">Tooltips</a></li>
<li class="dropdown-nav">
<a href="#" class="dropdown-btn">Components</a>
<ul class="dropdown-menu">
<li><a href="#buttons">Buttons</a></li>
<li><a href="#dropdowns">Dropdowns</a></li>
<li><a href="#tables">Tables</a></li>
<li><a href="#modals">Modals</a></li>
<li><a href="#forms">Forms</a></li>
<li><a href="#cards">Cards</a></li>
<li><a href="#accordions">Accordions</a></li>
<li><a href="#progress">Progress</a></li>
<li><a href="#badges">Badges</a></li>
</ul>
</li>
</ul>
<button id="darkModeToggle" class="dark-mode-btn">Dark Mode</button>
</div>
</nav>
<main class="container">
<h1>CSSlib Component Samples</h1>
<!-- Buttons Section -->
<section id="buttons">
<h2>Buttons</h2>
<!-- Filled Buttons -->
<h3>Filled Buttons</h3>
<button class="btn primary">Primary</button>
<button class="btn secondary">Secondary</button>
<button class="btn success">Success</button>
<button class="btn danger">Danger</button>
<button class="btn blue">Blue</button>
<button class="btn orange">Orange</button>
<button class="btn green">Green</button>
<button class="btn yellow">Yellow</button>
<button class="btn purple">Purple</button>
<button class="btn pink">Pink</button>
<button class="btn aqua">Aqua</button>
<button class="btn lime">Lime</button>
<button class="btn info">Info</button>
<!-- Outline Buttons -->
<h3>Outline Buttons</h3>
<button class="btn red outline">Red</button>
<button class="btn blue outline">Blue</button>
<button class="btn green outline">Green</button>
<button class="btn purple outline">Purple</button>
<button class="btn pink outline">Pink</button>
<button class="btn yellow outline">Yellow</button>
<button class="btn aqua outline">Aqua</button>
<button class="btn lime outline">Lime</button>
<button class="btn orange outline">Orange</button>
</section>
<!-- Alerts Section -->
<section id="alerts">
<h2>Alerts</h2>
<div class="alert success" data-timeout="4000">
Success Alert! <span class="close-btn">×</span>
</div>
<div class="alert warning" data-timeout="5000">
Warning Alert! <span class="close-btn">×</span>
</div>
<div class="alert danger">
Error Alert! <span class="close-btn">×</span>
</div>
<div class="alert warning">
Warning Alert! <span class="close-btn">×</span>
</div>
</section>
<!-- Tooltips Section -->
<section id="tooltips">
<h2>Tooltips</h2>
<p>Hover over the buttons below to see different tooltip positions:</p>
<div class="tooltip">
<button class="btn yellow outline">Top Tooltip</button>
<span class="tooltip-text">Tooltip on Top</span>
</div>
<div class="tooltip bottom">
<button class="btn red">Bottom Tooltip</button>
<span class="tooltip-text">Tooltip on Bottom</span>
</div>
</section>
<!-- Dropdowns Section -->
<section id="dropdowns">
<h2>Dropdowns</h2>
<!-- Default (Bottom) Dropdown -->
<div class="dropdown bottom" style="margin-bottom: 20px;">
<button class="btn lime outline dropdown-btn">Bottom Dropdown</button>
<div class="dropdown-content">
<a href="#">Option 1</a>
<a href="#">Option 2</a>
<a href="#">Option 3</a>
</div>
</div>
<!-- Top Dropdown -->
<div class="dropdown top" style="margin-bottom: 20px;">
<button class="btn aqua dropdown-btn">Top Dropdown</button>
<div class="dropdown-content">
<a href="#">Option A</a>
<a href="#">Option B</a>
<a href="#">Option C</a>
</div>
</div>
<!-- Left Dropdown -->
<div class="dropdown left" style="margin-bottom: 20px;">
<button class="btn yellow outline dropdown-btn">Left Dropdown</button>
<div class="dropdown-content">
<a href="#">Left 1</a>
<a href="#">Left 2</a>
<a href="#">Left 3</a>
</div>
</div>
<!-- Right Dropdown -->
<div class="dropdown right" style="margin-bottom: 20px;">
<button class="btn orange dropdown-btn">Right Dropdown</button>
<div class="dropdown-content">
<a href="#">Right 1</a>
<a href="#">Right 2</a>
<a href="#">Right 3</a>
</div>
</div>
</section>
<!-- Tables Section -->
<section id="tables">
<h2>Tables</h2>
<!-- Default Table -->
<h3>Default Table</h3>
<table class="table-default">
<tr>
<th>Name</th>
<th>Age</th>
<th>Role</th>
</tr>
<tr>
<td>John Doe</td>
<td>30</td>
<td>Developer</td>
</tr>
<tr>
<td>Jane Smith</td>
<td>28</td>
<td>Designer</td>
</tr>
</table>
<!-- Primary Table -->
<h3>Primary Color Table</h3>
<table class="table-primary">
<tr>
<th>Name</th>
<th>Age</th>
<th>Department</th>
</tr>
<tr>
<td>Alice</td>
<td>35</td>
<td>Marketing</td>
</tr>
<tr>
<td>Bob</td>
<td>40</td>
<td>Engineering</td>
</tr>
</table>
<!-- Success Table -->
<h3>Success Color Table</h3>
<table class="table-success">
<tr>
<th>Name</th>
<th>Experience</th>
<th>Department</th>
</tr>
<tr>
<td>Charlie</td>
<td>5 years</td>
<td>Sales</td>
</tr>
<tr>
<td>Dana</td>
<td>8 years</td>
<td>HR</td>
</tr>
</table>
<!-- Orange Table -->
<h3>Orange Table</h3>
<table class="table-orange">
<tr>
<th>Product</th>
<th>Stock</th>
<th>Status</th>
</tr>
<tr>
<td>Phone</td>
<td>3</td>
<td>Low Stock</td>
</tr>
<tr>
<td>Laptop</td>
<td>0</td>
<td>Out of Stock</td>
</tr>
</table>
<!-- Green Table -->
<h3>Green Table</h3>
<table class="table-green">
<tr>
<th>Task</th>
<th>Deadline</th>
<th>Priority</th>
</tr>
<tr>
<td>Update Website</td>
<td>3 days</td>
<td>Medium</td>
</tr>
<tr>
<td>Prepare Report</td>
<td>1 day</td>
<td>High</td>
</tr>
</table>
<!-- Red Table -->
<h3>Red Table</h3>
<table class="table-red">
<tr>
<th>Project</th>
<th>Progress</th>
<th>Team</th>
</tr>
<tr>
<td>App Development</td>
<td>70%</td>
<td>Frontend</td>
</tr>
<tr>
<td>Marketing Campaign</td>
<td>50%</td>
<td>Sales</td>
</tr>
</table>
<!-- Table with Caption -->
<h3>Table with Caption</h3>
<table class="table caption-top">
<caption>List of Users</caption>
<tr>
<th>Name</th>
<th>Age</th>
<th>Role</th>
</tr>
<tr>
<td>John Doe</td>
<td>30</td>
<td>Developer</td>
</tr>
<tr>
<td>Jane Smith</td>
<td>28</td>
<td>Designer</td>
</tr>
</table>
<!-- Striped & Bordered Table -->
<h3>Striped & Bordered Table</h3>
<table class="table-pink table-striped table-bordered">
<tr>
<th>Product</th>
<th>Stock</th>
<th>Price</th>
</tr>
<tr>
<td>Smartphone</td>
<td>20</td>
<td>$500</td>
</tr>
<tr>
<td>Laptop</td>
<td>10</td>
<td>$1200</td>
</tr>
</table>
<!-- Table with Group Divider -->
<h3>Table with Group Divider</h3>
<table class="table">
<thead>
<tr>
<th>Department</th>
<th>Manager</th>
<th>Employees</th>
</tr>
</thead>
<tbody class="table-group-divider">
<tr>
<td>Engineering</td>
<td>Alice</td>
<td>50</td>
</tr>
<tr>
<td>Marketing</td>
<td>Bob</td>
<td>30</td>
</tr>
</tbody>
</table>
<!-- Tables with Custom Border Colors -->
<h3>Tables with Custom Border Colors</h3>
<!-- Red Border -->
<table class="table table-bordered border-red">
<tr>
<th>Name</th>
<th>Age</th>
<th>Role</th>
</tr>
<tr>
<td>John Doe</td>
<td>30</td>
<td>Developer</td>
</tr>
</table>
<!-- Blue Border -->
<table class="table-yellow table-bordered border-blue">
<tr>
<th>Product</th>
<th>Stock</th>
<th>Price</th>
</tr>
<tr>
<td>Smartphone</td>
<td>20</td>
<td>$500</td>
</tr>
</table>
<!-- Green Border -->
<table class="table table-bordered border-green">
<tr>
<th>Department</th>
<th>Manager</th>
<th>Employees</th>
</tr>
<tr>
<td>Marketing</td>
<td>Bob</td>
<td>30</td>
</tr>
</table>
</section>
<!-- Modals Section -->
<section id="modals">
<h2>Modals</h2>
<button data-modal="sampleModal" class="btn btn-primary">Open Modal</button>
<div id="modalOverlay" class="modal-overlay"></div>
<div id="sampleModal" class="modal">
<div class="modal-content">
<button class="modal-close">×</button>
<h3>Sample Modal</h3>
<p>This modal adapts to both light and dark themes!</p>
<button class="btn btn-secondary" data-modal-close>Close</button>
</div>
</div>
</section>
<!-- Forms Section -->
<section id="forms">
<h2>Forms</h2>
<form action="#" method="post">
<!-- Personal Information -->
<fieldset>
<legend>Personal Information</legend>
<div class="form-group">
<label for="fname">First Name:</label>
<input type="text" id="fname" name="fname" placeholder="John" required />
</div>
<div class="form-group">
<label for="lname">Last Name:</label>
<input type="text" id="lname" name="lname" placeholder="Doe" required />
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" id="email" name="email" placeholder="john@example.com" required />
</div>
</fieldset>
<!-- Preferences -->
<fieldset>
<legend>Preferences</legend>
<div class="form-group">
<label>Gender:</label>
<div>
<label>
<input type="radio" name="gender" value="male" class="radio-blue radio-sm" checked />
Male
</label>
<label>
<input type="radio" name="gender" value="female" class="radio-pink radio-sm" />
Female
</label>
<label>
<input type="radio" name="gender" value="other" class="radio-yellow radio-sm" />
Other
</label>
</div>
</div>
<div class="form-group">
<label for="hobbies">Hobbies:</label>
<select id="hobbies" name="hobbies" multiple>
<option value="reading">Reading</option>
<option value="traveling">Traveling</option>
<option value="gaming">Gaming</option>
<option value="sports">Sports</option>
</select>
</div>
</fieldset>
<!-- Additional Comments -->
<fieldset>
<legend>Additional Comments</legend>
<div class="form-group">
<label for="comments">Comments:</label>
<textarea id="comments" name="comments" rows="4" placeholder="Your message..."></textarea>
</div>
</fieldset>
<!-- Submit Button -->
<button type="submit" class="btn submit">Submit Form</button>
</form>
</section>
<!-- Cards Section -->
<section id="cards">
<h2>Cards</h2>
<div class="card-container">
<div class="card primary card-shadow">
<img src="src/images/card1.jpg" alt="Card Image 1" />
<div class="card-content">
<h3>Card Title 1</h3>
<p>This is a sample description for card number one.</p>
<button class="btn secondary">Learn More</button>
</div>
</div>
<div class="card success card-rounded">
<img src="src/images/card2.jpg" alt="Card Image 2" />
<div class="card-content">
<h3>Card Title 2</h3>
<p>This card contains an alternative sample description.</p>
<button class="btn secondary">Learn More</button>
</div>
</div>
<div class="card danger card-shadow">
<img src="src/images/card3.jpg" alt="Card Image 3" />
<div class="card-content">
<h3>Card Title 3</h3>
<p>A brief description for the third card goes here.</p>
<button class="btn secondary">Learn More</button>
</div>
</div>
</div>
</section>
<!-- Accordion Section -->
<section id="accordions">
<h2>Accordions</h2>
<div class="accordion">
<div class="accordion-header">Accordion Item 1</div>
<div class="accordion-content">
<p>This is the content of the first accordion panel.</p>
</div>
</div>
<div class="accordion">
<div class="accordion-header">Accordion Item 2</div>
<div class="accordion-content">
<p>This is the content of the second accordion panel, providing additional details.</p>
</div>
</div>
<div class="accordion">
<div class="accordion-header">Accordion Item 3</div>
<div class="accordion-content">
<p>The third accordion panel can hold more complex information or even nested elements.</p>
</div>
</div>
</section>
<!-- Progress Bars Section -->
<section id="progress">
<h2>Progress Bars & Loaders</h2>
<!-- Basic Progress Bar -->
<div class="progress-container">
<h3>Basic Progress Bar (60%)</h3>
<div class="progress-bar">
<div class="progress-bar-fill progress-60 animate">60%</div>
</div>
</div>
<!-- Info Color Progress Bar -->
<div class="progress-container">
<h3>Info Color Progress Bar (80%)</h3>
<div class="progress-bar">
<div class="progress-bar-fill progress-80 animate progress-info">80%</div>
</div>
</div>
<!-- Warning Color Progress Bar -->
<div class="progress-container">
<h3>Warning Color Progress Bar (40%)</h3>
<div class="progress-bar">
<div class="progress-bar-fill progress-40 animate progress-yellow">40%</div>
</div>
</div>
<!-- Rounded & Shadow Progress Bar -->
<div class="progress-container progress-margin">
<h3>Rounded & Shadow Progress Bar (70%)</h3>
<div class="progress-bar progress-rounded progress-shadow">
<div class="progress-bar-fill progress-70 animate progress-lime">70%</div>
</div>
</div>
<!-- Custom Styled Progress Bar -->
<div class="progress-container progress-margin">
<h3>Custom Styled Progress Bar (90%)</h3>
<div class="progress-bar progress-rounded progress-shadow">
<div class="progress-bar-fill progress-90 animate progress-orange">90%</div>
</div>
</div>
</section>
<!-- Badges Section -->
<section id="badges">
<h2>Badges</h2>
<p>
Notifications:
<span class="badge badge-info">Info</span>
<span class="badge badge-success">Success</span>
<span class="badge badge-warning">Warning</span>
<span class="badge badge-danger">Error</span>
</p>
</section>
</main>
<!-- Footer -->
<footer>
<p>Designed with love using HTML, CSS, and JavaScript.</p>
<p>
Visit our <a href="#">GitHub</a> repository or check out our <a href="#">Documentation</a> for more details.
</p>
<div class="footer-content">
<div class="social-icons">
<a href="#" class="social-icon"><!-- e.g., FontAwesome icon for Facebook -->i<i class="fab fa-facebook"></i></a>
<a href="#" class="social-icon"><!-- Icon for Twitter -->i<i class="fab fa-twitter"></i></a>
<a href="#" class="social-icon"><!-- Icon for Instagram -->i<i class="fab fa-instagram"></i></a>
</div>
<div class="legal">
© 2025 CSSlib. All rights reserved. | <a href="#">Privacy Policy</a> | <a href="#">Terms of Service</a>
</div>
</div>
</footer>
<!-- JavaScript Modules -->
<script src="src/scripts/main.js" type="module"></script>
<script src="src/scripts/accordions.js" type="module"></script>
</body>
</html>