Spaces:
Running
Running
Add 1 files
Browse files- index.html +208 -227
index.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>Page
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
<style>
|
@@ -13,275 +13,256 @@
|
|
13 |
to { opacity: 1; transform: translateY(0); }
|
14 |
}
|
15 |
|
16 |
-
.
|
17 |
animation: fadeIn 0.5s ease-out forwards;
|
18 |
}
|
19 |
|
20 |
-
|
21 |
-
.
|
22 |
-
|
23 |
-
|
24 |
-
/* Custom hover effect for cards */
|
25 |
-
.card-hover {
|
26 |
-
transition: all 0.3s ease;
|
27 |
-
}
|
28 |
-
|
29 |
-
.card-hover:hover {
|
30 |
-
transform: translateY(-5px);
|
31 |
-
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
|
32 |
}
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
40 |
}
|
41 |
</style>
|
42 |
</head>
|
43 |
-
<body class="bg-
|
44 |
<!-- Navigation -->
|
45 |
-
<nav class="bg-white shadow-lg sticky top-0 z-
|
46 |
-
<div class="
|
47 |
-
<div class="flex justify-between">
|
48 |
-
<div class="flex
|
49 |
-
<
|
50 |
-
|
51 |
-
<a href="index.html" class="flex items-center py-4 px-2">
|
52 |
-
<i class="fas fa-rocket text-indigo-600 text-2xl mr-2"></i>
|
53 |
-
<span class="font-semibold text-gray-900 text-lg">MultiNav</span>
|
54 |
-
</a>
|
55 |
-
</div>
|
56 |
</div>
|
57 |
-
|
58 |
-
<div class="hidden md:flex
|
59 |
-
<a href="
|
60 |
-
<a href="
|
61 |
-
<a href="
|
62 |
-
<a href="page4.html" class="py-4 px-2 text-gray-500 hover:text-indigo-600 transition duration-300">Page 4</a>
|
63 |
-
</div>
|
64 |
-
<!-- Mobile button -->
|
65 |
-
<div class="md:hidden flex items-center">
|
66 |
-
<button class="outline-none mobile-menu-button">
|
67 |
-
<svg class="w-6 h-6 text-gray-500 hover:text-indigo-600"
|
68 |
-
fill="none"
|
69 |
-
stroke-linecap="round"
|
70 |
-
stroke-linejoin="round"
|
71 |
-
stroke-width="2"
|
72 |
-
viewBox="0 0 24 24"
|
73 |
-
stroke="currentColor">
|
74 |
-
<path d="M4 6h16M4 12h16M4 18h16"></path>
|
75 |
-
</svg>
|
76 |
-
</button>
|
77 |
</div>
|
|
|
|
|
|
|
|
|
78 |
</div>
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
<
|
84 |
-
<
|
85 |
-
<li><a href="page2.html" class="block text-sm px-2 py-4 hover:bg-indigo-500 hover:text-white transition duration-300">Page 2</a></li>
|
86 |
-
<li><a href="page4.html" class="block text-sm px-2 py-4 hover:bg-indigo-500 hover:text-white transition duration-300">Page 4</a></li>
|
87 |
-
</ul>
|
88 |
-
</div>
|
89 |
-
</nav>
|
90 |
-
|
91 |
-
<!-- Hero Section -->
|
92 |
-
<section class="py-16">
|
93 |
-
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
|
94 |
-
<div class="text-center fade-in">
|
95 |
-
<span class="text-indigo-600 font-semibold uppercase tracking-wide">Welcome to</span>
|
96 |
-
<h1 class="text-4xl md:text-5xl font-bold text-gray-900 mt-2 mb-4">Initial <span class="gradient-text">Page</span></h1>
|
97 |
-
<p class="text-lg text-gray-600 max-w-2xl mx-auto">
|
98 |
-
This is the starting point of your navigation journey. Explore what makes Page 1 special.
|
99 |
-
</p>
|
100 |
</div>
|
101 |
</div>
|
102 |
-
</
|
103 |
|
104 |
-
<!-- Content
|
105 |
-
<
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
<
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
</
|
116 |
-
<
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
</div>
|
122 |
</div>
|
123 |
</div>
|
124 |
</div>
|
125 |
-
</section>
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
<i class="fas fa-lightbulb text-xl"></i>
|
137 |
</div>
|
138 |
-
<
|
139 |
-
|
140 |
-
Experience our carefully crafted UI that balances aesthetics with functionality.
|
141 |
-
</p>
|
142 |
-
</div>
|
143 |
-
</div>
|
144 |
-
|
145 |
-
<!-- Feature 2 -->
|
146 |
-
<div class="bg-white rounded-xl shadow-md overflow-hidden card-hover fade-in delay-2">
|
147 |
-
<div class="p-8">
|
148 |
-
<div class="flex items-center justify-center w-12 h-12 mb-4 rounded-full bg-indigo-100 text-indigo-600">
|
149 |
-
<i class="fas fa-bolt text-xl"></i>
|
150 |
</div>
|
151 |
-
<
|
152 |
-
<
|
153 |
-
|
154 |
-
</
|
155 |
</div>
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
163 |
</div>
|
164 |
-
<h3 class="text-xl font-semibold text-gray-900 mb-2">Responsive Layout</h3>
|
165 |
-
<p class="text-gray-600">
|
166 |
-
Works flawlessly on all devices from desktop to mobile.
|
167 |
-
</p>
|
168 |
</div>
|
169 |
</div>
|
170 |
</div>
|
171 |
-
</section>
|
172 |
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
<
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
</div>
|
190 |
</div>
|
191 |
-
</
|
192 |
|
193 |
<!-- Footer -->
|
194 |
-
<footer class="bg-gray-
|
195 |
-
<div class="
|
196 |
-
<div class="
|
197 |
-
<div>
|
198 |
-
<h3 class="text-xl font-bold mb-
|
199 |
-
<p class="text-gray-400">
|
200 |
-
A beautifully designed navigation system connecting multiple pages with smooth transitions.
|
201 |
-
</p>
|
202 |
-
</div>
|
203 |
-
<div>
|
204 |
-
<h4 class="text-lg font-semibold mb-4">Quick Links</h4>
|
205 |
-
<ul class="space-y-2">
|
206 |
-
<li><a href="index.html" class="text-gray-400 hover:text-white transition">Home</a></li>
|
207 |
-
<li><a href="page1.html" class="text-white font-medium">Initial Page</a></li>
|
208 |
-
<li><a href="page2.html" class="text-gray-400 hover:text-white transition">Page 2</a></li>
|
209 |
-
<li><a href="page4.html" class="text-gray-400 hover:text-white transition">Page 4</a></li>
|
210 |
-
</ul>
|
211 |
</div>
|
212 |
-
<div>
|
213 |
-
<
|
214 |
-
<
|
215 |
-
|
216 |
-
<li><a href="#" class="text-gray-400 hover:text-white transition">Tutorials</a></li>
|
217 |
-
<li><a href="#" class="text-gray-400 hover:text-white transition">Blog</a></li>
|
218 |
-
</ul>
|
219 |
-
</div>
|
220 |
-
<div>
|
221 |
-
<h4 class="text-lg font-semibold mb-4">Connect</h4>
|
222 |
-
<div class="flex space-x-4">
|
223 |
-
<a href="#" class="text-gray-400 hover:text-white transition">
|
224 |
-
<i class="fab fa-twitter text-xl"></i>
|
225 |
-
</a>
|
226 |
-
<a href="#" class="text-gray-400 hover:text-white transition">
|
227 |
-
<i class="fab fa-facebook text-xl"></i>
|
228 |
-
</a>
|
229 |
-
<a href="#" class="text-gray-400 hover:text-white transition">
|
230 |
-
<i class="fab fa-instagram text-xl"></i>
|
231 |
-
</a>
|
232 |
-
<a href="#" class="text-gray-400 hover:text-white transition">
|
233 |
-
<i class="fab fa-github text-xl"></i>
|
234 |
-
</a>
|
235 |
-
</div>
|
236 |
</div>
|
237 |
</div>
|
238 |
-
<div class="border-t border-gray-
|
239 |
-
<p>© 2023
|
240 |
</div>
|
241 |
</div>
|
242 |
</footer>
|
243 |
|
244 |
<script>
|
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 |
</script>
|
286 |
-
|
287 |
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Multi-Page Website</title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
<style>
|
|
|
13 |
to { opacity: 1; transform: translateY(0); }
|
14 |
}
|
15 |
|
16 |
+
.page-transition {
|
17 |
animation: fadeIn 0.5s ease-out forwards;
|
18 |
}
|
19 |
|
20 |
+
/* Custom active nav link style */
|
21 |
+
.nav-link.active {
|
22 |
+
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
|
25 |
+
.nav-link.active::after {
|
26 |
+
content: '';
|
27 |
+
position: absolute;
|
28 |
+
bottom: -5px;
|
29 |
+
left: 0;
|
30 |
+
width: 100%;
|
31 |
+
height: 2px;
|
32 |
+
background-color: #3b82f6;
|
33 |
+
border-radius: 2px;
|
34 |
}
|
35 |
</style>
|
36 |
</head>
|
37 |
+
<body class="bg-gray-50 min-h-screen flex flex-col">
|
38 |
<!-- Navigation -->
|
39 |
+
<nav class="bg-white shadow-lg sticky top-0 z-10">
|
40 |
+
<div class="container mx-auto px-4 py-3">
|
41 |
+
<div class="flex justify-between items-center">
|
42 |
+
<div class="text-2xl font-bold text-blue-600 flex items-center">
|
43 |
+
<i class="fas fa-globe mr-2"></i>
|
44 |
+
<span>MultiPage</span>
|
|
|
|
|
|
|
|
|
|
|
45 |
</div>
|
46 |
+
|
47 |
+
<div class="hidden md:flex space-x-6">
|
48 |
+
<a href="#" class="nav-link active text-blue-600 font-medium" data-page="page1">Initial Page</a>
|
49 |
+
<a href="#" class="nav-link text-gray-600 hover:text-blue-600 transition font-medium" data-page="page2">Second Page</a>
|
50 |
+
<a href="#" class="nav-link text-gray-600 hover:text-blue-600 transition font-medium" data-page="page3">Third Page</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
</div>
|
52 |
+
|
53 |
+
<button class="md:hidden text-gray-600 focus:outline-none" id="mobile-menu-button">
|
54 |
+
<i class="fas fa-bars text-2xl"></i>
|
55 |
+
</button>
|
56 |
</div>
|
57 |
+
|
58 |
+
<!-- Mobile menu -->
|
59 |
+
<div class="md:hidden hidden py-2" id="mobile-menu">
|
60 |
+
<a href="#" class="block nav-link active text-blue-600 py-2 px-4" data-page="page1">Initial Page</a>
|
61 |
+
<a href="#" class="block nav-link text-gray-600 hover:text-blue-600 py-2 px-4" data-page="page2">Second Page</a>
|
62 |
+
<a href="#" class="block nav-link text-gray-600 hover:text-blue-600 py-2 px-4" data-page="page3">Third Page</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
</div>
|
64 |
</div>
|
65 |
+
</nav>
|
66 |
|
67 |
+
<!-- Page Content -->
|
68 |
+
<main class="flex-grow container mx-auto px-4 py-8">
|
69 |
+
<!-- Page 1 (Initial Page) - Default visible -->
|
70 |
+
<div id="page1" class="page-content page-transition">
|
71 |
+
<div class="max-w-3xl mx-auto text-center">
|
72 |
+
<h1 class="text-4xl md:text-5xl font-bold text-gray-800 mb-6">Initial Page</h1>
|
73 |
+
<p class="text-xl text-gray-600 mb-8">Welcome to the first page of our multi-page application.</p>
|
74 |
+
<div class="bg-white rounded-xl shadow-md p-6 mb-8">
|
75 |
+
<div class="flex items-center justify-center mb-4">
|
76 |
+
<i class="fas fa-star text-yellow-400 text-4xl mr-3"></i>
|
77 |
+
<h2 class="text-2xl font-semibold text-gray-700">Featured Content</h2>
|
78 |
+
</div>
|
79 |
+
<p class="text-gray-600 mb-4">This is a demonstration of a multi-page application using a single HTML file with JavaScript-powered navigation.</p>
|
80 |
+
<button class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-6 rounded-lg transition">
|
81 |
+
Learn More
|
82 |
+
</button>
|
83 |
+
</div>
|
84 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
85 |
+
<div class="bg-white p-6 rounded-lg shadow hover:shadow-md transition">
|
86 |
+
<i class="fas fa-rocket text-blue-500 text-3xl mb-4"></i>
|
87 |
+
<h3 class="text-xl font-semibold mb-2">Fast Navigation</h3>
|
88 |
+
<p class="text-gray-600">Instant page switching without full reloads.</p>
|
89 |
+
</div>
|
90 |
+
<div class="bg-white p-6 rounded-lg shadow hover:shadow-md transition">
|
91 |
+
<i class="fas fa-mobile-alt text-green-500 text-3xl mb-4"></i>
|
92 |
+
<h3 class="text-xl font-semibold mb-2">Responsive Design</h3>
|
93 |
+
<p class="text-gray-600">Works perfectly on all device sizes.</p>
|
94 |
+
</div>
|
95 |
+
<div class="bg-white p-6 rounded-lg shadow hover:shadow-md transition">
|
96 |
+
<i class="fas fa-paint-brush text-purple-500 text-3xl mb-4"></i>
|
97 |
+
<h3 class="text-xl font-semibold mb-2">Beautiful UI</h3>
|
98 |
+
<p class="text-gray-600">Modern design with smooth animations.</p>
|
99 |
</div>
|
100 |
</div>
|
101 |
</div>
|
102 |
</div>
|
|
|
103 |
|
104 |
+
<!-- Page 2 (Second Page) - Hidden by default -->
|
105 |
+
<div id="page2" class="page-content hidden">
|
106 |
+
<div class="max-w-3xl mx-auto text-center">
|
107 |
+
<h1 class="text-4xl md:text-5xl font-bold text-gray-800 mb-6">Second Page</h1>
|
108 |
+
<p class="text-xl text-gray-600 mb-8">You've reached the second page of our application.</p>
|
109 |
+
<div class="bg-white rounded-xl shadow-md p-6 mb-8">
|
110 |
+
<div class="flex items-center justify-center mb-4">
|
111 |
+
<i class="fas fa-chart-line text-green-500 text-4xl mr-3"></i>
|
112 |
+
<h2 class="text-2xl font-semibold text-gray-700">Performance Metrics</h2>
|
|
|
113 |
</div>
|
114 |
+
<div class="w-full bg-gray-200 rounded-full h-4 mb-4">
|
115 |
+
<div class="bg-green-500 h-4 rounded-full" style="width: 75%"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
</div>
|
117 |
+
<p class="text-gray-600 mb-4">Our system is running at optimal performance levels.</p>
|
118 |
+
<button class="bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-6 rounded-lg transition">
|
119 |
+
View Stats
|
120 |
+
</button>
|
121 |
</div>
|
122 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
123 |
+
<div class="bg-white p-6 rounded-lg shadow hover:shadow-md transition">
|
124 |
+
<i class="fas fa-cogs text-orange-500 text-3xl mb-4"></i>
|
125 |
+
<h3 class="text-xl font-semibold mb-2">Advanced Settings</h3>
|
126 |
+
<p class="text-gray-600">Customize your experience with our powerful tools.</p>
|
127 |
+
</div>
|
128 |
+
<div class="bg-white p-6 rounded-lg shadow hover:shadow-md transition">
|
129 |
+
<i class="fas fa-shield-alt text-red-500 text-3xl mb-4"></i>
|
130 |
+
<h3 class="text-xl font-semibold mb-2">Security Features</h3>
|
131 |
+
<p class="text-gray-600">Your data is protected with enterprise-grade security.</p>
|
132 |
</div>
|
|
|
|
|
|
|
|
|
133 |
</div>
|
134 |
</div>
|
135 |
</div>
|
|
|
136 |
|
137 |
+
<!-- Page 3 (Third Page) - Hidden by default -->
|
138 |
+
<div id="page3" class="page-content hidden">
|
139 |
+
<div class="max-w-3xl mx-auto text-center">
|
140 |
+
<h1 class="text-4xl md:text-5xl font-bold text-gray-800 mb-6">Third Page</h3>
|
141 |
+
<p class="text-xl text-gray-600 mb-8">This is the final page in our navigation demo.</p>
|
142 |
+
<div class="bg-white rounded-xl shadow-md p-6 mb-8">
|
143 |
+
<div class="flex items-center justify-center mb-4">
|
144 |
+
<i class="fas fa-envelope text-purple-500 text-4xl mr-3"></i>
|
145 |
+
<h2 class="text-2xl font-semibold text-gray-700">Contact Us</h2>
|
146 |
+
</div>
|
147 |
+
<form class="space-y-4 text-left">
|
148 |
+
<div>
|
149 |
+
<label for="name" class="block text-gray-700 mb-1">Name</label>
|
150 |
+
<input type="text" id="name" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition">
|
151 |
+
</div>
|
152 |
+
<div>
|
153 |
+
<label for="email" class="block text-gray-700 mb-1">Email</label>
|
154 |
+
<input type="email" id="email" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition">
|
155 |
+
</div>
|
156 |
+
<div>
|
157 |
+
<label for="message" class="block text-gray-700 mb-1">Message</label>
|
158 |
+
<textarea id="message" rows="4" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition"></textarea>
|
159 |
+
</div>
|
160 |
+
<button type="submit" class="w-full bg-purple-600 hover:bg-purple-700 text-white font-medium py-2 px-6 rounded-lg transition">
|
161 |
+
Send Message
|
162 |
+
</button>
|
163 |
+
</form>
|
164 |
+
</div>
|
165 |
+
<div class="flex justify-center space-x-4">
|
166 |
+
<a href="#" class="text-gray-600 hover:text-blue-500 transition">
|
167 |
+
<i class="fab fa-facebook-f text-2xl"></i>
|
168 |
+
</a>
|
169 |
+
<a href="#" class="text-gray-600 hover:text-blue-400 transition">
|
170 |
+
<i class="fab fa-twitter text-2xl"></i>
|
171 |
+
</a>
|
172 |
+
<a href="#" class="text-gray-600 hover:text-pink-500 transition">
|
173 |
+
<i class="fab fa-instagram text-2xl"></i>
|
174 |
+
</a>
|
175 |
+
<a href="#" class="text-gray-600 hover:text-gray-800 transition">
|
176 |
+
<i class="fab fa-github text-2xl"></i>
|
177 |
+
</a>
|
178 |
+
</div>
|
179 |
</div>
|
180 |
</div>
|
181 |
+
</main>
|
182 |
|
183 |
<!-- Footer -->
|
184 |
+
<footer class="bg-gray-800 text-white py-8">
|
185 |
+
<div class="container mx-auto px-4">
|
186 |
+
<div class="flex flex-col md:flex-row justify-between items-center">
|
187 |
+
<div class="mb-4 md:mb-0">
|
188 |
+
<h3 class="text-xl font-bold mb-2">MultiPage App</h3>
|
189 |
+
<p class="text-gray-400">A demonstration of single-file multi-page navigation.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
</div>
|
191 |
+
<div class="flex space-x-6">
|
192 |
+
<a href="#" class="text-gray-400 hover:text-white transition">Privacy Policy</a>
|
193 |
+
<a href="#" class="text-gray-400 hover:text-white transition">Terms of Service</a>
|
194 |
+
<a href="#" class="text-gray-400 hover:text-white transition">Contact</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
</div>
|
196 |
</div>
|
197 |
+
<div class="border-t border-gray-700 mt-6 pt-6 text-center text-gray-400">
|
198 |
+
<p>© 2023 MultiPage App. All rights reserved.</p>
|
199 |
</div>
|
200 |
</div>
|
201 |
</footer>
|
202 |
|
203 |
<script>
|
204 |
+
document.addEventListener('DOMContentLoaded', function() {
|
205 |
+
// Mobile menu toggle
|
206 |
+
const mobileMenuButton = document.getElementById('mobile-menu-button');
|
207 |
+
const mobileMenu = document.getElementById('mobile-menu');
|
208 |
+
|
209 |
+
mobileMenuButton.addEventListener('click', function() {
|
210 |
+
mobileMenu.classList.toggle('hidden');
|
211 |
+
});
|
212 |
+
|
213 |
+
// Navigation functionality
|
214 |
+
const navLinks = document.querySelectorAll('.nav-link');
|
215 |
+
const pageContents = document.querySelectorAll('.page-content');
|
216 |
+
|
217 |
+
function showPage(pageId) {
|
218 |
+
// Hide all pages
|
219 |
+
pageContents.forEach(page => {
|
220 |
+
page.classList.add('hidden');
|
221 |
+
});
|
222 |
|
223 |
+
// Show selected page
|
224 |
+
const activePage = document.getElementById(pageId);
|
225 |
+
activePage.classList.remove('hidden');
|
226 |
+
activePage.classList.add('page-transition');
|
227 |
|
228 |
+
// Update active nav link
|
229 |
+
navLinks.forEach(link => {
|
230 |
+
link.classList.remove('active', 'text-blue-600');
|
231 |
+
link.classList.add('text-gray-600');
|
232 |
+
|
233 |
+
if (link.dataset.page === pageId) {
|
234 |
+
link.classList.add('active', 'text-blue-600');
|
235 |
+
link.classList.remove('text-gray-600');
|
236 |
+
}
|
237 |
+
});
|
238 |
+
|
239 |
+
// Close mobile menu if open
|
240 |
+
mobileMenu.classList.add('hidden');
|
241 |
+
|
242 |
+
// Scroll to top
|
243 |
+
window.scrollTo(0, 0);
|
244 |
+
}
|
245 |
+
|
246 |
+
// Add click event to all nav links
|
247 |
+
navLinks.forEach(link => {
|
248 |
+
link.addEventListener('click', function(e) {
|
249 |
+
e.preventDefault();
|
250 |
+
const pageId = this.dataset.page;
|
251 |
+
showPage(pageId);
|
252 |
+
});
|
253 |
});
|
254 |
+
|
255 |
+
// Show page1 by default
|
256 |
+
showPage('page1');
|
257 |
+
|
258 |
+
// Remove transition class after animation completes
|
259 |
+
setTimeout(() => {
|
260 |
+
const pages = document.querySelectorAll('.page-content');
|
261 |
+
pages.forEach(page => {
|
262 |
+
page.classList.remove('page-transition');
|
263 |
+
});
|
264 |
+
}, 500);
|
265 |
});
|
266 |
</script>
|
267 |
+
</body>
|
268 |
</html>
|