-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
447 lines (378 loc) · 18.6 KB
/
index.html
File metadata and controls
447 lines (378 loc) · 18.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Wealthy Labs 3.0 | Dashboard</title>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- SheetJS (Library to read Excel files) -->
<!-- Excel import removed -->
<!-- Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap"
rel="stylesheet" />
<script>
tailwind.config = {
theme: {
extend: {
colors: {
accent: '#D69E2E', // Wealthy Labs Gold
'accent-hover': '#B7791F',
bg: '#FAFAFA',
'text-main': '#1A1C1E',
sidebar: '#FFFFFF',
},
fontFamily: {
sans: ['"Plus Jakarta Sans"', 'sans-serif'],
}
}
}
}
</script>
<style>
/* Custom Scrollbar */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
.fade-in {
animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.active-nav-item {
border-right: 4px solid #D69E2E;
background-color: #D97706; /* stronger accent */
color: #ffffff !important;
font-weight: 700;
box-shadow: 0 2px 6px rgba(214,158,46,0.12);
}
/* Keep active nav color on hover */
.active-nav-item:hover {
background-color: #D97706;
color: #ffffff !important;
}
/* Header active link */
.header-active {
color: #D97706 !important;
font-weight: 700;
text-decoration: underline;
}
/* Keep header active color on hover */
.header-active:hover {
color: #D97706 !important;
text-decoration: underline;
}
/* Watermark Style */
.watermark {
position: absolute;
bottom: 20px;
right: 20px;
opacity: 0.1;
pointer-events: none;
font-weight: 800;
font-size: 4rem;
color: #000;
z-index: 0;
white-space: nowrap;
}
.logo {
width: 64px;
height: 64px;
border-radius: 50%;
object-fit: cover;
}
.interlink1_logo {
width: 100%;
height: 100%;
border-radius: 100%;
object-fit: cover;
}
</style>
</head>
<body class="bg-bg text-text-main h-screen flex overflow-hidden relative">
<!-- Watermark Background -->
<div class="watermark">Wealthy Labs 3.0</div>
<!-- LEFT SIDEBAR -->
<aside
class="w-80 bg-sidebar border-r border-gray-200 flex flex-col h-full shadow-sm z-20 flex-shrink-0 transition-transform duration-300 transform md:translate-x-0 -translate-x-full absolute md:relative"
id="sidebar">
<!-- Header -->
<div class="h-[84px] flex items-center px-6 border-b border-gray-100 bg-white">
<div class="flex items-center gap-3">
<img src="Wealthy Labs 3.0.png" alt="Logo" class="logo"
onerror="this.src='Code base\\Wealthy Labs 3.0.png'">
<div>
<span class="font-bold text-lg tracking-tight block leading-none">Wealthy Labs 3.0</span>
<span class="text-[10px] text-gray-400 font-medium tracking-wider">Learn, Earn - the web 3 way.</span>
</div>
</div>
<!-- Mobile Close -->
<button id="closeSidebar" class="md:hidden ml-auto text-gray-400 hover:text-gray-600">
<i class="fa-solid fa-times"></i>
</button>
</div>
<!-- Left navigation will list blog posts (Excel import removed) -->
<!-- Search -->
<div class="p-4 border-b border-gray-100">
<div class="relative">
<i class="fa-solid fa-search absolute left-3 top-3 text-gray-400 text-sm"></i>
<input type="text" id="searchInput" placeholder="Search content..."
class="w-full bg-gray-50 border border-gray-200 rounded-lg py-2 pl-9 pr-3 text-sm focus:outline-none focus:border-accent transition-colors">
</div>
</div>
<!-- Navigation Links -->
<div class="flex-1 overflow-y-auto py-4" id="navContainer">
<!-- Content Injected via JS -->
</div>
</aside>
<!-- MOBILE TOGGLE -->
<button id="mobileToggle"
class="fixed bottom-6 right-6 md:hidden bg-accent text-white p-4 rounded-full shadow-lg z-50 hover:bg-accent-hover transition-colors">
<i class="fa-solid fa-bars"></i>
</button>
<!-- MAIN CONTENT -->
<main class="flex-1 flex flex-col h-full overflow-hidden relative z-10 bg-white/95 backdrop-blur-sm">
<!-- Header -->
<header class="h-auto md:h-[84px] border-b flex flex-col md:flex-row items-center justify-between px-4 md:px-8 flex-shrink-0 bg-white py-2 md:py-0">
<!-- Community Card -->
<div class="w-full md:w-auto overflow-x-auto">
<div class="flex gap-2 items-center">
<a href="https://whatsapp.com/channel/0029Vb7SDpOCRs1vXWdnyK1E" target="_blank"
class="flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-gray-50 transition-all text-xs md:text-sm group flex-shrink-0">
<i class="fa-brands fa-whatsapp text-lg text-[#25D366]"></i>
<span class="text-gray-600 font-medium group-hover:text-gray-900 hidden lg:inline">WhatsApp</span>
</a>
<a href="https://t.me/Prasanna3001" target="_blank"
class="flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-gray-50 transition-all text-xs md:text-sm group flex-shrink-0">
<i class="fa-brands fa-telegram text-lg text-[#0088cc]"></i>
<span class="text-gray-600 font-medium group-hover:text-gray-900 hidden lg:inline">Telegram</span>
</a>
<a href="https://x.com/prasanna3001" target="_blank"
class="flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-gray-50 transition-all text-xs md:text-sm group flex-shrink-0">
<i class="fa-brands fa-x-twitter text-lg text-black"></i>
<span class="text-gray-600 font-medium group-hover:text-gray-900 hidden lg:inline">Twitter</span>
</a>
<a href="https://www.youtube.com/@wealthylabs3.0" target="_blank"
class="flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-gray-50 transition-all text-xs md:text-sm group flex-shrink-0">
<i class="fa-brands fa-youtube text-lg text-[#FF0000]"></i>
<span class="text-gray-600 font-medium group-hover:text-gray-900 hidden lg:inline">YouTube</span>
</a>
<a href="https://www.facebook.com/wealtylabs3.0" target="_blank"
class="flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-gray-50 transition-all text-xs md:text-sm group flex-shrink-0">
<i class="fa-brands fa-facebook text-lg text-[#1877F2]"></i>
<span class="text-gray-600 font-medium group-hover:text-gray-900 hidden lg:inline">Facebook</span>
</a>
<a href="https://www.instagram.com/wealthylabs3.0/" target="_blank"
class="flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-gray-50 transition-all text-xs md:text-sm group flex-shrink-0">
<i class="fa-brands fa-instagram text-lg text-[#E4405F]"></i>
<span class="text-gray-600 font-medium group-hover:text-gray-900 hidden lg:inline">Instagram</span>
</a>
<a href="https://www.threads.com/@wealthylabs3.0" target="_blank"
class="flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-gray-50 transition-all text-xs md:text-sm group flex-shrink-0">
<i class="fa-brands fa-threads text-lg text-black"></i>
<span class="text-gray-600 font-medium group-hover:text-gray-900 hidden lg:inline">Threads</span>
</a>
</div>
</div>
<!-- Primary Nav: Home / About Us / Events -->
<nav class="ml-4 hidden md:flex gap-3 items-center">
<a href="#" id="headerHome" class="text-sm text-gray-700 hover:text-accent px-3 py-2 rounded">Home</a>
<a href="#" id="headerAbout" class="text-sm text-gray-700 hover:text-accent px-3 py-2 rounded">About Us</a>
<a href="#" id="headerEvents" class="text-sm text-gray-700 hover:text-accent px-3 py-2 rounded">Events</a>
</nav>
<div class="hidden md:block p-2">
<img src="Interlink.png" alt="Logo" class="rounded-lg h-10 w-auto"
onerror="this.src='https://via.placeholder.com/150x50?text=WL3.0'">
</div>
</header>
<!-- Content Area -->
<div class="flex-1 overflow-y-auto p-6 md:p-10 scroll-smooth" id="mainScroll">
<div id="contentArea" class="max-w-6xl mx-auto fade-in min-h-[600px] h-[calc(100vh-120px)]">
<!-- Main content iframe (loads pages for Home / About / Events / Blog posts) -->
<iframe id="contentFrame" src="Code base/index1.html" class="w-full h-full border rounded-lg" style="min-height:500px;" title="Content Frame"></iframe>
</div>
</div>
</main>
<script>
// DOM Elements
const navContainer = document.getElementById('navContainer');
const searchInput = document.getElementById('searchInput');
const sidebar = document.getElementById('sidebar');
const mobileToggle = document.getElementById('mobileToggle');
const closeSidebar = document.getElementById('closeSidebar');
const contentFrame = document.getElementById('contentFrame');
const mainScroll = document.getElementById('mainScroll');
let activeId = null;
// --- HELPER: Slugify ---
function createSlug(text) {
return text.toString().toLowerCase()
.replace(/\s+/g, '-')
.replace(/[^\w\-]+/g, '')
.replace(/\-\-+/g, '-')
.replace(/^-+/, '')
.replace(/-+$/, '');
}
// Static posts (replace or extend as needed)
const posts = [
{ id: 0, title: 'Join In Interlink', src: 'HowToJoinInterlink.html', category: 'InterLink Labs' },
{ id: 1, title: 'Become Ambassador', src: 'HowToBecomeAmbassador.html', category: 'InterLink Labs' },
{ id: 2, title: 'The New Era 2026', src: 'TheNewEra2026.html', category: 'InterLink Labs' },
{ id: 3, title: '2025 - Achievements', src: '2025Achievements.html', category: 'InterLink Labs' }
];
// Render left navigation from posts
function renderNavigation(data) {
navContainer.innerHTML = '';
if (!data || data.length === 0) {
navContainer.innerHTML = '<div class="p-4 text-center text-gray-400 text-xs">No posts available</div>';
return;
}
const groups = data.reduce((acc, item) => {
const cat = item.category || 'Uncategorized';
(acc[cat] = acc[cat] || []).push(item);
return acc;
}, {});
Object.keys(groups).sort().forEach(category => {
const items = groups[category];
const groupDiv = document.createElement('div');
groupDiv.className = 'mb-1';
const details = document.createElement('details');
details.open = true;
const summary = document.createElement('summary');
summary.className = 'list-none cursor-pointer px-6 py-2 text-[11px] font-bold text-gray-400 uppercase hover:text-accent transition-colors flex justify-between items-center tracking-wider';
summary.innerHTML = `${category} <i class="fa-solid fa-chevron-down text-[9px]"></i>`;
const list = document.createElement('div');
list.className = 'flex flex-col mt-1';
items.forEach(item => {
const btn = document.createElement('button');
btn.className = `text-left px-6 py-3 text-sm text-gray-600 hover:bg-gray-50 border-r-[3px] border-transparent transition-all duration-200 w-full truncate ${activeId === item.id ? 'active-nav-item' : ''}`;
btn.textContent = item.title;
btn.onclick = () => loadToIframe(item.id, true);
list.appendChild(btn);
});
details.appendChild(summary);
details.appendChild(list);
groupDiv.appendChild(details);
navContainer.appendChild(groupDiv);
});
}
function loadToIframe(id, updateHash = true) {
const item = posts.find(p => p.id === id);
if (!item) return;
activeId = id;
contentFrame.src = item.src;
if (updateHash) {
window.history.pushState(null, null, `#${createSlug(item.title)}`);
}
renderNavigation(posts);
// clear header active when a sidebar post is selected
setHeaderActive(null);
// Mobile: close sidebar after selection
if (window.innerWidth < 768) {
sidebar.classList.remove('translate-x-0');
sidebar.classList.add('-translate-x-full');
}
}
// Search
searchInput.addEventListener('input', (e) => {
const term = e.target.value.toLowerCase();
if (!term) {
renderNavigation(posts);
return;
}
const filtered = posts.filter(item =>
item.title.toLowerCase().includes(term) ||
(item.category || '').toLowerCase().includes(term)
);
renderNavigation(filtered);
});
// Header links
const headerHome = document.getElementById('headerHome');
const headerAbout = document.getElementById('headerAbout');
const headerEvents = document.getElementById('headerEvents');
function setHeaderActive(key) {
[headerHome, headerAbout, headerEvents].forEach(el => {
if (!el) return;
el.classList.remove('header-active');
});
if (!key) return;
if (key === 'home' && headerHome) headerHome.classList.add('header-active');
if (key === 'about' && headerAbout) headerAbout.classList.add('header-active');
if (key === 'events' && headerEvents) headerEvents.classList.add('header-active');
}
if (headerHome) headerHome.addEventListener('click', (e) => { e.preventDefault(); contentFrame.src = 'Code base/index1.html'; activeId = null; renderNavigation(posts); setHeaderActive('home'); });
if (headerAbout) headerAbout.addEventListener('click', (e) => { e.preventDefault(); contentFrame.src = 'Code base/BaseTemplate.html'; activeId = null; renderNavigation(posts); setHeaderActive('about'); });
if (headerEvents) headerEvents.addEventListener('click', (e) => { e.preventDefault(); contentFrame.src = 'Code base/events.html'; activeId = null; renderNavigation(posts); setHeaderActive('events'); });
// Mobile menu
mobileToggle.addEventListener('click', () => {
sidebar.classList.remove('-translate-x-full');
sidebar.classList.add('translate-x-0');
});
closeSidebar.addEventListener('click', () => {
sidebar.classList.remove('translate-x-0');
sidebar.classList.add('-translate-x-full');
});
// Ensure navigation is generated immediately, then initialize from URL hash (if present)
renderNavigation(posts);
function initFromHash() {
const hash = window.location.hash.substring(1);
if (hash) {
// Try to match a post first
const match = posts.find(p => createSlug(p.title) === hash);
if (match) {
loadToIframe(match.id, false);
return;
}
// Support header hashes: home / about / events
if (hash === createSlug('Home') || hash === 'home') {
contentFrame.src = 'Code base/index1.html';
setHeaderActive('home');
return;
}
if (hash === createSlug('About Us') || hash === 'about') {
contentFrame.src = 'Code base/BaseTemplate.html';
setHeaderActive('about');
return;
}
if (hash === createSlug('Events') || hash === 'events') {
contentFrame.src = 'TheNewEra2026.html';
setHeaderActive('events');
return;
}
}
// default: load first post
loadToIframe(posts[0].id, false);
}
// initialize immediately (no need to wait for window load)
initFromHash();
// Back/forward support
window.addEventListener('popstate', () => {
const hash = window.location.hash.substring(1);
if (hash) {
const match = posts.find(p => createSlug(p.title) === hash);
if (match) loadToIframe(match.id, false);
}
});
</script>
</body>
</html>