VellaroSKIBIDI commited on
Commit
6f00a0c
·
verified ·
1 Parent(s): bff980a

make it exactly ;like coddex

Browse files
Files changed (5) hide show
  1. components/footer.js +11 -12
  2. components/navbar.js +5 -6
  3. index.html +8 -8
  4. script.js +15 -25
  5. style.css +17 -9
components/footer.js CHANGED
@@ -49,25 +49,24 @@ class CustomFooter extends HTMLElement {
49
  </div>
50
 
51
  <div>
52
- <h3 class="text-lg font-semibold mb-4">Learn</h3>
53
  <ul class="space-y-2">
54
- <li><a href="/python" class="footer-link text-gray-400">Python</a></li>
55
- <li><a href="/javascript" class="footer-link text-gray-400">JavaScript</a></li>
56
- <li><a href="/web-dev" class="footer-link text-gray-400">Web Development</a></li>
57
- <li><a href="/github-copilot" class="footer-link text-gray-400">GitHub Copilot</a></li>
58
  </ul>
59
- </div>
60
 
61
  <div>
62
  <h3 class="text-lg font-semibold mb-4">Community</h3>
63
  <ul class="space-y-2">
64
- <li><a href="/community" class="footer-link text-gray-400">Community Hub</a></li>
65
- <li><a href="/community/leaderboards" class="footer-link text-gray-400">Leaderboards</a></li>
66
- <li><a href="/community/project-showcase" class="footer-link text-gray-400">Project Showcase</a></li>
67
- <li><a href="/community/monthly-challenge" class="footer-link text-gray-400">Monthly Challenge</a></li>
68
- <li><a href="/community/30-nites-of-code" class="footer-link text-gray-400">30 Nites of Code</a></li>
69
  </ul>
70
- </div>
71
 
72
  <div>
73
  <h3 class="text-lg font-semibold mb-4">Resources</h3>
 
49
  </div>
50
 
51
  <div>
52
+ <h3 class="text-lg font-semibold mb-4">Resources</h3>
53
  <ul class="space-y-2">
54
+ <li><a href="/learn" class="footer-link text-gray-400">Learning Paths</a></li>
55
+ <li><a href="/docs" class="footer-link text-gray-400">Documentation</a></li>
56
+ <li><a href="/cheatsheets" class="footer-link text-gray-400">Cheatsheets</a></li>
57
+ <li><a href="/tools" class="footer-link text-gray-400">Developer Tools</a></li>
58
  </ul>
59
+ </div>
60
 
61
  <div>
62
  <h3 class="text-lg font-semibold mb-4">Community</h3>
63
  <ul class="space-y-2">
64
+ <li><a href="/community" class="footer-link text-gray-400">Forum</a></li>
65
+ <li><a href="/events" class="footer-link text-gray-400">Events</a></li>
66
+ <li><a href="/leaderboard" class="footer-link text-gray-400">Leaderboard</a></li>
67
+ <li><a href="/mentors" class="footer-link text-gray-400">Mentors</a></li>
 
68
  </ul>
69
+ </div>
70
 
71
  <div>
72
  <h3 class="text-lg font-semibold mb-4">Resources</h3>
components/navbar.js CHANGED
@@ -59,21 +59,20 @@ class CustomNavbar extends HTMLElement {
59
 
60
  <div class="hidden lg:flex items-center space-x-8">
61
  <div class="flex space-x-6">
62
- <a href="/python" class="nav-link py-2">Python</a>
63
- <a href="/javascript" class="nav-link py-2">JavaScript</a>
64
- <a href="/web-dev" class="nav-link py-2">Web Dev</a>
65
  <a href="/challenges" class="nav-link py-2">Challenges</a>
66
  <a href="/projects" class="nav-link py-2">Projects</a>
 
67
  <a href="/community" class="nav-link py-2">Community</a>
68
- </div>
 
69
 
70
  <div class="flex items-center ml-8 space-x-4">
71
  <button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-700 transition">
72
  <i data-feather="moon" class="hidden dark:block"></i>
73
  <i data-feather="sun" class="dark:hidden"></i>
74
  </button>
75
- <a href="/builds" class="px-4 py-2 bg-primary-500 hover:bg-primary-600 rounded-lg font-medium transition">Build</a>
76
- </div>
77
  </div>
78
 
79
  <button id="mobile-menu-button" class="lg:hidden p-2 rounded-md hover:bg-gray-700 transition">
 
59
 
60
  <div class="hidden lg:flex items-center space-x-8">
61
  <div class="flex space-x-6">
 
 
 
62
  <a href="/challenges" class="nav-link py-2">Challenges</a>
63
  <a href="/projects" class="nav-link py-2">Projects</a>
64
+ <a href="/learn" class="nav-link py-2">Learn</a>
65
  <a href="/community" class="nav-link py-2">Community</a>
66
+ <a href="/blog" class="nav-link py-2">Blog</a>
67
+ </div>
68
 
69
  <div class="flex items-center ml-8 space-x-4">
70
  <button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-700 transition">
71
  <i data-feather="moon" class="hidden dark:block"></i>
72
  <i data-feather="sun" class="dark:hidden"></i>
73
  </button>
74
+ <a href="/new-project" class="px-4 py-2 bg-primary-500 hover:bg-primary-600 rounded-lg font-medium transition">New Project</a>
75
+ </div>
76
  </div>
77
 
78
  <button id="mobile-menu-button" class="lg:hidden p-2 rounded-md hover:bg-gray-700 transition">
index.html CHANGED
@@ -3,8 +3,8 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>CodeDex Clone | Home</title>
7
- <link rel="stylesheet" href="style.css">
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
  <script src="https://unpkg.com/feather-icons"></script>
@@ -32,12 +32,12 @@
32
  <main class="container mx-auto px-4 py-8">
33
  <section class="mb-16">
34
  <div class="text-center">
35
- <h1 class="text-4xl md:text-6xl font-bold mb-6 bg-gradient-to-r from-primary-500 to-secondary-500 bg-clip-text text-transparent">Master Coding with Fun Challenges</h1>
36
- <p class="text-xl text-gray-400 max-w-3xl mx-auto">Join our community of developers, complete challenges, build projects, and climb the leaderboards!</p>
37
- <div class="mt-8 flex justify-center gap-4">
38
- <a href="/python" class="px-6 py-3 bg-primary-500 hover:bg-primary-600 rounded-lg font-medium transition">Start Learning</a>
39
- <a href="/community" class="px-6 py-3 border border-gray-700 hover:bg-gray-800 rounded-lg font-medium transition">Join Community</a>
40
- </div>
41
  </div>
42
  </section>
43
 
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>CodeDex | Learn to Code</title>
7
+ <link rel="stylesheet" href="style.css">
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
  <script src="https://unpkg.com/feather-icons"></script>
 
32
  <main class="container mx-auto px-4 py-8">
33
  <section class="mb-16">
34
  <div class="text-center">
35
+ <h1 class="text-4xl md:text-6xl font-bold mb-6 bg-gradient-to-r from-primary-500 to-secondary-500 bg-clip-text text-transparent">Learn, Build, Share</h1>
36
+ <p class="text-xl text-gray-400 max-w-3xl mx-auto">The interactive platform to learn coding through challenges and projects</p>
37
+ <div class="mt-8 flex justify-center gap-4">
38
+ <a href="/challenges" class="px-6 py-3 bg-primary-500 hover:bg-primary-600 rounded-lg font-medium transition">Start Coding</a>
39
+ <a href="/projects" class="px-6 py-3 border border-gray-700 hover:bg-gray-800 rounded-lg font-medium transition">View Projects</a>
40
+ </div>
41
  </div>
42
  </section>
43
 
script.js CHANGED
@@ -41,31 +41,21 @@ if (localStorage.getItem('theme') === 'light') {
41
  } else {
42
  document.documentElement.classList.add('dark');
43
  }
44
-
45
- // Initialize tooltips
46
  document.addEventListener('DOMContentLoaded', () => {
47
- const tooltipElements = document.querySelectorAll('[data-tooltip]');
 
 
48
 
49
- tooltipElements.forEach(el => {
50
- el.addEventListener('mouseenter', () => {
51
- const tooltip = document.createElement('div');
52
- tooltip.className = 'absolute z-50 px-3 py-1 text-sm bg-gray-800 text-white rounded-md shadow-lg';
53
- tooltip.textContent = el.getAttribute('data-tooltip');
54
-
55
- const rect = el.getBoundingClientRect();
56
- tooltip.style.top = `${rect.top - 40}px`;
57
- tooltip.style.left = `${rect.left + rect.width / 2}px`;
58
- tooltip.style.transform = 'translateX(-50%)';
59
-
60
- tooltip.id = 'current-tooltip';
61
- document.body.appendChild(tooltip);
62
- });
63
-
64
- el.addEventListener('mouseleave', () => {
65
- const tooltip = document.getElementById('current-tooltip');
66
- if (tooltip) {
67
- tooltip.remove();
68
- }
69
- });
70
  });
71
- });
 
 
 
 
 
 
 
41
  } else {
42
  document.documentElement.classList.add('dark');
43
  }
44
+ // CodeDex specific initialization
 
45
  document.addEventListener('DOMContentLoaded', () => {
46
+ // Add active class to current nav link
47
+ const currentPath = window.location.pathname;
48
+ const navLinks = document.querySelectorAll('custom-navbar a, custom-footer a');
49
 
50
+ navLinks.forEach(link => {
51
+ if (link.getAttribute('href') === currentPath) {
52
+ link.classList.add('active');
53
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  });
55
+
56
+ // Initialize code editor if present
57
+ if (document.querySelector('.code-editor')) {
58
+ // This would be replaced with actual CodeMirror or Monaco editor initialization
59
+ console.log('Code editor initialized');
60
+ }
61
+ });
style.css CHANGED
@@ -47,22 +47,30 @@ body {
47
  transform: translateY(0);
48
  }
49
  }
 
 
 
 
 
 
50
 
51
- /* Utility classes */
52
- .hover-scale {
53
- transition: transform 0.2s ease;
54
  }
55
 
56
- .hover-scale:hover {
57
- transform: scale(1.03);
 
58
  }
59
 
60
- .gradient-text {
61
- background-clip: text;
62
- -webkit-background-clip: text;
63
- color: transparent;
64
  }
65
 
 
 
 
66
  /* Dark mode toggle transition */
67
  .dark-mode-transition * {
68
  transition: background-color 0.3s ease, border-color 0.3s ease;
 
47
  transform: translateY(0);
48
  }
49
  }
50
+ /* CodeDex specific styles */
51
+ .code-editor {
52
+ border-radius: 8px;
53
+ overflow: hidden;
54
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
55
+ }
56
 
57
+ .challenge-card {
58
+ transition: all 0.2s ease;
 
59
  }
60
 
61
+ .challenge-card:hover {
62
+ transform: translateY(-2px);
63
+ box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
64
  }
65
 
66
+ .active {
67
+ color: #6366f1 !important;
68
+ font-weight: 600;
 
69
  }
70
 
71
+ .active:after {
72
+ width: 100% !important;
73
+ }
74
  /* Dark mode toggle transition */
75
  .dark-mode-transition * {
76
  transition: background-color 0.3s ease, border-color 0.3s ease;