-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.html
More file actions
743 lines (683 loc) · 26.6 KB
/
Copy path404.html
File metadata and controls
743 lines (683 loc) · 26.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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 - Page Not Found | UYEH TECH</title>
<meta name="description" content="Sorry, the page you're looking for doesn't exist.">
<meta name="robots" content="noindex, follow">
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Montserrat:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<!-- PWA manifest -->
<link rel="manifest" href="/site.webmanifest">
<meta name="theme-color" content="#00ff88">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="UYEH TECH">
<link rel="apple-touch-icon" href="/icons/icon-192.png">
<script src="/site-controller.js" defer></script>
<style>
/* ========== RESET & BASE ========== */
* { margin:0; padding:0; box-sizing:border-box; }
body {
font-family:'Montserrat',sans-serif;
background:#0a0a0a;
color:#d1d5db;
overflow-x:hidden;
min-height:100vh;
}
/* ========== ERROR CONTAINER ========== */
.error-container {
position:relative;
min-height:100vh;
display:flex;
align-items:center;
justify-content:center;
overflow:hidden;
padding:20px;
}
/* ========== ANIMATED BACKGROUND (STARS) ========== */
.stars,.stars2,.stars3 {
position:absolute; top:0; left:0; width:100%; height:100%;
background:transparent;
}
.stars {
background-image:
radial-gradient(2px 2px at 20px 30px,#eee,rgba(0,0,0,0)),
radial-gradient(2px 2px at 60px 70px,#fff,rgba(0,0,0,0)),
radial-gradient(1px 1px at 50px 50px,#fff,rgba(0,0,0,0)),
radial-gradient(1px 1px at 130px 80px,#fff,rgba(0,0,0,0)),
radial-gradient(2px 2px at 90px 10px,#fff,rgba(0,0,0,0));
background-repeat:repeat;
background-size:200px 200px;
animation:zoom 20s alternate infinite;
opacity:0.3;
}
.stars2 {
background-image:
radial-gradient(1px 1px at 100px 150px,#00ff88,rgba(0,0,0,0)),
radial-gradient(1px 1px at 200px 50px,#00ff88,rgba(0,0,0,0)),
radial-gradient(1px 1px at 50px 200px,#00ff88,rgba(0,0,0,0));
background-repeat:repeat;
background-size:250px 250px;
animation:zoom 15s alternate infinite;
opacity:0.2;
}
.stars3 {
background-image:
radial-gradient(1px 1px at 150px 100px,#fff,rgba(0,0,0,0)),
radial-gradient(1px 1px at 250px 200px,#fff,rgba(0,0,0,0));
background-repeat:repeat;
background-size:300px 300px;
animation:zoom 25s alternate infinite;
opacity:0.1;
}
@keyframes zoom {
0% { transform:scale(1); }
100% { transform:scale(1.3); }
}
/* ========== CONTENT ========== */
.error-content {
position:relative;
z-index:10;
text-align:center;
max-width:900px;
width:100%;
padding:40px 0 60px;
}
/* ========== GLITCH 404 ========== */
.glitch-wrapper { margin-bottom:30px; }
.glitch {
font-family:'Playfair Display',serif;
font-size:10em;
font-weight:900;
color:#00ff88;
position:relative;
text-shadow:0 0 30px rgba(0,255,136,0.5),0 0 60px rgba(0,255,136,0.3);
animation:glitch 2s infinite;
}
.glitch::before,.glitch::after {
content:attr(data-text);
position:absolute; top:0; left:0; width:100%; height:100%;
}
.glitch::before {
animation:glitchTop 3s infinite;
clip-path:polygon(0 0,100% 0,100% 33%,0 33%);
-webkit-clip-path:polygon(0 0,100% 0,100% 33%,0 33%);
}
.glitch::after {
animation:glitchBottom 2.5s infinite;
clip-path:polygon(0 67%,100% 67%,100% 100%,0 100%);
-webkit-clip-path:polygon(0 67%,100% 67%,100% 100%,0 100%);
}
@keyframes glitch {
0%,100% { transform:translate(0); }
20% { transform:translate(-2px,2px); }
40% { transform:translate(-2px,-2px); }
60% { transform:translate(2px,2px); }
80% { transform:translate(2px,-2px); }
}
@keyframes glitchTop {
0%,100% { transform:translate(0); }
20% { transform:translate(-5px,-5px); }
40% { transform:translate(-5px,5px); }
60% { transform:translate(5px,-5px); }
80% { transform:translate(5px,5px); }
}
@keyframes glitchBottom {
0%,100% { transform:translate(0); }
20% { transform:translate(5px,5px); }
40% { transform:translate(5px,-5px); }
60% { transform:translate(-5px,5px); }
80% { transform:translate(-5px,-5px); }
}
/* ========== ERROR TITLE ========== */
.error-title {
font-family:'Playfair Display',serif;
font-size:2.5em;
color:#00ff88;
margin-bottom:20px;
animation:fadeInUp 1s ease;
}
.error-description {
font-size:1.1em;
color:#d1d5db;
line-height:1.8;
margin-bottom:40px;
animation:fadeInUp 1.2s ease;
}
@keyframes fadeInUp {
from { opacity:0; transform:translateY(30px); }
to { opacity:1; transform:translateY(0); }
}
/* ========== SMART SUGGESTION BOX ========== */
.suggestion-box {
display:none;
background:rgba(0,255,136,0.08);
border:1px solid rgba(0,255,136,0.3);
border-radius:14px;
padding:22px 28px;
margin:0 auto 36px;
max-width:600px;
animation:fadeInUp 0.8s ease;
}
.suggestion-box.show { display:block; }
.suggestion-label {
color:#00ff88;
font-size:0.85rem;
font-weight:700;
letter-spacing:1.5px;
text-transform:uppercase;
margin-bottom:14px;
display:flex;
align-items:center;
justify-content:center;
gap:8px;
}
.suggestion-links {
display:flex;
flex-wrap:wrap;
gap:10px;
justify-content:center;
}
.suggestion-link {
display:inline-flex;
align-items:center;
gap:7px;
padding:9px 18px;
background:rgba(0,255,136,0.1);
border:1px solid rgba(0,255,136,0.25);
border-radius:8px;
color:#00ff88;
text-decoration:none;
font-size:0.88rem;
font-weight:600;
transition:all 0.25s;
}
.suggestion-link:hover {
background:rgba(0,255,136,0.2);
border-color:rgba(0,255,136,0.5);
transform:translateY(-2px);
}
/* ========== SEARCH ========== */
.search-container {
display:flex;
max-width:520px;
margin:0 auto 40px;
gap:10px;
animation:fadeInUp 1.4s ease;
}
.search-input {
flex:1;
padding:15px 20px;
background:rgba(0,255,136,0.05);
border:2px solid rgba(0,255,136,0.3);
border-radius:10px;
color:#fff;
font-size:1em;
font-family:'Montserrat',sans-serif;
transition:all 0.3s;
}
.search-input:focus {
outline:none;
border-color:#00ff88;
box-shadow:0 0 20px rgba(0,255,136,0.3);
background:rgba(0,255,136,0.1);
}
.search-input::placeholder { color:rgba(255,255,255,0.5); }
.search-btn {
padding:15px 22px;
background:linear-gradient(135deg,#00b359,#00ff88);
border:none;
border-radius:10px;
color:#fff;
font-size:1.2em;
cursor:pointer;
transition:all 0.3s;
}
.search-btn:hover { transform:translateY(-2px); box-shadow:0 10px 30px rgba(0,255,136,0.5); }
/* ========== SEARCH RESULTS ========== */
.search-results {
display:none;
max-width:600px;
margin:0 auto 36px;
text-align:left;
}
.search-results.show { display:block; }
.search-result-item {
display:flex;
align-items:center;
gap:12px;
padding:12px 16px;
margin-bottom:8px;
background:rgba(255,255,255,0.03);
border:1px solid rgba(255,255,255,0.08);
border-radius:10px;
text-decoration:none;
color:#d1d5db;
transition:all 0.25s;
}
.search-result-item:hover {
background:rgba(0,255,136,0.08);
border-color:rgba(0,255,136,0.3);
color:#fff;
transform:translateX(4px);
}
.result-icon { font-size:1.2rem; flex-shrink:0; }
.result-info { flex:1; }
.result-name { font-weight:600; font-size:0.92rem; color:#fff; margin-bottom:2px; }
.result-desc { font-size:0.78rem; color:#9ca3af; }
.result-path { font-size:0.72rem; color:rgba(0,255,136,0.6); margin-left:auto; white-space:nowrap; }
.no-results-msg {
text-align:center;
padding:20px;
color:#666;
font-size:0.9rem;
}
/* ========== ACTION BUTTONS ========== */
.action-buttons {
display:flex;
gap:15px;
justify-content:center;
margin-bottom:50px;
flex-wrap:wrap;
animation:fadeInUp 1.6s ease;
}
.btn {
display:inline-flex;
align-items:center;
gap:10px;
padding:15px 30px;
text-decoration:none;
border-radius:10px;
font-weight:600;
font-size:1em;
transition:all 0.3s;
}
.btn-primary {
background:linear-gradient(135deg,#00b359,#00ff88);
color:#fff;
box-shadow:0 5px 20px rgba(0,255,136,0.3);
}
.btn-primary:hover { transform:translateY(-3px); box-shadow:0 10px 30px rgba(0,255,136,0.5); }
.btn-secondary {
background:rgba(0,255,136,0.1);
border:2px solid rgba(0,255,136,0.3);
color:#00ff88;
}
.btn-secondary:hover { background:rgba(0,255,136,0.2); border-color:#00ff88; }
.btn-tertiary {
background:rgba(255,255,255,0.05);
border:2px solid rgba(255,255,255,0.2);
color:#d1d5db;
}
.btn-tertiary:hover { background:rgba(255,255,255,0.1); border-color:rgba(255,255,255,0.4); }
/* ========== PLATFORM SECTIONS ========== */
.platform-grid {
margin-bottom:50px;
animation:fadeInUp 1.8s ease;
}
.platform-grid-title {
color:#00ff88;
font-size:1.1em;
font-weight:700;
margin-bottom:24px;
letter-spacing:1px;
text-transform:uppercase;
font-size:0.85rem;
}
.platform-sections {
display:grid;
grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
gap:16px;
text-align:left;
}
.platform-section {
background:rgba(255,255,255,0.02);
border:1px solid rgba(255,255,255,0.07);
border-radius:14px;
padding:18px 20px;
transition:border-color 0.25s;
}
.platform-section:hover { border-color:rgba(0,255,136,0.2); }
.section-header {
display:flex;
align-items:center;
gap:10px;
margin-bottom:14px;
padding-bottom:12px;
border-bottom:1px solid rgba(255,255,255,0.06);
}
.section-icon { font-size:1.4rem; }
.section-name {
font-weight:700;
font-size:0.9rem;
color:#fff;
}
.section-links { list-style:none; display:flex; flex-direction:column; gap:6px; }
.section-links a {
display:flex;
align-items:center;
gap:7px;
color:#9ca3af;
text-decoration:none;
font-size:0.82rem;
padding:4px 0;
transition:color 0.2s;
border-radius:4px;
}
.section-links a:hover { color:#00ff88; }
.section-links a::before {
content:'';
display:block;
width:4px; height:4px;
background:rgba(0,255,136,0.4);
border-radius:50%;
flex-shrink:0;
}
/* ========== ERROR CODE ========== */
.error-code {
color:rgba(255,255,255,0.25);
font-size:0.82em;
margin-top:20px;
animation:fadeInUp 2s ease;
}
.error-code span { color:#00ff88; font-weight:600; }
/* ========== FLOATING ELEMENTS ========== */
.floating-element {
position:absolute;
font-size:3em;
opacity:0.15;
animation:float 6s ease-in-out infinite;
pointer-events:none;
}
.floating-element:nth-child(2) { animation-delay:1s; animation-duration:7s; }
.floating-element:nth-child(3) { animation-delay:2s; animation-duration:8s; }
.floating-element:nth-child(4) { animation-delay:3s; animation-duration:9s; }
@keyframes float {
0%,100% { transform:translateY(0) rotate(0deg); }
50% { transform:translateY(-30px) rotate(180deg); }
}
/* ========== RESPONSIVE ========== */
@media(max-width:768px) {
.glitch { font-size:6em; }
.error-title { font-size:1.8em; }
.search-container { flex-direction:column; }
.action-buttons { flex-direction:column; align-items:stretch; }
.btn { width:100%; justify-content:center; }
.platform-sections { grid-template-columns:1fr 1fr; }
.floating-element { font-size:2em; }
}
@media(max-width:480px) {
.glitch { font-size:4em; }
.error-title { font-size:1.5em; }
.error-description { font-size:0.9em; }
.error-container { padding:20px 15px; }
.platform-sections { grid-template-columns:1fr; }
}
</style>
</head>
<body>
<div class="error-container">
<!-- Animated Background -->
<div class="stars"></div>
<div class="stars2"></div>
<div class="stars3"></div>
<!-- Content -->
<div class="error-content">
<!-- Glitch 404 -->
<div class="glitch-wrapper">
<h1 class="glitch" data-text="404">404</h1>
</div>
<!-- Error Message -->
<h2 class="error-title">Oops! Page Not Found</h2>
<p class="error-description">
The page you're looking for seems to have vanished into the digital void.<br>
It might have been moved, deleted, or never existed in the first place.
</p>
<!-- Smart Suggestion Box (filled by JS) -->
<div class="suggestion-box" id="suggestionBox">
<div class="suggestion-label">💡 Did you mean one of these?</div>
<div class="suggestion-links" id="suggestionLinks"></div>
</div>
<!-- Search Bar -->
<div class="search-container">
<input type="text" class="search-input" id="siteSearch"
placeholder="Search across all UYEH TECH pages…" autocomplete="off">
<button class="search-btn" onclick="runSearch()">🔍</button>
</div>
<!-- Live Search Results -->
<div class="search-results" id="searchResults"></div>
<!-- Action Buttons -->
<div class="action-buttons">
<a href="/" class="btn btn-primary">🏠 Go Home</a>
<a href="javascript:history.back()" class="btn btn-secondary">← Go Back</a>
<a href="/contact" class="btn btn-tertiary">📧 Contact Us</a>
</div>
<!-- Full Platform Map -->
<div class="platform-grid">
<div class="platform-grid-title">Browse All Sections of UYEH TECH</div>
<div class="platform-sections" id="platformSections"></div>
</div>
<!-- Error Code -->
<div class="error-code">
Error: <span>404</span> |
URL: <span id="badUrl"></span> |
Time: <span id="errorTime"></span>
</div>
</div>
<!-- Floating Decorations -->
<div class="floating-element" style="top:10%;left:10%;">💻</div>
<div class="floating-element" style="top:20%;right:15%;">🌐</div>
<div class="floating-element" style="bottom:15%;left:20%;">⚡</div>
<div class="floating-element" style="bottom:25%;right:10%;">🚀</div>
</div>
<script>
/* =====================================================
UYEH TECH — 404 PAGE SCRIPT
Full site map + smart suggestions + live search
===================================================== */
/* ── COMPLETE UYEH TECH SITE MAP ── */
const SITE_MAP = [
/* ── MAIN SITE ──
About Me / Services / Projects removed from here — they were stale
.html duplicates of the real pages, which live under Creator's Hub
below. Their search keywords were merged into those entries instead
of being lost. */
{ name:'Home', path:'/', icon:'🏠', section:'Main', keywords:['home','main','index','start','landing'] },
{ name:'Contact', path:'/contact', icon:'📧', section:'Main', keywords:['contact','reach','email','message','talk','hire','phone'] },
{ name:'Privacy Policy', path:'/privacy.html', icon:'🔒', section:'Main', keywords:['privacy','policy','data','gdpr','personal'] },
{ name:'Terms of Service', path:'/terms.html', icon:'📄', section:'Main', keywords:['terms','conditions','legal','agreement','tos'] },
/* ── BLOG ── */
{ name:'Blog Home', path:'/blog/', icon:'📝', section:'Blog', keywords:['blog','article','post','read','insights','tutorial','news','tech'] },
{ name:'Blog Post', path:'/blog/post.html', icon:'📖', section:'Blog', keywords:['blog post','article','read post','blog detail'] },
{ name:'Technology', path:'/blog/?cat=Technology', icon:'💻', section:'Blog', keywords:['technology','tech articles','coding'] },
{ name:'Tutorials', path:'/blog/?cat=Tutorial', icon:'🎓', section:'Blog', keywords:['tutorials','how to','guide','learn','step by step'] },
{ name:'Business', path:'/blog/?cat=Business', icon:'💼', section:'Blog', keywords:['business','startup','entrepreneur','growth'] },
{ name:'Design', path:'/blog/?cat=Design', icon:'🎨', section:'Blog', keywords:['design','ui','ux','interface','visual'] },
{ name:'News', path:'/blog/?cat=News', icon:'📰', section:'Blog', keywords:['news','announcement','update','release'] },
{ name:'Marketing', path:'/blog/?cat=Marketing', icon:'📣', section:'Blog', keywords:['marketing','digital marketing','seo','ads','growth'] },
/* ── MARKETPLACE / STORE ── */
{ name:'Store Home', path:'/marketplace/', icon:'🛒', section:'Store', keywords:['store','shop','marketplace','buy','products','digital','purchase'] },
{ name:'Login', path:'/marketplace/login', icon:'🔐', section:'Store', keywords:['login','sign in','signin','account','access'] },
{ name:'Sign Up', path:'/marketplace/signup', icon:'✍️', section:'Store', keywords:['signup','sign up','register','create account','join','new account'] },
{ name:'Dashboard', path:'/marketplace/dashboard', icon:'📊', section:'Store', keywords:['dashboard','account','my account','orders','my orders'] },
{ name:'My Downloads', path:'/marketplace/my-products', icon:'⬇️', section:'Store', keywords:['downloads','my downloads','files','purchased','download'] },
{ name:'Forgot Password', path:'/marketplace/forgot-password',icon:'🔑',section:'Store', keywords:['forgot password','reset password','lost password','password help'] },
/* ── CREATORS HUB ──
Merged in the keywords that used to live on the removed Main-block
duplicates (team, story, who, company, web, app, mobile, work, case,
built) so search coverage doesn't regress. */
{ name:'Creators Hub', path:'https://about.uyehtech.com/', icon:'🎨', section:"Creator's Hub", keywords:['creator','hub','creator hub','sell','become creator','digital products'] },
{ name:'About Me', path:'https://about.uyehtech.com/', icon:'👨💻', section:"Creator's Hub", keywords:['about me','bassey okon','founder','personal','creator profile','team','story','who','company','about'] },
{ name:'My Services', path:'https://about.uyehtech.com/services', icon:'🛠️', section:"Creator's Hub", keywords:['my services','freelance','hire','build','web development service','services','service','web','app','mobile','design','development'] },
{ name:'My Portfolio', path:'https://about.uyehtech.com/portfolio', icon:'🖼️', section:"Creator's Hub", keywords:['portfolio','my work','my projects','examples','showcase','projects','work','case','built'] },
{ name:'Meet Me', path:'https://about.uyehtech.com/contact', icon:'🤝', section:"Creator's Hub", keywords:['meet me','personal contact','schedule','collaborate','work together'] },
/* ── CREATOR & AFFILIATE ── */
{ name:'Affiliate Program',path:'/marketplace/affiliate', icon:'💰', section:'Creators', keywords:['affiliate','refer','referral','earn','commission','partner'] },
{ name:'Browse Creators',path:'/marketplace/creators', icon:'🏪', section:'Creators', keywords:['creators','browse creators','stores','creator list'] },
{ name:'Creator Dashboard',path:'/marketplace/creator-dashboard',icon:'📊', section:'Creators', keywords:['creator dashboard','creator','earnings','manage store'] },
{ name:'Creator Login',path:'/marketplace/creator-login', icon:'🔐', section:'Creators', keywords:['creator login','creator sign in','marketplace login','creator'] },
{ name:'Become a Creator',path:'/marketplace/creator-apply', icon:'🚀', section:'Creators', keywords:['become a creator','creator signup','creator apply','sell on uyeh','join as creator','creator'] },
];
/* Group by section for the platform grid */
const SECTIONS_META = {
'Main': { icon:'🏠', color:'rgba(0,255,136,0.06)' },
'Blog': { icon:'📝', color:'rgba(0,150,255,0.06)' },
'Store': { icon:'🛒', color:'rgba(255,200,0,0.06)' },
"Creator's Hub": { icon:'🎨', color:'rgba(255,100,100,0.06)' },
'Creators': { icon:'👥', color:'rgba(150,100,255,0.06)' },
};
/* ── BUILD PLATFORM GRID ── */
(function buildGrid() {
const container = document.getElementById('platformSections');
const groups = {};
SITE_MAP.forEach(p => {
if (!groups[p.section]) groups[p.section] = [];
groups[p.section].push(p);
});
Object.entries(groups).forEach(([sectionName, pages]) => {
const meta = SECTIONS_META[sectionName] || { icon:'📁', color:'rgba(255,255,255,0.03)' };
const div = document.createElement('div');
div.className = 'platform-section';
div.style.background = meta.color;
div.innerHTML = `
<div class="section-header">
<span class="section-icon">${meta.icon}</span>
<span class="section-name">${sectionName}</span>
</div>
<ul class="section-links">
${pages.map(p => `<li><a href="${p.path}">${p.icon} ${p.name}</a></li>`).join('')}
</ul>`;
container.appendChild(div);
});
})();
/* ── SMART SUGGESTION (based on current URL) ── */
(function smartSuggest() {
const currentPath = window.location.pathname.toLowerCase() + window.location.search.toLowerCase();
const matched = [];
SITE_MAP.forEach(page => {
const score = page.keywords.reduce((acc, kw) => {
if (currentPath.includes(kw)) return acc + kw.length; // longer match = better
return acc;
}, 0);
if (score > 0) matched.push({ page, score });
});
if (!matched.length) return;
matched.sort((a, b) => b.score - a.score);
const top3 = matched.slice(0, 3);
const box = document.getElementById('suggestionBox');
const links = document.getElementById('suggestionLinks');
top3.forEach(({ page }) => {
const a = document.createElement('a');
a.href = page.path;
a.className = 'suggestion-link';
a.innerHTML = `${page.icon} ${page.name}`;
links.appendChild(a);
});
box.classList.add('show');
})();
/* ── LIVE SEARCH ── */
const searchInput = document.getElementById('siteSearch');
const resultsEl = document.getElementById('searchResults');
searchInput.addEventListener('input', function() {
const q = this.value.trim().toLowerCase();
if (q.length < 2) { resultsEl.classList.remove('show'); resultsEl.innerHTML=''; return; }
runSearch(q);
});
searchInput.addEventListener('keydown', function(e) {
if (e.key === 'Enter') runSearch(this.value.trim().toLowerCase());
});
function runSearch(q) {
if (typeof q === 'undefined') q = searchInput.value.trim().toLowerCase();
if (!q || q.length < 1) return;
const results = SITE_MAP
.map(page => {
let score = 0;
const haystack = [page.name, page.section, ...page.keywords].join(' ').toLowerCase();
if (haystack.includes(q)) score += 30;
if (page.name.toLowerCase().includes(q)) score += 50;
page.keywords.forEach(kw => { if (kw.includes(q) || q.includes(kw)) score += 10; });
return { page, score };
})
.filter(r => r.score > 0)
.sort((a, b) => b.score - a.score)
.slice(0, 7);
resultsEl.innerHTML = '';
if (!results.length) {
resultsEl.innerHTML = `<div class="no-results-msg">No pages found for "<strong>${escHtml(q)}</strong>" — try a different word.</div>`;
} else {
results.forEach(({ page }) => {
const a = document.createElement('a');
a.href = page.path;
a.className = 'search-result-item';
a.innerHTML = `
<span class="result-icon">${page.icon}</span>
<div class="result-info">
<div class="result-name">${escHtml(page.name)}</div>
<div class="result-desc">${escHtml(page.section)}</div>
</div>
<span class="result-path">${page.path}</span>`;
resultsEl.appendChild(a);
});
}
resultsEl.classList.add('show');
}
function escHtml(t) {
return String(t||'').replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
}
/* ── BAD URL DISPLAY ── */
document.getElementById('badUrl').textContent = window.location.pathname || '/unknown';
/* ── CLOCK ── */
function tick() {
document.getElementById('errorTime').textContent =
new Date().toLocaleTimeString('en-US', { hour:'2-digit', minute:'2-digit', second:'2-digit' });
}
setInterval(tick, 1000);
tick();
/* ── MOUSE TRAIL ── */
const trailStyle = document.createElement('style');
trailStyle.textContent = `@keyframes fadeOutTrail { to { opacity:0; transform:scale(0); } }`;
document.head.appendChild(trailStyle);
document.addEventListener('mousemove', function(e) {
const dot = document.createElement('div');
dot.style.cssText = `position:fixed;width:5px;height:5px;background:#00ff88;border-radius:50%;
pointer-events:none;left:${e.clientX}px;top:${e.clientY}px;opacity:0.6;z-index:9999;
animation:fadeOutTrail 0.8s ease forwards;`;
document.body.appendChild(dot);
setTimeout(() => dot.remove(), 800);
});
/* ── LOG 404 ── */
console.log('%c404 Error — UYEH TECH', 'color:#00ff88;font-size:18px;font-weight:bold;');
console.log('URL:', window.location.href);
console.log('Referrer:', document.referrer || 'None');
console.log('Tip: Try the Konami Code ↑↑↓↓←→←→BA 🎮');
/* ── KONAMI EASTER EGG ── */
let kseq = [];
const KONAMI = ['ArrowUp','ArrowUp','ArrowDown','ArrowDown','ArrowLeft','ArrowRight','ArrowLeft','ArrowRight','b','a'];
document.addEventListener('keydown', e => {
kseq.push(e.key);
kseq = kseq.slice(-10);
if (kseq.join(',') === KONAMI.join(',')) {
const g = document.querySelector('.glitch');
const ks = document.createElement('style');
ks.textContent = `@keyframes rainbow{0%{color:#f00}14%{color:#f70}28%{color:#ff0}42%{color:#0f0}57%{color:#00f}71%{color:#90f}85%{color:#f0f}100%{color:#f00}}`;
document.head.appendChild(ks);
g.style.animation = 'rainbow 1.5s linear infinite';
alert('🎉 Konami Code! You found the UYEH TECH secret 🚀');
}
});
/* ── ANALYTICS (if gtag loaded) ── */
if (typeof gtag !== 'undefined') {
gtag('event','exception', {
description: '404 Error',
fatal: false,
page_location: window.location.href,
page_referrer: document.referrer
});
}
</script>
<script src="/pwa-install.js"></script>
<script src="/chat-widget.js"></script>
</body>
</html>