labaykalss commited on
Commit
6aa8da5
·
verified ·
1 Parent(s): 2227858

kodu baştan yazsana

Browse files
components/footer.js CHANGED
@@ -263,7 +263,6 @@ class MetroFooter extends HTMLElement {
263
  </footer>
264
  `;
265
 
266
- // Initialize feather icons in shadow DOM
267
  setTimeout(() => {
268
  const icons = this.shadowRoot.querySelectorAll('[data-feather]');
269
  icons.forEach(icon => {
 
263
  </footer>
264
  `;
265
 
 
266
  setTimeout(() => {
267
  const icons = this.shadowRoot.querySelectorAll('[data-feather]');
268
  icons.forEach(icon => {
components/header.js CHANGED
@@ -170,7 +170,6 @@ class MetroHeader extends HTMLElement {
170
  </div>
171
  `;
172
 
173
- // Set current date
174
  const currentDateElement = this.shadowRoot.getElementById('current-date');
175
  if (currentDateElement) {
176
  const now = new Date();
@@ -178,16 +177,13 @@ class MetroHeader extends HTMLElement {
178
  currentDateElement.textContent = now.toLocaleDateString('en-US', options);
179
  }
180
 
181
- // Initialize search functionality
182
  const searchInput = this.shadowRoot.querySelector('.search-input');
183
  if (searchInput) {
184
  searchInput.addEventListener('input', (e) => {
185
- // Add search functionality here
186
  console.log('Searching for:', e.target.value);
187
  });
188
  }
189
 
190
- // Initialize button actions
191
  const notificationBtn = this.shadowRoot.querySelector('.notification');
192
  if (notificationBtn) {
193
  notificationBtn.addEventListener('click', () => {
@@ -195,7 +191,6 @@ class MetroHeader extends HTMLElement {
195
  });
196
  }
197
 
198
- // Initialize feather icons in shadow DOM
199
  setTimeout(() => {
200
  const icons = this.shadowRoot.querySelectorAll('[data-feather]');
201
  icons.forEach(icon => {
 
170
  </div>
171
  `;
172
 
 
173
  const currentDateElement = this.shadowRoot.getElementById('current-date');
174
  if (currentDateElement) {
175
  const now = new Date();
 
177
  currentDateElement.textContent = now.toLocaleDateString('en-US', options);
178
  }
179
 
 
180
  const searchInput = this.shadowRoot.querySelector('.search-input');
181
  if (searchInput) {
182
  searchInput.addEventListener('input', (e) => {
 
183
  console.log('Searching for:', e.target.value);
184
  });
185
  }
186
 
 
187
  const notificationBtn = this.shadowRoot.querySelector('.notification');
188
  if (notificationBtn) {
189
  notificationBtn.addEventListener('click', () => {
 
191
  });
192
  }
193
 
 
194
  setTimeout(() => {
195
  const icons = this.shadowRoot.querySelectorAll('[data-feather]');
196
  icons.forEach(icon => {
components/nav.js CHANGED
@@ -84,6 +84,7 @@ class MetroNav extends HTMLElement {
84
  <span class="text-secondary-400">Pulse</span>
85
  </span>
86
  </a>
 
87
  <!-- Desktop Navigation -->
88
  <div class="hidden md:flex items-center space-x-6">
89
  <a href="/" class="nav-link active">
@@ -102,7 +103,8 @@ class MetroNav extends HTMLElement {
102
  <i data-feather="settings" class="w-4 h-4 mr-2"></i>
103
  Settings
104
  </a>
105
- <!-- User Profile -->
 
106
  <div class="relative">
107
  <button id="user-menu-btn" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-800">
108
  <img src="http://static.photos/people/200x200/3" alt="Profile" class="w-8 h-8 rounded-full">
@@ -110,7 +112,6 @@ class MetroNav extends HTMLElement {
110
  <i data-feather="chevron-down" class="w-4 h-4"></i>
111
  </button>
112
 
113
- <!-- Dropdown Menu -->
114
  <!-- Dropdown Menu -->
115
  <div id="user-menu" class="hidden absolute right-0 mt-2 w-48 bg-gray-800 rounded-lg shadow-lg border border-gray-700 py-1">
116
  <a href="/profile.html" class="flex items-center px-4 py-2 text-sm hover:bg-gray-700">
@@ -126,7 +127,7 @@ class MetroNav extends HTMLElement {
126
  <i data-feather="log-out" class="w-4 h-4 mr-3"></i>
127
  Logout
128
  </a>
129
- </div>
130
  </div>
131
  </div>
132
 
@@ -135,32 +136,32 @@ class MetroNav extends HTMLElement {
135
  <i data-feather="menu" class="w-6 h-6"></i>
136
  </button>
137
  </div>
138
- <!-- Mobile Navigation -->
139
- <div id="mobile-menu" class="hidden md:hidden mt-4 mobile-menu rounded-lg p-4" data-mobile-menu>
140
- <div class="space-y-2">
141
- <a href="/" class="flex items-center p-3 rounded-lg hover:bg-gray-800">
142
- <i data-feather="home" class="w-5 h-5 mr-3"></i>
143
- Dashboard
144
- </a>
145
- <a href="/analytics.html" class="flex items-center p-3 rounded-lg hover:bg-gray-800">
146
- <i data-feather="pie-chart" class="w-5 h-5 mr-3"></i>
147
- Analytics
148
- </a>
149
- <a href="/users.html" class="flex items-center p-3 rounded-lg hover:bg-gray-800">
150
- <i data-feather="users" class="w-5 h-5 mr-3"></i>
151
- Users
152
- </a>
153
- <a href="/settings.html" class="flex items-center p-3 rounded-lg hover:bg-gray-800">
154
- <i data-feather="settings" class="w-5 h-5 mr-3"></i>
155
- Settings
156
- </a>
157
- </div>
158
- </div>
 
159
  </div>
160
  </nav>
161
  `;
162
 
163
- // Initialize dropdown functionality
164
  const userMenuBtn = this.shadowRoot.getElementById('user-menu-btn');
165
  const userMenu = this.shadowRoot.getElementById('user-menu');
166
 
@@ -170,13 +171,20 @@ class MetroNav extends HTMLElement {
170
  userMenu.classList.toggle('hidden');
171
  });
172
 
173
- // Close dropdown when clicking outside
174
  document.addEventListener('click', () => {
175
  userMenu.classList.add('hidden');
176
  });
177
  }
178
 
179
- // Initialize feather icons in shadow DOM
 
 
 
 
 
 
 
 
180
  setTimeout(() => {
181
  const icons = this.shadowRoot.querySelectorAll('[data-feather]');
182
  icons.forEach(icon => {
 
84
  <span class="text-secondary-400">Pulse</span>
85
  </span>
86
  </a>
87
+
88
  <!-- Desktop Navigation -->
89
  <div class="hidden md:flex items-center space-x-6">
90
  <a href="/" class="nav-link active">
 
103
  <i data-feather="settings" class="w-4 h-4 mr-2"></i>
104
  Settings
105
  </a>
106
+
107
+ <!-- User Profile -->
108
  <div class="relative">
109
  <button id="user-menu-btn" class="flex items-center space-x-2 p-2 rounded-lg hover:bg-gray-800">
110
  <img src="http://static.photos/people/200x200/3" alt="Profile" class="w-8 h-8 rounded-full">
 
112
  <i data-feather="chevron-down" class="w-4 h-4"></i>
113
  </button>
114
 
 
115
  <!-- Dropdown Menu -->
116
  <div id="user-menu" class="hidden absolute right-0 mt-2 w-48 bg-gray-800 rounded-lg shadow-lg border border-gray-700 py-1">
117
  <a href="/profile.html" class="flex items-center px-4 py-2 text-sm hover:bg-gray-700">
 
127
  <i data-feather="log-out" class="w-4 h-4 mr-3"></i>
128
  Logout
129
  </a>
130
+ </div>
131
  </div>
132
  </div>
133
 
 
136
  <i data-feather="menu" class="w-6 h-6"></i>
137
  </button>
138
  </div>
139
+
140
+ <!-- Mobile Navigation -->
141
+ <div id="mobile-menu" class="hidden md:hidden mt-4 mobile-menu rounded-lg p-4" data-mobile-menu>
142
+ <div class="space-y-2">
143
+ <a href="/" class="flex items-center p-3 rounded-lg hover:bg-gray-800">
144
+ <i data-feather="home" class="w-5 h-5 mr-3"></i>
145
+ Dashboard
146
+ </a>
147
+ <a href="/analytics.html" class="flex items-center p-3 rounded-lg hover:bg-gray-800">
148
+ <i data-feather="pie-chart" class="w-5 h-5 mr-3"></i>
149
+ Analytics
150
+ </a>
151
+ <a href="/users.html" class="flex items-center p-3 rounded-lg hover:bg-gray-800">
152
+ <i data-feather="users" class="w-5 h-5 mr-3"></i>
153
+ Users
154
+ </a>
155
+ <a href="/settings.html" class="flex items-center p-3 rounded-lg hover:bg-gray-800">
156
+ <i data-feather="settings" class="w-5 h-5 mr-3"></i>
157
+ Settings
158
+ </a>
159
+ </div>
160
+ </div>
161
  </div>
162
  </nav>
163
  `;
164
 
 
165
  const userMenuBtn = this.shadowRoot.getElementById('user-menu-btn');
166
  const userMenu = this.shadowRoot.getElementById('user-menu');
167
 
 
171
  userMenu.classList.toggle('hidden');
172
  });
173
 
 
174
  document.addEventListener('click', () => {
175
  userMenu.classList.add('hidden');
176
  });
177
  }
178
 
179
+ const mobileMenuBtn = this.shadowRoot.getElementById('mobile-menu-btn');
180
+ const mobileMenu = this.shadowRoot.getElementById('mobile-menu');
181
+
182
+ if (mobileMenuBtn && mobileMenu) {
183
+ mobileMenuBtn.addEventListener('click', () => {
184
+ mobileMenu.classList.toggle('hidden');
185
+ });
186
+ }
187
+
188
  setTimeout(() => {
189
  const icons = this.shadowRoot.querySelectorAll('[data-feather]');
190
  icons.forEach(icon => {
components/sidebar.js CHANGED
@@ -7,11 +7,13 @@ class MetroSidebar extends HTMLElement {
7
  display: none;
8
  width: 280px;
9
  }
 
10
  @media (min-width: 768px) {
11
  :host {
12
  display: block;
13
  }
14
  }
 
15
  aside {
16
  height: calc(100vh - 73px);
17
  position: sticky;
@@ -20,9 +22,11 @@ class MetroSidebar extends HTMLElement {
20
  border-right: 1px solid rgba(255, 255, 255, 0.05);
21
  overflow-y: auto;
22
  }
 
23
  .sidebar-section {
24
  padding: 2rem;
25
  }
 
26
  .nav-item {
27
  display: flex;
28
  align-items: center;
@@ -33,21 +37,25 @@ class MetroSidebar extends HTMLElement {
33
  transition: all 0.2s;
34
  text-decoration: none;
35
  }
 
36
  .nav-item:hover {
37
  background: rgba(255, 255, 255, 0.05);
38
  color: #ffffff;
39
  transform: translateX(4px);
40
  }
 
41
  .nav-item.active {
42
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(217, 70, 239, 0.1) 100%);
43
  color: #0ea5e9;
44
  border-left: 3px solid #0ea5e9;
45
  }
 
46
  .nav-item i {
47
  margin-right: 0.75rem;
48
  width: 18px;
49
  height: 18px;
50
  }
 
51
  .section-title {
52
  color: #6b7280;
53
  font-size: 0.75rem;
@@ -57,6 +65,7 @@ class MetroSidebar extends HTMLElement {
57
  margin-top: 1.5rem;
58
  margin-bottom: 0.75rem;
59
  }
 
60
  .badge {
61
  margin-left: auto;
62
  background: rgba(217, 70, 239, 0.2);
@@ -65,7 +74,7 @@ class MetroSidebar extends HTMLElement {
65
  padding: 0.125rem 0.5rem;
66
  border-radius: 9999px;
67
  }
68
- /* Scrollbar styling for sidebar */
69
  aside::-webkit-scrollbar {
70
  width: 4px;
71
  }
@@ -74,7 +83,8 @@ class MetroSidebar extends HTMLElement {
74
  background: #4b5563;
75
  border-radius: 2px;
76
  }
77
- </style>
 
78
  <aside>
79
  <div class="sidebar-section">
80
  <!-- Main Navigation -->
@@ -157,15 +167,15 @@ class MetroSidebar extends HTMLElement {
157
  </div>
158
  </div>
159
  </aside>
160
- `;
161
- // Initialize feather icons in shadow DOM
162
  setTimeout(() => {
163
  const icons = this.shadowRoot.querySelectorAll('[data-feather]');
164
  icons.forEach(icon => {
165
  feather.replace();
166
  });
167
  }, 100);
168
- }
169
  }
170
 
171
  customElements.define('metro-sidebar', MetroSidebar);
 
7
  display: none;
8
  width: 280px;
9
  }
10
+
11
  @media (min-width: 768px) {
12
  :host {
13
  display: block;
14
  }
15
  }
16
+
17
  aside {
18
  height: calc(100vh - 73px);
19
  position: sticky;
 
22
  border-right: 1px solid rgba(255, 255, 255, 0.05);
23
  overflow-y: auto;
24
  }
25
+
26
  .sidebar-section {
27
  padding: 2rem;
28
  }
29
+
30
  .nav-item {
31
  display: flex;
32
  align-items: center;
 
37
  transition: all 0.2s;
38
  text-decoration: none;
39
  }
40
+
41
  .nav-item:hover {
42
  background: rgba(255, 255, 255, 0.05);
43
  color: #ffffff;
44
  transform: translateX(4px);
45
  }
46
+
47
  .nav-item.active {
48
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(217, 70, 239, 0.1) 100%);
49
  color: #0ea5e9;
50
  border-left: 3px solid #0ea5e9;
51
  }
52
+
53
  .nav-item i {
54
  margin-right: 0.75rem;
55
  width: 18px;
56
  height: 18px;
57
  }
58
+
59
  .section-title {
60
  color: #6b7280;
61
  font-size: 0.75rem;
 
65
  margin-top: 1.5rem;
66
  margin-bottom: 0.75rem;
67
  }
68
+
69
  .badge {
70
  margin-left: auto;
71
  background: rgba(217, 70, 239, 0.2);
 
74
  padding: 0.125rem 0.5rem;
75
  border-radius: 9999px;
76
  }
77
+
78
  aside::-webkit-scrollbar {
79
  width: 4px;
80
  }
 
83
  background: #4b5563;
84
  border-radius: 2px;
85
  }
86
+ </style>
87
+
88
  <aside>
89
  <div class="sidebar-section">
90
  <!-- Main Navigation -->
 
167
  </div>
168
  </div>
169
  </aside>
170
+ `;
171
+
172
  setTimeout(() => {
173
  const icons = this.shadowRoot.querySelectorAll('[data-feather]');
174
  icons.forEach(icon => {
175
  feather.replace();
176
  });
177
  }, 100);
178
+ }
179
  }
180
 
181
  customElements.define('metro-sidebar', MetroSidebar);
index.html CHANGED
@@ -8,7 +8,7 @@
8
  <link rel="stylesheet" href="style.css">
9
  <script src="https://cdn.tailwindcss.com"></script>
10
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
- <script>
12
  tailwind.config = {
13
  darkMode: 'class',
14
  theme: {
@@ -54,7 +54,7 @@
54
 
55
  <!-- Main Content -->
56
  <main class="flex-1 p-6 md:p-8 lg:p-10 ml-0 md:ml-280px">
57
- <div class="max-w-7xl mx-auto">
58
  <!-- Header -->
59
  <metro-header></metro-header>
60
 
@@ -115,6 +115,7 @@
115
  </div>
116
  </div>
117
  </section>
 
118
  <!-- Charts & Tables -->
119
  <section class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-10">
120
  <!-- Chart -->
@@ -169,6 +170,7 @@
169
  </div>
170
  </div>
171
  </section>
 
172
  <!-- User List -->
173
  <section class="metro-card bg-gradient-to-br from-gray-800 to-gray-900 p-6 rounded-xl">
174
  <h3 class="text-xl font-bold mb-6">Recent Users</h3>
@@ -227,11 +229,12 @@
227
  </table>
228
  </div>
229
  </section>
230
- </div>
231
  </main>
232
  </div>
233
  <!-- Footer -->
234
  <metro-footer></metro-footer>
 
235
  <!-- Load Components -->
236
  <script src="components/nav.js"></script>
237
  <script src="components/sidebar.js"></script>
@@ -243,6 +246,6 @@
243
  <script>
244
  feather.replace();
245
  </script>
246
- <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
247
  </body>
248
- </html>
 
8
  <link rel="stylesheet" href="style.css">
9
  <script src="https://cdn.tailwindcss.com"></script>
10
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
+ <script>
12
  tailwind.config = {
13
  darkMode: 'class',
14
  theme: {
 
54
 
55
  <!-- Main Content -->
56
  <main class="flex-1 p-6 md:p-8 lg:p-10 ml-0 md:ml-280px">
57
+ <div class="max-w-7xl mx-auto">
58
  <!-- Header -->
59
  <metro-header></metro-header>
60
 
 
115
  </div>
116
  </div>
117
  </section>
118
+
119
  <!-- Charts & Tables -->
120
  <section class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-10">
121
  <!-- Chart -->
 
170
  </div>
171
  </div>
172
  </section>
173
+
174
  <!-- User List -->
175
  <section class="metro-card bg-gradient-to-br from-gray-800 to-gray-900 p-6 rounded-xl">
176
  <h3 class="text-xl font-bold mb-6">Recent Users</h3>
 
229
  </table>
230
  </div>
231
  </section>
232
+ </div>
233
  </main>
234
  </div>
235
  <!-- Footer -->
236
  <metro-footer></metro-footer>
237
+
238
  <!-- Load Components -->
239
  <script src="components/nav.js"></script>
240
  <script src="components/sidebar.js"></script>
 
246
  <script>
247
  feather.replace();
248
  </script>
249
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
250
  </body>
251
+ </html>
script.js CHANGED
@@ -1,26 +1,12 @@
1
- // MetroPulse Dashboard - Main JavaScript
2
-
3
  document.addEventListener('DOMContentLoaded', function() {
4
- // Initialize theme toggle
5
  initThemeToggle();
6
-
7
- // Initialize feather icons
8
  feather.replace();
9
-
10
- // Initialize tooltips
11
  initTooltips();
12
-
13
- // Load sample data for charts (mock)
14
  loadMockData();
15
-
16
- // Initialize mobile menu toggle
17
  initMobileMenu();
18
-
19
- // Add smooth scrolling for anchor links
20
  initSmoothScrolling();
21
  });
22
 
23
- // Theme toggle functionality
24
  function initThemeToggle() {
25
  const themeToggle = document.createElement('button');
26
  themeToggle.className = 'metro-btn flex items-center space-x-2';
@@ -39,11 +25,8 @@ function initThemeToggle() {
39
  }
40
  feather.replace();
41
  });
42
-
43
- // You can add this button to your header component
44
  }
45
 
46
- // Tooltips initialization
47
  function initTooltips() {
48
  const tooltipElements = document.querySelectorAll('[data-tooltip]');
49
 
@@ -71,14 +54,10 @@ function initTooltips() {
71
  });
72
  }
73
 
74
- // Mock data loading for demo purposes
75
  function loadMockData() {
76
  console.log('Loading mock data for MetroPulse dashboard...');
77
 
78
- // Simulate API call
79
  setTimeout(() => {
80
- // This is where you would typically fetch real data
81
- // For now, we'll just log and update some elements
82
  const stats = {
83
  users: '12,847',
84
  revenue: '$84,520',
@@ -86,7 +65,6 @@ function loadMockData() {
86
  responseTime: '124ms'
87
  };
88
 
89
- // Update stats if needed
90
  document.querySelectorAll('.stat-value').forEach((el, index) => {
91
  const values = Object.values(stats);
92
  if (index < values.length) {
@@ -96,7 +74,6 @@ function loadMockData() {
96
  }, 1000);
97
  }
98
 
99
- // Mobile menu functionality
100
  function initMobileMenu() {
101
  const mobileMenuBtn = document.querySelector('[data-mobile-menu-toggle]');
102
  const mobileMenu = document.querySelector('[data-mobile-menu]');
@@ -109,7 +86,6 @@ function initMobileMenu() {
109
  );
110
  });
111
 
112
- // Close menu when clicking outside
113
  document.addEventListener('click', function(e) {
114
  if (!mobileMenu.contains(e.target) && !mobileMenuBtn.contains(e.target)) {
115
  mobileMenu.classList.add('hidden');
@@ -119,7 +95,6 @@ function initMobileMenu() {
119
  }
120
  }
121
 
122
- // Smooth scrolling for anchor links
123
  function initSmoothScrolling() {
124
  document.querySelectorAll('a[href^="#"]').forEach(anchor => {
125
  anchor.addEventListener('click', function (e) {
@@ -138,7 +113,6 @@ function initSmoothScrolling() {
138
  });
139
  }
140
 
141
- // Notification system
142
  function showNotification(message, type = 'info') {
143
  const notification = document.createElement('div');
144
  const colors = {
@@ -152,25 +126,21 @@ function showNotification(message, type = 'info') {
152
  notification.textContent = message;
153
  document.body.appendChild(notification);
154
 
155
- // Animate in
156
  setTimeout(() => {
157
  notification.classList.remove('translate-x-full', 'opacity-0');
158
  notification.classList.add('translate-x-0', 'opacity-100');
159
  }, 10);
160
 
161
- // Animate out after 5 seconds
162
  setTimeout(() => {
163
  notification.classList.remove('translate-x-0', 'opacity-100');
164
  notification.classList.add('translate-x-full', 'opacity-0');
165
 
166
- // Remove from DOM after animation
167
  setTimeout(() => {
168
  notification.remove();
169
  }, 300);
170
  }, 5000);
171
  }
172
 
173
- // Export functions for use in components if needed
174
  window.MetroPulse = {
175
  showNotification,
176
  initThemeToggle,
 
 
 
1
  document.addEventListener('DOMContentLoaded', function() {
 
2
  initThemeToggle();
 
 
3
  feather.replace();
 
 
4
  initTooltips();
 
 
5
  loadMockData();
 
 
6
  initMobileMenu();
 
 
7
  initSmoothScrolling();
8
  });
9
 
 
10
  function initThemeToggle() {
11
  const themeToggle = document.createElement('button');
12
  themeToggle.className = 'metro-btn flex items-center space-x-2';
 
25
  }
26
  feather.replace();
27
  });
 
 
28
  }
29
 
 
30
  function initTooltips() {
31
  const tooltipElements = document.querySelectorAll('[data-tooltip]');
32
 
 
54
  });
55
  }
56
 
 
57
  function loadMockData() {
58
  console.log('Loading mock data for MetroPulse dashboard...');
59
 
 
60
  setTimeout(() => {
 
 
61
  const stats = {
62
  users: '12,847',
63
  revenue: '$84,520',
 
65
  responseTime: '124ms'
66
  };
67
 
 
68
  document.querySelectorAll('.stat-value').forEach((el, index) => {
69
  const values = Object.values(stats);
70
  if (index < values.length) {
 
74
  }, 1000);
75
  }
76
 
 
77
  function initMobileMenu() {
78
  const mobileMenuBtn = document.querySelector('[data-mobile-menu-toggle]');
79
  const mobileMenu = document.querySelector('[data-mobile-menu]');
 
86
  );
87
  });
88
 
 
89
  document.addEventListener('click', function(e) {
90
  if (!mobileMenu.contains(e.target) && !mobileMenuBtn.contains(e.target)) {
91
  mobileMenu.classList.add('hidden');
 
95
  }
96
  }
97
 
 
98
  function initSmoothScrolling() {
99
  document.querySelectorAll('a[href^="#"]').forEach(anchor => {
100
  anchor.addEventListener('click', function (e) {
 
113
  });
114
  }
115
 
 
116
  function showNotification(message, type = 'info') {
117
  const notification = document.createElement('div');
118
  const colors = {
 
126
  notification.textContent = message;
127
  document.body.appendChild(notification);
128
 
 
129
  setTimeout(() => {
130
  notification.classList.remove('translate-x-full', 'opacity-0');
131
  notification.classList.add('translate-x-0', 'opacity-100');
132
  }, 10);
133
 
 
134
  setTimeout(() => {
135
  notification.classList.remove('translate-x-0', 'opacity-100');
136
  notification.classList.add('translate-x-full', 'opacity-0');
137
 
 
138
  setTimeout(() => {
139
  notification.remove();
140
  }, 300);
141
  }, 5000);
142
  }
143
 
 
144
  window.MetroPulse = {
145
  showNotification,
146
  initThemeToggle,
style.css CHANGED
@@ -1,6 +1,3 @@
1
-
2
- /* MetroPulse Dark Theme - Global Styles */
3
-
4
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
5
 
6
  * {
@@ -15,18 +12,15 @@ body {
15
  min-height: 100vh;
16
  }
17
 
18
- /* Smooth transitions */
19
  .metro-card, .metro-btn, .metro-nav-item {
20
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
21
  }
22
 
23
- /* Card hover effects */
24
  .metro-card:hover {
25
  transform: translateY(-2px);
26
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
27
  }
28
 
29
- /* Button styles */
30
  .metro-btn {
31
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
32
  border: none;
@@ -50,7 +44,6 @@ body {
50
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
51
  }
52
 
53
- /* Glow effects */
54
  .glow-primary {
55
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
56
  }
@@ -59,7 +52,6 @@ body {
59
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
60
  }
61
 
62
- /* Custom scrollbar */
63
  ::-webkit-scrollbar {
64
  width: 8px;
65
  height: 8px;
@@ -79,7 +71,6 @@ body {
79
  background: #6b7280;
80
  }
81
 
82
- /* Loading animation */
83
  @keyframes metro-pulse {
84
  0%, 100% {
85
  opacity: 1;
@@ -93,14 +84,12 @@ body {
93
  animation: metro-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
94
  }
95
 
96
- /* Glass effect */
97
  .glass-effect {
98
  background: rgba(30, 41, 59, 0.7);
99
  backdrop-filter: blur(10px);
100
  border: 1px solid rgba(255, 255, 255, 0.1);
101
  }
102
 
103
- /* Gradient text */
104
  .gradient-text {
105
  background: linear-gradient(135deg, #0ea5e9 0%, #d946ef 100%);
106
  -webkit-background-clip: text;
@@ -108,7 +97,6 @@ body {
108
  background-clip: text;
109
  }
110
 
111
- /* Responsive adjustments */
112
  @media (max-width: 768px) {
113
  .metro-card {
114
  padding: 1rem;
@@ -119,13 +107,11 @@ body {
119
  }
120
  }
121
 
122
- /* Dark mode enhancements */
123
  .dark .metro-card {
124
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
125
  border: 1px solid rgba(255, 255, 255, 0.05);
126
  }
127
 
128
- /* Animation classes */
129
  .fade-in {
130
  animation: fadeIn 0.5s ease-in-out;
131
  }
@@ -139,4 +125,4 @@ body {
139
  opacity: 1;
140
  transform: translateY(0);
141
  }
142
- }
 
 
 
 
1
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
2
 
3
  * {
 
12
  min-height: 100vh;
13
  }
14
 
 
15
  .metro-card, .metro-btn, .metro-nav-item {
16
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
17
  }
18
 
 
19
  .metro-card:hover {
20
  transform: translateY(-2px);
21
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
22
  }
23
 
 
24
  .metro-btn {
25
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
26
  border: none;
 
44
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
45
  }
46
 
 
47
  .glow-primary {
48
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
49
  }
 
52
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
53
  }
54
 
 
55
  ::-webkit-scrollbar {
56
  width: 8px;
57
  height: 8px;
 
71
  background: #6b7280;
72
  }
73
 
 
74
  @keyframes metro-pulse {
75
  0%, 100% {
76
  opacity: 1;
 
84
  animation: metro-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
85
  }
86
 
 
87
  .glass-effect {
88
  background: rgba(30, 41, 59, 0.7);
89
  backdrop-filter: blur(10px);
90
  border: 1px solid rgba(255, 255, 255, 0.1);
91
  }
92
 
 
93
  .gradient-text {
94
  background: linear-gradient(135deg, #0ea5e9 0%, #d946ef 100%);
95
  -webkit-background-clip: text;
 
97
  background-clip: text;
98
  }
99
 
 
100
  @media (max-width: 768px) {
101
  .metro-card {
102
  padding: 1rem;
 
107
  }
108
  }
109
 
 
110
  .dark .metro-card {
111
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
112
  border: 1px solid rgba(255, 255, 255, 0.05);
113
  }
114
 
 
115
  .fade-in {
116
  animation: fadeIn 0.5s ease-in-out;
117
  }
 
125
  opacity: 1;
126
  transform: translateY(0);
127
  }
128
+ }