devsmsm commited on
Commit
946c0a4
·
verified ·
1 Parent(s): 76c0c73

fix it and make login page for it if you can use ejs to make ut easier

Browse files
Files changed (3) hide show
  1. components/navbar.js +2 -7
  2. index.html +3 -5
  3. login.html +115 -0
components/navbar.js CHANGED
@@ -51,15 +51,13 @@ class CustomNavbar extends HTMLElement {
51
  <span class="hidden md:inline text-gray-700 dark:text-gray-300">Admin</span>
52
  <i data-feather="chevron-down" class="hidden md:inline w-4 h-4 text-gray-500"></i>
53
  </button>
54
-
55
- <!-- Dropdown Menu -->
56
  <div class="absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 rounded-md shadow-lg py-1 z-20 hidden">
57
  <a href="#" class="block px-4 py-2 text-gray-800 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">Profile</a>
58
  <a href="#" class="block px-4 py-2 text-gray-800 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">Settings</a>
59
  <a href="#" class="block px-4 py-2 text-gray-800 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">Logout</a>
60
  </div>
61
  </div>
62
-
63
  <!-- Mobile menu button -->
64
  <button class="md:hidden p-2 rounded-full text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 mobile-menu">
65
  <i data-feather="menu" class="w-5 h-5"></i>
@@ -69,7 +67,6 @@ class CustomNavbar extends HTMLElement {
69
  </div>
70
  </nav>
71
  `;
72
-
73
  // Add event listener for dropdown
74
  const profileButton = this.shadowRoot.querySelector('.relative button');
75
  const dropdownMenu = this.shadowRoot.querySelector('.relative .hidden');
@@ -78,7 +75,6 @@ class CustomNavbar extends HTMLElement {
78
  profileButton.addEventListener('click', () => {
79
  dropdownMenu.classList.toggle('hidden');
80
  });
81
-
82
  // Close dropdown when clicking outside
83
  document.addEventListener('click', (e) => {
84
  if (!profileButton.contains(e.target) && !dropdownMenu.contains(e.target)) {
@@ -86,7 +82,6 @@ class CustomNavbar extends HTMLElement {
86
  }
87
  });
88
  }
89
-
90
  // Mobile menu toggle
91
  const mobileMenuButton = this.shadowRoot.querySelector('.mobile-menu');
92
  const navLinks = this.shadowRoot.querySelector('.nav-links');
@@ -113,4 +108,4 @@ class CustomNavbar extends HTMLElement {
113
  }
114
  }
115
 
116
- customElements.define('custom-navbar', CustomNavbar);
 
51
  <span class="hidden md:inline text-gray-700 dark:text-gray-300">Admin</span>
52
  <i data-feather="chevron-down" class="hidden md:inline w-4 h-4 text-gray-500"></i>
53
  </button>
54
+ <!-- Dropdown Menu -->
 
55
  <div class="absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 rounded-md shadow-lg py-1 z-20 hidden">
56
  <a href="#" class="block px-4 py-2 text-gray-800 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">Profile</a>
57
  <a href="#" class="block px-4 py-2 text-gray-800 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">Settings</a>
58
  <a href="#" class="block px-4 py-2 text-gray-800 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">Logout</a>
59
  </div>
60
  </div>
 
61
  <!-- Mobile menu button -->
62
  <button class="md:hidden p-2 rounded-full text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 mobile-menu">
63
  <i data-feather="menu" class="w-5 h-5"></i>
 
67
  </div>
68
  </nav>
69
  `;
 
70
  // Add event listener for dropdown
71
  const profileButton = this.shadowRoot.querySelector('.relative button');
72
  const dropdownMenu = this.shadowRoot.querySelector('.relative .hidden');
 
75
  profileButton.addEventListener('click', () => {
76
  dropdownMenu.classList.toggle('hidden');
77
  });
 
78
  // Close dropdown when clicking outside
79
  document.addEventListener('click', (e) => {
80
  if (!profileButton.contains(e.target) && !dropdownMenu.contains(e.target)) {
 
82
  }
83
  });
84
  }
 
85
  // Mobile menu toggle
86
  const mobileMenuButton = this.shadowRoot.querySelector('.mobile-menu');
87
  const navLinks = this.shadowRoot.querySelector('.nav-links');
 
108
  }
109
  }
110
 
111
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -9,7 +9,7 @@
9
  <script src="https://unpkg.com/feather-icons"></script>
10
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
  <link rel="stylesheet" href="style.css">
