forked from AnujShrivastava01/AnimateItNow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomponents.html
More file actions
517 lines (462 loc) · 23.4 KB
/
components.html
File metadata and controls
517 lines (462 loc) · 23.4 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Component Documentation | AnimateItNow</title>
<meta name="description" content="Interactive component documentation with live examples, code snippets, and best practices">
<!-- 📦 Font Awesome for icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- 💻 Prism.js for syntax highlighting -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css">
<link rel="stylesheet" href="components.css">
<!-- 📱 PWA Meta Tags -->
<meta name="theme-color" content="#ff6b6b">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="AnimateItNow">
<link rel="manifest" href="manifest.json">
<link rel="icon" type="image/png" href="images/logo.png">
<link rel="stylesheet" href="./navbar_styles.css">
</head>
<body data-theme="light">
<!-- Progress Bar -->
<div id="progress-bar"></div>
<!-- Header/Navigation -->
<header class="main-primary-bar header" id="main-header">
<div class="container nav-container">
<div class="logo-container">
<img src="images/logo.png" alt="AnimateItNow Logo" class="logo" />
<a href="index.html" class="site-name-link">
<span class="site-name">Animate It Now</span>
</a>
</div>
<ul class="nav-links desktop-only" id="desktop-links">
<li>
<a href="index.html">
<i class="fas fa-home" style="margin-right: 5px"></i> Home
</a>
</li>
<li>
<a href="about.html">
<i class="fas fa-info-circle" style="margin-right: 5px"></i> About
</a>
</li>
<li>
<a href="templates.html">
<i class="fas fa-palette" style="margin-right: 5px"></i> Templates
</a>
</li>
<li>
<a href="components.html" class="active">
<i class="fas fa-cube" style="margin-right: 5px"></i> Components
</a>
</li>
<li>
<a href="playground.html">
<i class="fas fa-mouse-pointer" style="margin-right: 5px"></i> Hover-Effects
</a>
</li>
<li>
<a href="contributors.html">
<i class="fas fa-users" style="margin-right: 5px"></i> Contributors
</a>
</li>
<li>
<a href="contact.html">
<i class="fas fa-envelope" style="margin-right: 5px"></i> Contact
</a>
</li>
<li>
<a href="leaderboard.html">
<i class="fas fa-trophy" style="margin-right: 5px"></i> Leaderboard
</a>
</li>
</ul>
<div class="nav-actions">
<a href="loginpage.html" class="btn btn-outline">Login</a>
<a href="signup.html" class="btn">Sign Up</a>
<button class="theme-toggle" id="theme-toggle" aria-label="Toggle theme">
<i class="fas fa-moon"></i>
</button>
<button class="hamburger" id="hamburger" aria-label="Toggle menu">
<span></span>
<span></span>
<span></span>
</button>
</div>
</div>
</header>
<div id="mobile-menu" class="mobile-menu-container">
<div class="mobile-menu-links">
<div class="mobile-link-item">
<a href="index.html"><i class="fas fa-home" style="margin-right: 10px"></i> Home</a>
</div>
<div class="mobile-link-item">
<a href="about.html"><i class="fas fa-info-circle" style="margin-right: 10px"></i> About</a>
</div>
<div class="mobile-link-item">
<a href="templates.html"><i class="fas fa-palette" style="margin-right: 10px"></i> Templates</a>
</div>
<div class="mobile-link-item">
<a href="components.html" class="active"><i class="fas fa-cube" style="margin-right: 10px"></i> Components</a>
</div>
<div class="mobile-link-item">
<a href="playground.html"><i class="fas fa-mouse-pointer" style="margin-right: 10px"></i> Hover-Effects</a>
</div>
<div class="mobile-link-item">
<a href="contributors.html"><i class="fas fa-users" style="margin-right: 10px"></i> Contributors</a>
</div>
<div class="mobile-link-item">
<a href="contact.html"><i class="fas fa-envelope" style="margin-right: 10px"></i> Contact</a>
</div>
<div class="mobile-link-item">
<a href="leaderboard.html"><i class="fas fa-trophy" style="margin-right: 10px"></i> Leaderboard</a>
</div>
</div>
</div>
<!-- 📄 Main Content -->
<main class="main-content">
<!-- 📋 Header Section -->
<section class="hero">
<div class="container">
<h1 class="docs-title">
<i class="fas fa-cube"></i>
Component Documentation
</h1>
<p class="docs-subtitle">
Interactive showcase of reusable UI components with live examples,
code snippets, and implementation guides
</p>
</div>
</section>
<!-- 🔍 Search and Filter Section -->
<section class="search-filter-section">
<div class="container">
<div class="search-container">
<div class="search-input-wrapper">
<i class="fas fa-search search-icon"></i>
<input
type="text"
id="searchInput"
placeholder="Search components, categories, or features..."
aria-label="Search components"
>
<button id="clearSearch" class="clear-btn" aria-label="Clear search">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<div class="filter-container">
<div class="filter-group">
<label class="filter-label">Category:</label>
<div class="filter-buttons" id="categoryFilters">
<button class="filter-btn active" data-category="all">All</button>
<button class="filter-btn" data-category="navigation">Navigation</button>
<button class="filter-btn" data-category="buttons">Buttons</button>
<button class="filter-btn" data-category="cards">Cards</button>
<button class="filter-btn" data-category="forms">Forms</button>
<button class="filter-btn" data-category="animations">Animations</button>
<button class="filter-btn" data-category="layouts">Layouts</button>
<button class="filter-btn" data-category="effects">Effects</button>
</div>
</div>
<div class="filter-group">
<label class="filter-label">Complexity:</label>
<div class="filter-buttons" id="complexityFilters">
<button class="filter-btn active" data-complexity="all">All</button>
<button class="filter-btn" data-complexity="beginner">Beginner</button>
<button class="filter-btn" data-complexity="intermediate">Intermediate</button>
<button class="filter-btn" data-complexity="advanced">Advanced</button>
</div>
</div>
<div class="view-toggle">
<button id="gridView" class="view-btn active" aria-label="Grid view">
<i class="fas fa-th"></i>
</button>
<button id="listView" class="view-btn" aria-label="List view">
<i class="fas fa-list"></i>
</button>
</div>
</div>
</div>
</section>
<!-- 🧩 Components Grid -->
<section class="components-section">
<div class="container">
<div class="components-grid" id="componentsGrid">
<!-- Components will be dynamically loaded here -->
</div>
<!-- 🚫 No Results Message -->
<div class="no-results" id="noResults" style="display: none;">
<i class="fas fa-search"></i>
<h3>No components found</h3>
<p>Try adjusting your search terms or filters</p>
</div>
</div>
</section>
<!-- 🪟 Component Detail Modal -->
<div class="modal-overlay" id="componentModal">
<div class="modal-content">
<div class="modal-header">
<h2 id="modalTitle">Component Details</h2>
<button class="modal-close" id="modalClose" aria-label="Close modal">
<i class="fas fa-times"></i>
</button>
</div>
<div class="modal-body">
<div class="modal-tabs">
<button class="tab-btn active" data-tab="preview">Preview</button>
<button class="tab-btn" data-tab="code">Code</button>
<button class="tab-btn" data-tab="usage">Usage</button>
<button class="tab-btn" data-tab="customization">Customization</button>
</div>
<div class="tab-content">
<div class="tab-pane active" id="previewTab">
<div class="component-preview" id="componentPreview">
<!-- Live component preview -->
</div>
</div>
<div class="tab-pane" id="codeTab">
<div class="code-section">
<div class="code-header">
<span class="code-language">HTML</span>
<button class="copy-code-btn" data-code-type="html">
<i class="fas fa-copy"></i>
Copy HTML
</button>
</div>
<pre><code class="language-html" id="htmlCode"></code></pre>
</div>
<div class="code-section">
<div class="code-header">
<span class="code-language">CSS</span>
<button class="copy-code-btn" data-code-type="css">
<i class="fas fa-copy"></i>
Copy CSS
</button>
</div>
<pre><code class="language-css" id="cssCode"></code></pre>
</div>
<div class="code-section" id="jsCodeSection" style="display: none;">
<div class="code-header">
<span class="code-language">JavaScript</span>
<button class="copy-code-btn" data-code-type="js">
<i class="fas fa-copy"></i>
Copy JS
</button>
</div>
<pre><code class="language-javascript" id="jsCode"></code></pre>
</div>
</div>
<div class="tab-pane" id="usageTab">
<div class="usage-content" id="usageContent">
<!-- Usage examples and best practices -->
</div>
</div>
<div class="tab-pane" id="customizationTab">
<div class="customization-content" id="customizationContent">
<!-- Customization options and variables -->
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- 🦶 Footer -->
<footer class="footer">
<div class="container">
<div class="footer-content">
<div class="footer-about">
<div class="footer-logo">
<img src="images/logo.png" alt="Website Logo" />
<span>AnimateItNow</span>
</div>
<p>
Creating impactful web animations and templates for everyone. Join
our community to contribute, learn, and grow together.
</p>
<div class="footer-social">
<h3>Connect With Us</h3>
<div class="social-icons">
<a href="https://github.com/itsAnimation/AnimateItNow" target="_blank" title="GitHub"><i class="fab fa-github"></i></a>
<a href="https://www.linkedin.com/in/anujshrivastava1/" target="_blank" title="LinkedIn"><i class="fab fa-linkedin"></i></a>
<a href="https://twitter.com" target="_blank" title="Twitter"><i class="fab fa-twitter"></i></a>
<a href="https://discord.com" target="_blank" title="Discord"><i class="fab fa-discord"></i></a>
<a href="mailto:contact@animateitnow.com" title="Email"><i class="fas fa-envelope"></i></a>
</div>
</div>
</div>
<div class="footer-links">
<h3>Quick Links</h3>
<ul>
<li><a href="index.html"><i class="fas fa-home"></i> Home</a></li>
<li><a href="templates.html"><i class="fas fa-palette"></i> Templates</a></li>
<li><a href="editor.html"><i class="fas fa-code"></i> Editor</a></li>
<li><a href="playground.html"><i class="fas fa-mouse-pointer"></i> Hover Effects</a></li>
<li><a href="contributors.html"><i class="fas fa-users"></i> Contributors</a></li>
<li><a href="leaderboard.html"><i class="fas fa-trophy"></i> Leaderboard</a></li>
</ul>
</div>
<div class="footer-links">
<h3>Resources</h3>
<ul>
<li><a href="about.html"><i class="fas fa-info-circle"></i> About Us</a></li>
<li><a href="contact.html"><i class="fas fa-envelope"></i> Contact</a></li>
<li><a href="#"><i class="fas fa-book"></i> Documentation</a></li>
<li><a href="#"><i class="fas fa-blog"></i> Blog</a></li>
<li><a href="#"><i class="fas fa-question-circle"></i> Support</a></li>
<li><a href="#"><i class="fas fa-shield-alt"></i> Privacy Policy</a></li>
</ul>
</div>
<div class="footer-social">
<div class="newsletter">
<h4>Stay Updated</h4>
<p>Get the latest templates and updates directly to your inbox.</p>
<form class="newsletter-form">
<input type="email" placeholder="Your email address" required />
<button type="submit" class="newsletter-submit-btn">
<i class="fa-solid fa-paper-plane"></i>
Subscribe
</button>
</form>
</div>
<br />
<h3>Connect With Us</h3>
<div class="social-icons">
<a href="https://github.com/itsAnimation/AnimateItNow" target="_blank" title="GitHub"><i class="fab fa-github"></i></a>
<a href="https://www.linkedin.com/in/anujshrivastava1/" target="_blank" title="LinkedIn"><i class="fab fa-linkedin"></i></a>
<a href="https://twitter.com" target="_blank" title="Twitter"><i class="fab fa-twitter"></i></a>
<a href="https://discord.com" target="_blank" title="Discord"><i class="fab fa-discord"></i></a>
<a href="mailto:contact@animateitnow.com" title="Email"><i class="fas fa-envelope"></i></a>
</div>
</div>
</div>
<div class="footer-bottom">
<p>
© 2025 AnimateItNow. Made with ❤️ by
<span class="highlight">Anuj</span> and Contributors.
</p>
</div>
</div>
</footer>
<button onclick="scrollToTop()" id="scrollBtn" title="Go to top">↑</button>
<!-- Scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="components.js"></script>
<script>
// 🌗 Theme Toggle - Perfect Implementation
const themeToggle = document.getElementById("theme-toggle");
const themeIcon = themeToggle.querySelector("i");
const body = document.body;
// Function to set theme
function setTheme(theme) {
body.setAttribute("data-theme", theme);
localStorage.setItem("theme", theme);
// Update icon
if (theme === "dark") {
themeIcon.classList.remove("fa-moon");
themeIcon.classList.add("fa-sun");
} else {
themeIcon.classList.remove("fa-sun");
themeIcon.classList.add("fa-moon");
}
}
// Initialize theme
function initTheme() {
const savedTheme = localStorage.getItem("theme");
const systemPrefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
if (savedTheme) {
setTheme(savedTheme);
} else if (systemPrefersDark) {
setTheme("dark");
} else {
setTheme("light");
}
}
// Toggle theme
themeToggle.addEventListener("click", () => {
const currentTheme = body.getAttribute("data-theme");
setTheme(currentTheme === "light" ? "dark" : "light");
});
// Listen for system theme changes
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (e) => {
if (!localStorage.getItem("theme")) {
setTheme(e.matches ? "dark" : "light");
}
});
// 📱 Mobile Navigation Toggle
const hamburger = document.getElementById("hamburger");
const mobileMenu = document.getElementById("mobile-menu");
hamburger.addEventListener("click", () => {
mobileMenu.classList.toggle("active");
hamburger.classList.toggle("active");
});
// Close mobile menu when clicking on a link
document.querySelectorAll(".mobile-menu-links a").forEach((link) => {
link.addEventListener("click", () => {
mobileMenu.classList.remove("active");
hamburger.classList.remove("active");
});
});
// ⏳ Progress Bar
window.addEventListener("scroll", () => {
const winScroll = document.body.scrollTop || document.documentElement.scrollTop;
const height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
const scrolled = (winScroll / height) * 100;
document.getElementById("progress-bar").style.width = scrolled + "%";
});
// ⬆️ Scroll to top functionality
function scrollToTop() {
window.scrollTo({ top: 0, behavior: "smooth" });
}
window.onscroll = function () {
const scrollBtn = document.getElementById("scrollBtn");
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 300) {
scrollBtn.style.display = "block";
} else {
scrollBtn.style.display = "none";
}
};
// Mobile Accordion Logic
const accordionToggles = document.querySelectorAll(".accordion-toggle[data-accordion-content]");
accordionToggles.forEach((toggle) => {
toggle.addEventListener("click", (e) => {
if (toggle.getAttribute("href") === "#") {
e.preventDefault();
}
const contentId = toggle.getAttribute("data-accordion-content");
const content = document.getElementById(contentId);
if (!content) return;
const isActive = content.classList.contains("active");
// Close all other accordions
document.querySelectorAll(".accordion-content").forEach((c) => {
if (c !== content) {
c.classList.remove("active");
c.style.maxHeight = null;
const otherToggle = c.previousElementSibling;
if (otherToggle) {
otherToggle.querySelector("i").style.transform = null;
}
}
});
// Toggle current accordion
content.classList.toggle("active");
if (content.classList.contains("active")) {
content.style.maxHeight = content.scrollHeight + "px";
toggle.querySelector("i").style.transform = "rotate(180deg)";
} else {
content.style.maxHeight = null;
toggle.querySelector("i").style.transform = null;
}
});
});
// Initialize everything when page loads
document.addEventListener("DOMContentLoaded", () => {
initTheme();
});
</script>
</body>
</html>