heisprof commited on
Commit
1e389db
·
verified ·
1 Parent(s): f090057

index.html should call the login page first when loaded, then dispaly content in the index page, also add a button to call the documentation.html page once logged on the menu field.

Browse files
Files changed (2) hide show
  1. index.html +19 -6
  2. login.html +3 -2
index.html CHANGED
@@ -1,3 +1,4 @@
 
1
  <!DOCTYPE html>
2
  <html lang="en">
3
  <head>
@@ -61,14 +62,28 @@
61
  <i data-feather="list" class="w-4 h-4"></i>
62
  <span>Events</span>
63
  </a></li>
64
- <li><a href="configuration.html" class="hover:text-primary transition-colors font-medium flex items-center space-x-1">
65
- <i data-feather="settings" class="w-4 h-4"></i>
66
- <span>Configuration</span>
67
  </a></li>
 
 
 
 
68
  </ul>
69
  </nav>
70
  </div>
71
  </header>
 
 
 
 
 
 
 
 
 
 
72
 
73
  <!-- Main Content -->
74
  <main class="container mx-auto px-4 py-8">
@@ -223,8 +238,7 @@
223
  </div>
224
  </div>
225
  </main>
226
-
227
- <!-- Footer -->
228
  <footer class="bg-dark/80 backdrop-blur-md border-t border-slate-700 mt-12">
229
  <div class="container mx-auto px-4 py-6">
230
  <div class="flex flex-col md:flex-row justify-between items-center">
@@ -238,7 +252,6 @@
238
  </div>
239
  </div>
240
  </footer>
241
-
242
  <script>
243
  // Initialize Vanta.js background
244
  VANTA.NET({
 
1
+
2
  <!DOCTYPE html>
3
  <html lang="en">
4
  <head>
 
62
  <i data-feather="list" class="w-4 h-4"></i>
63
  <span>Events</span>
64
  </a></li>
65
+ <li><a href="documentation.html" class="hover:text-primary transition-colors font-medium flex items-center space-x-1">
66
+ <i data-feather="book-open" class="w-4 h-4"></i>
67
+ <span>Documentation</span>
68
  </a></li>
69
+ <li><a href="configuration.html" class="hover:text-primary transition-colors font-medium flex items-center space-x-1">
70
+ <i data-feather="settings" class="w-4 h-4"></i>
71
+ <span>Configuration</span>
72
+ </a></li>
73
  </ul>
74
  </nav>
75
  </div>
76
  </header>
77
+ <!-- Login Check -->
78
+ <div id="loginCheck" class="hidden">
79
+ <script>
80
+ // Check if user is logged in (simple session check)
81
+ const isLoggedIn = localStorage.getItem('isLoggedIn');
82
+ if (!isLoggedIn) {
83
+ window.location.href = 'login.html';
84
+ }
85
+ </script>
86
+ </div>
87
 
88
  <!-- Main Content -->
89
  <main class="container mx-auto px-4 py-8">
 
238
  </div>
239
  </div>
240
  </main>
241
+ <!-- Footer -->
 
242
  <footer class="bg-dark/80 backdrop-blur-md border-t border-slate-700 mt-12">
243
  <div class="container mx-auto px-4 py-6">
244
  <div class="flex flex-col md:flex-row justify-between items-center">
 
252
  </div>
253
  </div>
254
  </footer>
 
255
  <script>
256
  // Initialize Vanta.js background
257
  VANTA.NET({
login.html CHANGED
@@ -91,7 +91,6 @@
91
 
92
  // Initialize feather icons
93
  feather.replace();
94
-
95
  // Login form handler
96
  document.getElementById('loginForm').addEventListener('submit', function(e) {
97
  e.preventDefault();
@@ -100,11 +99,13 @@
100
 
101
  // Simple validation and redirect
102
  if (username && password) {
 
 
103
  // For demo purposes, redirect to dashboard
104
  // In production, this would validate against backend
105
  window.location.href = 'index.html';
106
  }
107
  });
108
- </script>
109
  </body>
110
  </html>
 
91
 
92
  // Initialize feather icons
93
  feather.replace();
 
94
  // Login form handler
95
  document.getElementById('loginForm').addEventListener('submit', function(e) {
96
  e.preventDefault();
 
99
 
100
  // Simple validation and redirect
101
  if (username && password) {
102
+ // Set login flag in localStorage
103
+ localStorage.setItem('isLoggedIn', 'true');
104
  // For demo purposes, redirect to dashboard
105
  // In production, this would validate against backend
106
  window.location.href = 'index.html';
107
  }
108
  });
109
+ </script>
110
  </body>
111
  </html>