12
- <script>
13
  tailwind.config = {
14
  darkMode: 'class',
15
  theme: {
@@ -48,8 +48,7 @@
48
  <body class="bg-gray-50 dark:bg-gray-900 min-h-screen transition-colors duration-200">
49
  <custom-navbar></custom-navbar>
50
  <script src="components/navbar.js"></script>
51
-
52
- <main class="container mx-auto px-4 py-8">
53
  <div class="flex flex-col md:flex-row gap-6">
54
  <!-- Sidebar -->
55
  <custom-sidebar></custom-sidebar>
@@ -185,7 +184,6 @@
185
  </div>
186
  </div>
187
  </main>
188
-
189
  <custom-footer></custom-footer>
190
  <script src="components/footer.js"></script>
191
  <script src="components/sidebar.js"></script>
@@ -195,4 +193,4 @@
195
  </script>
196
  <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
197
  </body>
198
- </html>
 
9
  <script src="https://unpkg.com/feather-icons"></script>
10
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
  <link rel="stylesheet" href="style.css">
12
+ <script>
13
  tailwind.config = {
14
  darkMode: 'class',
15
  theme: {
 
48
  <body class="bg-gray-50 dark:bg-gray-900 min-h-screen transition-colors duration-200">
49
  <custom-navbar></custom-navbar>
50
  <script src="components/navbar.js"></script>
51
+ <main class="container mx-auto px-4 py-8">
 
52
  <div class="flex flex-col md:flex-row gap-6">
53
  <!-- Sidebar -->
54
  <custom-sidebar></custom-sidebar>
 
184
  </div>
185
  </div>
186
  </main>
 
187
  <custom-footer></custom-footer>
188
  <script src="components/footer.js"></script>
189
  <script src="components/sidebar.js"></script>
 
193
  </script>
194
  <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
195
  </body>
196
+ </html>
login.html ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en" class="light">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Login | NodeNest</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
+ <link rel="stylesheet" href="style.css">
12
+ <script>
13
+ tailwind.config = {
14
+ darkMode: 'class',
15
+ theme: {
16
+ extend: {
17
+ colors: {
18
+ primary: {
19
+ 50: '#f0f9ff',
20
+ 100: '#e0f2fe',
21
+ 200: '#bae6fd',
22
+ 300: '#7dd3fc',
23
+ 400: '#38bdf8',
24
+ 500: '#0ea5e9',
25
+ 600: '#0284c7',
26
+ 700: '#0369a1',
27
+ 800: '#075985',
28
+ 900: '#0c4a6e',
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+ </script>
35
+ </head>
36
+ <body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex items-center justify-center transition-colors duration-200">
37
+ <div class="w-full max-w-md p-8 space-y-8 bg-white dark:bg-gray-800 rounded-xl shadow-lg">
38
+ <div class="text-center">
39
+ <div class="mx-auto flex items-center justify-center">
40
+ <i data-feather="box" class="text-primary-500 w-12 h-12"></i>
41
+ <span class="ml-2 text-2xl font-bold text-gray-800 dark:text-white">NodeNest</span>
42
+ </div>
43
+ <h2 class="mt-6 text-3xl font-extrabold text-gray-900 dark:text-white">
44
+ Sign in to your account
45
+ </h2>
46
+ <p class="mt-2 text-sm text-gray-600 dark:text-gray-400">
47
+ Enter your credentials to access the dashboard
48
+ </p>
49
+ </div>
50
+
51
+ <form class="mt-8 space-y-6" action="/login" method="POST">
52
+ <div class="space-y-4">
53
+ <div>
54
+ <label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Email address</label>
55
+ <div class="mt-1 relative">
56
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
57
+ <i data-feather="mail" class="h-5 w-5 text-gray-400"></i>
58
+ </div>
59
+ <input id="email" name="email" type="email" autocomplete="email" required
60
+ class="pl-10 block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white">
61
+ </div>
62
+ </div>
63
+
64
+ <div>
65
+ <label for="password" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Password</label>
66
+ <div class="mt-1 relative">
67
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
68
+ <i data-feather="lock" class="h-5 w-5 text-gray-400"></i>
69
+ </div>
70
+ <input id="password" name="password" type="password" autocomplete="current-password" required
71
+ class="pl-10 block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white">
72
+ </div>
73
+ </div>
74
+ </div>
75
+
76
+ <div class="flex items-center justify-between">
77
+ <div class="flex items-center">
78
+ <input id="remember-me" name="remember-me" type="checkbox"
79
+ class="h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded">
80
+ <label for="remember-me" class="ml-2 block text-sm text-gray-900 dark:text-gray-300">
81
+ Remember me
82
+ </label>
83
+ </div>
84
+
85
+ <div class="text-sm">
86
+ <a href="#" class="font-medium text-primary-600 hover:text-primary-500">
87
+ Forgot your password?
88
+ </a>
89
+ </div>
90
+ </div>
91
+
92
+ <div>
93
+ <button type="submit"
94
+ class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
95
+ Sign in
96
+ </button>
97
+ </div>
98
+ </form>
99
+
100
+ <div class="text-center">
101
+ <p class="text-sm text-gray-600 dark:text-gray-400">
102
+ Don't have an account?
103
+ <a href="#" class="font-medium text-primary-600 hover:text-primary-500">
104
+ Sign up
105
+ </a>
106
+ </p>
107
+ </div>
108
+ </div>
109
+
110
+ <script src="script.js"></script>
111
+ <script>
112
+ feather.replace();
113
+ </script>
114
+ </body>
115
+ </html>