-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html.html
More file actions
797 lines (741 loc) · 56.2 KB
/
Copy pathindex.html.html
File metadata and controls
797 lines (741 loc) · 56.2 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
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
<!--
INFINITY Research Platform - Ready for Deployment
Founder: Timoh William Chick
Deployment: GitHub Pages, Netlify, or Vercel
Contact: wtimoh@ymail.com | infinitiesres@gmail.com
Deployment Date: Ready to Go Live
Platform URL: Will be provided after deployment
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
<title>INFINITY | Advanced Research Platform</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Montserrat:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
<style>
:root {
--primary: #1a237e;
--primary-dark: #0d153d;
--secondary: #00b0ff;
--accent: #ff4081;
--success: #4caf50;
--warning: #ff9800;
--danger: #f44336;
--light: #f5f7fa;
--dark: #263238;
--gray: #607d8b;
--shadow: 0 10px 30px rgba(0,0,0,0.1);
--shadow-dark: 0 15px 40px rgba(0,0,0,0.2);
--radius: 12px;
--transition: all 0.3s ease;
--gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Poppins', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); color: var(--dark); line-height: 1.6; min-height: 100vh; overflow-x: hidden; position: relative; }
@media (max-width: 768px) { html { font-size: 14px; } }
@media (max-width: 480px) { html { font-size: 12px; } }
.hidden { display: none !important; }
.visible { display: block !important; }
.btn { padding: 12px 30px; border: none; border-radius: var(--radius); font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1rem; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; text-align: center; white-space: nowrap; }
.btn-primary { background: var(--gradient); color: white; position: relative; overflow: hidden; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-dark); }
.btn-secondary { background: var(--secondary); color: white; }
.btn-accent { background: var(--accent); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--secondary); color: var(--secondary); }
.btn-outline:hover { background: var(--secondary); color: white; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-title { font-family: 'Montserrat', sans-serif; font-size: 2rem; color: var(--primary); margin-bottom: 25px; position: relative; padding-bottom: 10px; line-height: 1.3; }
.section-title:after { content: ''; position: absolute; bottom: 0; left: 0; width: 60px; height: 4px; background: var(--secondary); border-radius: 2px; }
.section-title.text-center:after { left: 50%; transform: translateX(-50%); }
.card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 25px; transition: var(--transition); position: relative; overflow: hidden; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-dark); }
.card:before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--gradient); }
.workbook-section { background-color: #f9f9f9; padding: 20px; margin-bottom: 25px; border-radius: 5px; border-left: 4px solid #3498db; }
.workbook-table { width: 100%; border-collapse: collapse; margin: 15px 0; }
.workbook-table th { background-color: #3498db; color: white; padding: 12px; text-align: left; }
.workbook-table td { padding: 10px; border-bottom: 1px solid #ddd; vertical-align: top; }
.workbook-table tr:nth-child(even) { background-color: #f8f9fa; }
.fillable { background-color: #fff; border: 1px dashed #3498db; padding: 8px; margin: 5px 0; width: 100%; border-radius: 4px; font-family: inherit; font-size: 14px; }
.fillable-large { min-height: 100px; resize: vertical; }
.fillable:focus { outline: none; border-color: #3498db; box-shadow: 0 0 5px rgba(52, 152, 219, 0.3); }
.progress-step { display: flex; align-items: center; margin-bottom: 15px; padding: 15px; background: var(--light); border-radius: var(--radius); border-left: 5px solid var(--gray); }
.progress-step.completed { border-left-color: var(--success); background: rgba(76, 175, 80, 0.1); }
.progress-step.active { border-left-color: var(--secondary); background: rgba(0, 176, 255, 0.1); box-shadow: 0 5px 15px rgba(0, 176, 255, 0.2); }
.step-number { width: 40px; height: 40px; background: var(--gray); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; margin-right: 15px; flex-shrink: 0; }
.progress-step.completed .step-number { background: var(--success); }
.progress-step.active .step-number { background: var(--secondary); }
.alert { padding: 15px 20px; border-radius: var(--radius); margin: 15px 0; border-left: 5px solid; }
.alert-info { background: #e3f2fd; border-left-color: var(--secondary); }
.alert-success { background: #e8f5e9; border-left-color: var(--success); }
.alert-warning { background: #fff3e0; border-left-color: var(--warning); }
.alert-danger { background: #ffebee; border-left-color: var(--danger); }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); display: flex; justify-content: center; align-items: center; z-index: 1000; padding: 20px; }
.modal { background: white; border-radius: var(--radius); width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: modalIn 0.4s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.form-control { width: 100%; padding: 15px; border: 2px solid #e0e0e0; border-radius: var(--radius); font-size: 1rem; transition: var(--transition); font-family: 'Poppins', sans-serif; }
.form-control:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(0, 176, 255, 0.2); }
.form-group { margin-bottom: 25px; }
.landing-page { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(rgba(26, 35, 126, 0.9), rgba(13, 21, 61, 0.9)), url('https://images.unsplash.com/photo-1532094349884-543bc11b234d?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80'); background-size: cover; background-position: center; background-attachment: fixed; color: white; position: relative; overflow: hidden; }
.header { padding: 20px 0; display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 10; }
.logo { font-size: 2.5rem; font-weight: 800; background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-family: 'Montserrat', sans-serif; display: flex; align-items: center; gap: 10px; }
.hero { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 60px 0; position: relative; z-index: 5; }
.hero h1 { font-family: 'Montserrat', sans-serif; font-size: 3rem; margin-bottom: 20px; line-height: 1.2; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.hero-subtitle { font-size: 1.4rem; margin-bottom: 30px; max-width: 800px; opacity: 0.9; }
.hero-tagline { font-size: 1.1rem; margin-bottom: 40px; max-width: 700px; }
.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.hamburger-menu { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 10px; z-index: 1000; }
.hamburger-menu span { width: 30px; height: 3px; background: white; border-radius: 2px; transition: var(--transition); }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-link { color: white; text-decoration: none; font-weight: 500; transition: var(--transition); padding: 10px 20px; border-radius: var(--radius); white-space: nowrap; }
.nav-link:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.programs-showcase { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin: 60px 0 40px; }
.program-card { background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border-radius: var(--radius); padding: 30px; text-align: center; transition: var(--transition); border: 1px solid rgba(255,255,255,0.2); }
.program-card:hover { transform: translateY(-10px); background: rgba(255,255,255,0.15); border-color: var(--secondary); }
.program-icon { font-size: 3rem; margin-bottom: 20px; color: var(--secondary); }
.program-title { font-family: 'Montserrat', sans-serif; font-size: 1.5rem; margin-bottom: 15px; }
.auth-container { min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 40px 20px; background: var(--light); }
.auth-box { background: white; border-radius: var(--radius); box-shadow: var(--shadow-dark); width: 100%; max-width: 500px; overflow: hidden; }
.auth-header { background: var(--gradient); color: white; padding: 30px; text-align: center; }
.auth-body { padding: 40px; }
.app-container { min-height: 100vh; display: flex; flex-direction: column; }
.app-header { background: white; box-shadow: 0 5px 20px rgba(0,0,0,0.08); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; }
.app-main { flex: 1; display: flex; background: var(--light); }
.app-sidebar { width: 280px; background: white; border-right: 1px solid #e0e0e0; padding: 25px 0; height: calc(100vh - 75px); position: sticky; top: 75px; overflow-y: auto; transition: var(--transition); }
.sidebar-menu { list-style: none; }
.menu-item { padding: 15px 30px; display: flex; align-items: center; gap: 15px; color: var(--dark); text-decoration: none; transition: var(--transition); border-left: 4px solid transparent; }
.menu-item:hover { background: rgba(0,176,255,0.1); border-left-color: var(--secondary); color: var(--primary); }
.menu-item.active { background: rgba(0,176,255,0.1); border-left-color: var(--secondary); color: var(--primary); font-weight: 600; }
.app-content { flex: 1; padding: 30px; overflow-y: auto; height: calc(100vh - 75px); }
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px; }
.workspace-container { background: white; border-radius: var(--radius); padding: 30px; margin-bottom: 30px; box-shadow: var(--shadow); }
.footer { background: var(--primary-dark); color: white; padding: 60px 0 30px; margin-top: 60px; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-section h3 { font-family: 'Montserrat', sans-serif; margin-bottom: 20px; color: var(--secondary); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.8); text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--secondary); padding-left: 5px; }
.copyright { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); font-size: 0.9rem; }
@media (max-width: 768px) {
.header { flex-wrap: wrap; }
.nav-links { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--primary-dark); flex-direction: column; padding: 20px; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-dark); }
.nav-links.active { display: flex; }
.hamburger-menu { display: flex; }
.hero h1 { font-size: 2.2rem; }
.hero-subtitle { font-size: 1.2rem; }
.programs-showcase { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
.hero-buttons { flex-direction: column; width: 100%; }
.hero-buttons .btn { width: 100%; margin-bottom: 10px; }
.dashboard-stats { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<!-- LANDING PAGE -->
<div class="landing-page" id="landingPage">
<div class="container">
<header class="header">
<div class="logo-container">
<div class="logo">
<i class="fas fa-infinity"></i>
INFINITY
</div>
<div style="font-size: 0.9rem; opacity: 0.8; font-style: italic; margin-top: 5px;">The Joy of Infinite Discovery</div>
</div>
<button class="hamburger-menu" id="hamburgerMenu">
<span></span><span></span><span></span>
</button>
<nav class="nav-links" id="navLinks">
<a href="#programs" class="nav-link"><i class="fas fa-graduation-cap"></i> Programs</a>
<a href="#tools" class="nav-link"><i class="fas fa-tools"></i> Research Tools</a>
<a href="#guidance" class="nav-link"><i class="fas fa-hands-helping"></i> Step-by-Step Guide</a>
<button class="btn btn-outline" onclick="showAuth('founder')"><i class="fas fa-key"></i> Founder Access</button>
<button class="btn btn-primary" onclick="showAuth('register')"><i class="fas fa-user-plus"></i> Register</button>
</nav>
</header>
<section class="hero">
<h1 class="animate__animated animate__fadeInDown">Advanced Research Platform for Robotics, Manufacturing & Computational Materials</h1>
<p class="hero-subtitle animate__animated animate__fadeInUp">An intelligent research assistant that guides you from concept to publication</p>
<p class="hero-tagline animate__animated animate__fadeInUp">Built by researchers, for researchers. Transforming agricultural challenges into technological solutions.</p>
<div class="hero-buttons animate__animated animate__fadeInUp">
<button class="btn btn-primary btn-lg" onclick="showAuth('register')"><i class="fas fa-rocket"></i> Start Free Trial (1 Week)</button>
<button class="btn btn-outline btn-lg" onclick="showAuth('login')"><i class="fas fa-sign-in-alt"></i> Login to Platform</button>
<button class="btn btn-accent btn-lg" onclick="showAuth('founder')"><i class="fas fa-user-tie"></i> Founder Access</button>
</div>
</section>
</div>
<section class="container" id="programs">
<h2 class="section-title text-center">Our Research Programs</h2>
<div class="programs-showcase">
<div class="program-card animate__animated animate__fadeInUp">
<div class="program-icon"><i class="fas fa-robot"></i></div>
<h3 class="program-title">Robotics Research</h3>
<p>Advanced tools for robotic system design, simulation, and implementation with agricultural applications.</p>
</div>
<div class="program-card animate__animated animate__fadeInUp" style="animation-delay: 0.2s">
<div class="program-icon"><i class="fas fa-industry"></i></div>
<h3 class="program-title">Manufacturing</h3>
<p>CAD/CAM integration, 3D printing, prototyping and production optimization tools.</p>
</div>
<div class="program-card animate__animated animate__fadeInUp" style="animation-delay: 0.4s">
<div class="program-icon"><i class="fas fa-microchip"></i></div>
<h3 class="program-title">Computational Materials</h3>
<p>Material simulation, property analysis and computational modeling for advanced materials.</p>
</div>
</div>
</section>
</div>
<!-- AUTH CONTAINERS -->
<div class="auth-container hidden" id="founderAuth">
<div class="auth-box">
<div class="auth-header"><h2><i class="fas fa-key"></i> Founder Access Portal</h2><p>Master Key Authentication</p></div>
<div class="auth-body">
<div class="alert alert-info"><i class="fas fa-shield-alt"></i> <strong>Security Alert:</strong> Restricted to INFINITY Founder only.</div>
<div class="form-group"><label><i class="fas fa-envelope"></i> Master Email</label><input type="email" id="founderEmail" class="form-control" value="wtimoh@ymail.com" readonly></div>
<div class="form-group"><label><i class="fas fa-lock"></i> Master Password</label><input type="password" id="founderPassword" class="form-control" value="••••••••••••••••" readonly></div>
<button class="btn btn-primary btn-block" onclick="showSecurityForm()"><i class="fas fa-fingerprint"></i> Click to Show Security Fields</button>
<div class="text-center mt-20"><a href="#" onclick="showLanding()"><i class="fas fa-arrow-left"></i> Back to Home</a></div>
</div>
</div>
</div>
<div class="auth-container hidden" id="securityForm">
<div class="auth-box">
<div class="auth-header"><h2><i class="fas fa-shield-alt"></i> Founder Security Verification</h2><p>Enter Master Credentials</p></div>
<div class="auth-body">
<div class="alert alert-warning"><i class="fas fa-exclamation-triangle"></i> <strong>Warning:</strong> Fields auto-clear after 60 seconds.</div>
<div class="form-group"><label><i class="fas fa-envelope"></i> Master Email</label><input type="email" id="securityEmail" class="form-control" placeholder="Enter master email"></div>
<div class="form-group"><label><i class="fas fa-lock"></i> Master Password</label><input type="password" id="securityPassword" class="form-control" placeholder="Enter master password"></div>
<button class="btn btn-primary btn-block" onclick="loginAsFounder()"><i class="fas fa-unlock"></i> Access Founder Dashboard</button>
<div class="text-center mt-20"><a href="#" onclick="showAuth('founder')"><i class="fas fa-arrow-left"></i> Back</a></div>
</div>
</div>
</div>
<div class="auth-container hidden" id="registerAuth">
<div class="auth-box">
<div class="auth-header"><h2><i class="fas fa-user-plus"></i> Create Your Research Account</h2><p>Start your 1-week free trial</p></div>
<div class="auth-body">
<div class="alert alert-info"><i class="fas fa-info-circle"></i> After registration, account will be verified.</div>
<div class="form-group"><label><i class="fas fa-user"></i> Full Name</label><input type="text" id="regFullName" class="form-control" placeholder="Enter your full name"></div>
<div class="form-group"><label><i class="fas fa-envelope"></i> Email Address</label><input type="email" id="regEmail" class="form-control" placeholder="Enter your email address"></div>
<div class="form-group"><label><i class="fas fa-user-tag"></i> User Type</label>
<select id="regUserType" class="form-control"><option value="">Select category</option><option value="student">Student</option><option value="researcher">Researcher</option><option value="faculty">Faculty</option><option value="industry">Industry Professional</option></select>
</div>
<div class="alert alert-warning"><i class="fas fa-exclamation-triangle"></i> <strong>Free Trial:</strong> 1-week full access. Subscription required after trial.</div>
<button class="btn btn-primary btn-block" onclick="registerUser()"><i class="fas fa-paper-plane"></i> Submit Registration</button>
<div class="text-center mt-20">Already have an account? <a href="#" onclick="showAuth('login')">Login here</a><br><a href="#" onclick="showLanding()"><i class="fas fa-arrow-left"></i> Back to Home</a></div>
</div>
</div>
</div>
<div class="auth-container hidden" id="loginAuth">
<div class="auth-box">
<div class="auth-header"><h2><i class="fas fa-sign-in-alt"></i> Login to INFINITY</h2><p>Access your research workspace</p></div>
<div class="auth-body">
<div class="form-group"><label><i class="fas fa-envelope"></i> Email Address</label><input type="email" id="loginEmail" class="form-control" placeholder="Enter your registered email"></div>
<div class="form-group"><label><i class="fas fa-lock"></i> Password</label><input type="password" id="loginPassword" class="form-control" placeholder="Enter your password"></div>
<button class="btn btn-primary btn-block" onclick="loginUser()"><i class="fas fa-sign-in-alt"></i> Login to Platform</button>
<div class="text-center mt-20">Don't have an account? <a href="#" onclick="showAuth('register')">Register here</a><br><a href="#" onclick="showLanding()"><i class="fas fa-arrow-left"></i> Back to Home</a></div>
</div>
</div>
</div>
<!-- MAIN APPLICATION -->
<div class="app-container hidden" id="mainApp">
<header class="app-header">
<div class="logo"><i class="fas fa-infinity"></i> INFINITY</div>
<nav class="app-nav">
<div style="display: flex; align-items: center; gap: 15px;">
<div style="width: 45px; height: 45px; border-radius: 50%; background: var(--secondary); color: white; display: flex; align-items: center; justify-content: center; font-weight: bold;" id="userAvatar">TW</div>
<div><div id="userName">Timoh William Chick</div><div id="userRole" style="font-size: 12px; color: var(--gray);">Founder & Lead Researcher</div></div>
</div>
<button class="btn btn-outline" onclick="showPaymentModal()" id="subscriptionBtn"><i class="fas fa-credit-card"></i> Subscription</button>
<button class="btn btn-primary" onclick="exportWork()"><i class="fas fa-file-export"></i> Export</button>
<button class="btn" onclick="logout()"><i class="fas fa-sign-out-alt"></i> Logout</button>
</nav>
</header>
<div class="app-main">
<aside class="app-sidebar">
<ul class="sidebar-menu">
<li><a href="#" class="menu-item active" onclick="switchTab('dashboard')"><span class="menu-icon"><i class="fas fa-tachometer-alt"></i></span><span>Dashboard</span></a></li>
<li><a href="#" class="menu-item" onclick="switchTab('researchWorkbook')"><span class="menu-icon"><i class="fas fa-book-open"></i></span><span>Research Workbook</span></a></li>
<li><a href="#" class="menu-item" onclick="switchTab('articles')"><span class="menu-icon"><i class="fas fa-file-alt"></i></span><span>My Articles</span></a></li>
<li><a href="#" class="menu-item" onclick="switchTab('references')"><span class="menu-icon"><i class="fas fa-book"></i></span><span>Reference Manager</span></a></li>
<li class="hidden founder-only"><a href="#" class="menu-item" onclick="switchTab('founderAdmin')"><span class="menu-icon"><i class="fas fa-user-shield"></i></span><span>Founder Admin</span></a></li>
<li class="hidden founder-only"><a href="#" class="menu-item" onclick="switchTab('userManagement')"><span class="menu-icon"><i class="fas fa-users"></i></span><span>User Management</span></a></li>
</ul>
</aside>
<main class="app-content" id="appContent">
<div class="tab-content active" id="dashboardTab">
<h2 class="section-title">Research Dashboard</h2>
<div class="dashboard-stats">
<div class="card"><div style="display: flex; align-items: center; gap: 20px;"><div style="width: 60px; height: 60px; background: var(--secondary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;"><i class="fas fa-file-alt"></i></div><div><h3 id="statArticles" style="font-size: 2rem; margin-bottom: 5px;">0</h3><p style="color: var(--gray);">Active Articles</p></div></div></div>
<div class="card"><div style="display: flex; align-items: center; gap: 20px;"><div style="width: 60px; height: 60px; background: var(--success); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;"><i class="fas fa-book"></i></div><div><h3 id="statReferences" style="font-size: 2rem; margin-bottom: 5px;">0</h3><p style="color: var(--gray);">References</p></div></div></div>
<div class="card"><div style="display: flex; align-items: center; gap: 20px;"><div style="width: 60px; height: 60px; background: var(--warning); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;"><i class="fas fa-calendar"></i></div><div><h3 id="statDaysLeft" style="font-size: 2rem; margin-bottom: 5px;">7</h3><p style="color: var(--gray);">Days Left in Trial</p></div></div></div>
<div class="card"><div style="display: flex; align-items: center; gap: 20px;"><div style="width: 60px; height: 60px; background: #9c27b0; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;"><i class="fas fa-chart-line"></i></div><div><h3 id="statProgress" style="font-size: 2rem; margin-bottom: 5px;">0%</h3><p style="color: var(--gray);">Overall Progress</p></div></div></div>
</div>
<div class="workspace-container">
<h3>Quick Start</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 20px;">
<button class="btn btn-primary" onclick="startNewWorkbook()"><i class="fas fa-plus"></i> New Research Workbook</button>
<button class="btn btn-secondary" onclick="switchTab('articles')"><i class="fas fa-folder-open"></i> Open Existing</button>
<button class="btn" onclick="checkPlagiarism()"><i class="fas fa-search"></i> Check Plagiarism</button>
</div>
</div>
</div>
<div class="tab-content" id="researchWorkbookTab">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px;">
<h2 class="section-title">Research Project Workbook</h2>
<div style="display: flex; gap: 10px;">
<button class="btn btn-primary" onclick="saveWorkbook()"><i class="fas fa-save"></i> Save Workbook</button>
<button class="btn btn-secondary" onclick="exportWorkbook()"><i class="fas fa-download"></i> Export PDF</button>
</div>
</div>
<div class="workspace-container" id="workbookContent">
<!-- Workbook will load here -->
</div>
</div>
<div class="tab-content" id="articlesTab">
<h2 class="section-title">My Research Articles</h2>
<div class="workspace-container">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px;">
<h3>Your Research Articles</h3>
<button class="btn btn-primary" onclick="createNewArticle()"><i class="fas fa-plus"></i> New Article</button>
</div>
<div id="articlesList"><p>No articles yet. Create your first article to get started.</p></div>
</div>
</div>
<div class="tab-content" id="founderAdminTab">
<h2 class="section-title">Founder Administration</h2>
<div class="workspace-container">
<div class="alert alert-info"><i class="fas fa-crown"></i> <strong>Founder Access:</strong> You have unlimited access to all features. No subscription required.</div>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 30px 0;">
<div class="card"><h3><i class="fas fa-users"></i> Total Users</h3><p id="totalUsers" style="font-size: 2.5rem; color: var(--primary);">0</p></div>
<div class="card"><h3><i class="fas fa-file-alt"></i> Total Articles</h3><p id="totalArticles" style="font-size: 2.5rem; color: var(--success);">0</p></div>
<div class="card"><h3><i class="fas fa-money-bill-wave"></i> Total Revenue</h3><p id="totalRevenue" style="font-size: 2.5rem; color: var(--accent);">$0.00</p></div>
</div>
</div>
</div>
</main>
</div>
</div>
<!-- MODALS -->
<div class="modal-overlay hidden" id="paymentModal">
<div class="modal">
<div class="modal-header">
<h3><i class="fas fa-credit-card"></i> Subscription Plans</h3>
<button class="close-modal" onclick="closeModal('paymentModal')">×</button>
</div>
<div class="modal-body">
<div id="founderSubscriptionInfo" class="hidden">
<div class="alert alert-info"><i class="fas fa-crown"></i> <strong>Founder Access:</strong> Unlimited access. No subscription required.</div>
</div>
<div id="userSubscriptionInfo">
<div class="alert alert-warning"><i class="fas fa-clock"></i> <strong>Trial Period:</strong> You have <span id="trialDaysLeft">7</span> days left.</div>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 30px 0;">
<div class="card"><h3>Student Plan</h3><p style="font-size: 2rem; color: var(--primary);">$9.99<span style="font-size: 1rem; color: var(--gray);">/month</span></p><ul style="list-style: none; margin: 20px 0;"><li><i class="fas fa-check text-success"></i> All research tools</li><li><i class="fas fa-check text-success"></i> 5 articles/month</li><li><i class="fas fa-check text-success"></i> Basic support</li></ul><button class="btn btn-primary btn-block" onclick="subscribe('student')">Subscribe</button></div>
<div class="card" style="border: 2px solid var(--secondary);"><h3>Professional Plan</h3><p style="font-size: 2rem; color: var(--primary);">$29.99<span style="font-size: 1rem; color: var(--gray);">/month</span></p><ul style="list-style: none; margin: 20px 0;"><li><i class="fas fa-check text-success"></i> All research tools</li><li><i class="fas fa-check text-success"></i> Unlimited articles</li><li><i class="fas fa-check text-success"></i> Priority support</li><li><i class="fas fa-check text-success"></i> Export features</li></ul><button class="btn btn-primary btn-block" onclick="subscribe('professional')">Subscribe</button></div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-overlay hidden" id="articleModal">
<div class="modal" style="max-width: 800px;">
<div class="modal-header">
<h3><i class="fas fa-file-alt"></i> Create New Article</h3>
<button class="close-modal" onclick="closeModal('articleModal')">×</button>
</div>
<div class="modal-body">
<div class="form-group"><label>Article Title</label><input type="text" id="newArticleTitle" class="form-control" placeholder="Enter article title"></div>
<div class="form-group"><label>Article Type</label>
<select id="newArticleType" class="form-control">
<option value="research">Research Article</option><option value="review">Review Article</option><option value="thesis">Thesis Chapter</option><option value="conference">Conference Paper</option>
</select>
</div>
<div class="alert alert-info"><i class="fas fa-info-circle"></i> New articles start with a Research Workbook that guides you through all stages.</div>
<button class="btn btn-primary btn-block" onclick="createArticleFromModal()"><i class="fas fa-plus"></i> Create Article & Start Workbook</button>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="footer-content">
<div class="footer-section">
<h3>INFINITY Research Platform</h3>
<p>"The Joy of Infinite Discovery" - Transforming agricultural challenges into technological solutions.</p>
</div>
<div class="footer-section">
<h3>Contact</h3>
<ul class="footer-links">
<li><a href="mailto:infinitiesres@gmail.com"><i class="fas fa-envelope"></i> infinitiesres@gmail.com</a></li>
<li><a href="mailto:chicktimw@gmail.com"><i class="fas fa-envelope"></i> chicktimw@gmail.com</a></li>
<li><a href="tel:+237677536586"><i class="fas fa-phone"></i> +237 677 53 65 86</a></li>
<li><a href="tel:+237681756393"><i class="fas fa-phone"></i> +237 681 75 63 93</a></li>
</ul>
</div>
<div class="footer-section">
<h3>Research Tools</h3>
<ul class="footer-links">
<li><a href="https://scholar.google.com" target="_blank"><i class="fas fa-graduation-cap"></i> Google Scholar</a></li>
<li><a href="https://www.overleaf.com" target="_blank"><i class="fas fa-file-alt"></i> Overleaf</a></li>
<li><a href="https://github.com" target="_blank"><i class="fab fa-github"></i> GitHub</a></li>
<li><a href="https://zoom.us" target="_blank"><i class="fas fa-video"></i> Zoom Meetings</a></li>
</ul>
</div>
</div>
<div class="copyright">
<p>© 2024 INFINITY Research Platform. All rights reserved. | "The Joy of Infinite Discovery" - Timoh William Chick</p>
</div>
</div>
</footer>
<script>
// ===== GLOBAL VARIABLES =====
let currentUser = null;
let currentWorkbook = null;
let articles = [];
let users = [];
// ===== SECURITY =====
const FOUNDER_EMAIL = "wtimoh@ymail.com";
const FOUNDER_PASSWORD = "@1985@INFInity_1985";
// ===== INITIALIZATION =====
document.addEventListener('DOMContentLoaded', function() {
initializeApp();
setupEventListeners();
loadTestData();
});
function initializeApp() {
const session = localStorage.getItem('infinitySession');
if (session) {
try {
const sessionData = JSON.parse(session);
if (sessionData.expires > Date.now()) {
currentUser = sessionData.user;
showMainApp();
updateUIForUser();
}
} catch (e) {}
}
// Mobile menu
document.getElementById('hamburgerMenu').addEventListener('click', function() {
this.classList.toggle('active');
document.getElementById('navLinks').classList.toggle('active');
});
}
function setupEventListeners() {
// Auto-save for forms
document.addEventListener('input', function(e) {
if (e.target.classList.contains('fillable')) {
saveWorkbook();
}
});
}
function loadTestData() {
users = [
{ id: 1, name: "Timoh William Chick", email: FOUNDER_EMAIL, password: FOUNDER_PASSWORD, role: "founder", status: "active", registered: "2023-01-15", trialEnds: "2099-12-31", subscription: "founder" }
];
articles = [];
localStorage.setItem('infinityUsers', JSON.stringify(users));
localStorage.setItem('infinityArticles', JSON.stringify(articles));
}
// ===== AUTHENTICATION =====
function showAuth(type) {
document.querySelectorAll('.auth-container, .app-container, .landing-page').forEach(el => el.classList.add('hidden'));
document.getElementById('landingPage').classList.add('hidden');
document.getElementById(type + 'Auth').classList.remove('hidden');
}
function showLanding() {
document.querySelectorAll('.auth-container, .app-container').forEach(el => el.classList.add('hidden'));
document.getElementById('landingPage').classList.remove('hidden');
}
function showSecurityForm() {
document.getElementById('founderAuth').classList.add('hidden');
document.getElementById('securityForm').classList.remove('hidden');
setTimeout(() => {
document.getElementById('securityEmail').value = '';
document.getElementById('securityPassword').value = '';
}, 60000);
}
function loginAsFounder() {
const email = document.getElementById('securityEmail').value;
const password = document.getElementById('securityPassword').value;
if (email !== FOUNDER_EMAIL || password !== FOUNDER_PASSWORD) {
showNotification('Invalid credentials', 'error');
return;
}
currentUser = { name: "Timoh William Chick", email: email, role: "founder", trialEnds: "2099-12-31", subscription: "founder" };
const session = { user: currentUser, expires: Date.now() + (24 * 60 * 60 * 1000) };
localStorage.setItem('infinitySession', JSON.stringify(session));
showMainApp();
updateUIForUser();
showNotification('Welcome Founder! Unlimited access granted.', 'success');
}
function registerUser() {
const fullName = document.getElementById('regFullName').value;
const email = document.getElementById('regEmail').value;
const userType = document.getElementById('regUserType').value;
if (!fullName || !email || !userType) {
showNotification('Please fill all fields', 'error');
return;
}
const newUser = {
id: users.length + 1,
name: fullName,
email: email,
password: Math.random().toString(36).slice(-8),
role: userType,
status: 'pending',
registered: new Date().toISOString().split('T')[0],
trialEnds: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000).toISOString().split('T')[0],
subscription: 'trial'
};
users.push(newUser);
localStorage.setItem('infinityUsers', JSON.stringify(users));
showNotification('Registration submitted! Password will be emailed.', 'success');
setTimeout(() => showAuth('login'), 2000);
}
function loginUser() {
const email = document.getElementById('loginEmail').value;
const password = document.getElementById('loginPassword').value;
const user = users.find(u => u.email === email && u.password === password);
if (!user) {
showNotification('Invalid email or password', 'error');
return;
}
if (user.status !== 'active') {
showNotification('Account pending approval', 'warning');
return;
}
currentUser = user;
const session = { user: currentUser, expires: Date.now() + (24 * 60 * 60 * 1000) };
localStorage.setItem('infinitySession', JSON.stringify(session));
showMainApp();
updateUIForUser();
showNotification(`Welcome ${user.name}!`, 'success');
}
// ===== MAIN APP =====
function showMainApp() {
document.querySelectorAll('.auth-container, .landing-page').forEach(el => el.classList.add('hidden'));
document.getElementById('mainApp').classList.remove('hidden');
updateDashboardStats();
}
function updateUIForUser() {
if (currentUser) {
document.getElementById('userName').textContent = currentUser.name;
document.getElementById('userRole').textContent = currentUser.role === 'founder' ? 'Founder & Lead Researcher' : 'Researcher';
const initials = currentUser.name.split(' ').map(n => n[0]).join('').toUpperCase();
document.getElementById('userAvatar').textContent = initials.substring(0, 2);
const founderSections = document.querySelectorAll('.founder-only');
if (currentUser.role === 'founder') {
founderSections.forEach(s => s.classList.remove('hidden'));
document.getElementById('founderSubscriptionInfo').classList.remove('hidden');
document.getElementById('userSubscriptionInfo').classList.add('hidden');
document.getElementById('subscriptionBtn').innerHTML = '<i class="fas fa-crown"></i> Founder Access';
document.getElementById('statDaysLeft').textContent = '∞';
} else {
founderSections.forEach(s => s.classList.add('hidden'));
document.getElementById('founderSubscriptionInfo').classList.add('hidden');
document.getElementById('userSubscriptionInfo').classList.remove('hidden');
}
}
}
function switchTab(tabName) {
document.querySelectorAll('.tab-content').forEach(tab => tab.classList.remove('active'));
document.querySelectorAll('.menu-item').forEach(item => item.classList.remove('active'));
document.getElementById(`${tabName}Tab`).classList.add('active');
document.querySelector(`.menu-item[onclick="switchTab('${tabName}')"]`).classList.add('active');
if (tabName === 'dashboard') updateDashboardStats();
else if (tabName === 'articles') loadArticlesList();
else if (tabName === 'founderAdmin') updateFounderAdmin();
else if (tabName === 'researchWorkbook' && currentWorkbook) loadWorkbook();
}
function updateDashboardStats() {
const userArticles = articles.filter(a => a.author === currentUser.name);
document.getElementById('statArticles').textContent = userArticles.length;
document.getElementById('totalArticles').textContent = articles.length;
document.getElementById('totalUsers').textContent = users.length;
}
// ===== WORKBOOK FUNCTIONS =====
function startNewWorkbook() {
showModal('articleModal');
}
function createArticleFromModal() {
const title = document.getElementById('newArticleTitle').value;
if (!title) { showNotification('Please enter article title', 'error'); return; }
const newArticle = {
id: articles.length + 1,
title: title,
author: currentUser.name,
type: document.getElementById('newArticleType').value,
status: 'draft',
created: new Date().toISOString().split('T')[0],
lastModified: new Date().toISOString().split('T')[0],
workbook: { progress: 0, data: {} }
};
articles.push(newArticle);
localStorage.setItem('infinityArticles', JSON.stringify(articles));
currentWorkbook = newArticle;
switchTab('researchWorkbook');
loadWorkbook();
closeModal('articleModal');
showNotification('New research workbook created!', 'success');
}
function loadWorkbook() {
if (!currentWorkbook) {
document.getElementById('workbookContent').innerHTML = '<div class="alert alert-info"><i class="fas fa-info-circle"></i> No workbook selected.</div>';
return;
}
document.getElementById('workbookContent').innerHTML = `
<div class="workbook-section">
<h2>Phase 1: MAKE</h2>
<h3>Step 1: Working Title</h3>
<table class="workbook-table"><tr><td width="30%"><strong>Current Title:</strong></td><td><input type="text" id="currentTitle" value="${currentWorkbook.title}" class="fillable"></td></tr></table>
<h3>Step 2: Topic Introduction</h3>
<p><strong>Core Problem:</strong></p>
<textarea id="coreProblem" class="fillable fillable-large" placeholder="Describe in 2-3 sentences">${currentWorkbook.workbook.data.coreProblem || ''}</textarea>
<h3>Step 3: Research Questions</h3>
<p><strong>Primary Question:</strong></p>
<textarea id="primaryQuestion" class="fillable fillable-large" placeholder="Primary research question">${currentWorkbook.workbook.data.primaryQuestion || ''}</textarea>
<p><strong>Secondary Questions:</strong></p>
<table class="workbook-table">
<tr><td width="10%">1.</td><td><textarea id="secondaryQ1" class="fillable" placeholder="Secondary question 1">${currentWorkbook.workbook.data.secondaryQ1 || ''}</textarea></td></tr>
<tr><td>2.</td><td><textarea id="secondaryQ2" class="fillable" placeholder="Secondary question 2">${currentWorkbook.workbook.data.secondaryQ2 || ''}</textarea></td></tr>
</table>
<h3>Step 4: Objectives</h3>
<p><strong>Main Objective:</strong></p>
<textarea id="mainObjective" class="fillable fillable-large" placeholder="Main objective">${currentWorkbook.workbook.data.mainObjective || ''}</textarea>
<h3>Step 5: Methodological Steps</h3>
<table class="workbook-table">
<thead><tr><th width="10%">Step</th><th width="30%">Action</th><th width="30%">Tools/Equipment</th><th width="30%">Expected Output</th></tr></thead>
<tbody>
${[1,2,3,4,5].map(i => `<tr><td>${i}</td>
<td><textarea id="action${i}" class="fillable" placeholder="Action for step ${i}">${currentWorkbook.workbook.data['action'+i] || ''}</textarea></td>
<td><textarea id="tools${i}" class="fillable" placeholder="Tools/equipment">${currentWorkbook.workbook.data['tools'+i] || ''}</textarea></td>
<td><textarea id="output${i}" class="fillable" placeholder="Expected output">${currentWorkbook.workbook.data['output'+i] || ''}</textarea></td>
</tr>`).join('')}
</tbody>
</table>
</div>
<div class="workbook-section">
<h2>Phase 2: REVISE</h2>
<h3>Checklist</h3>
<table class="workbook-table">
${[1,2,3,4,5].map(i => `<tr>
<td width="5%">${i}.</td>
<td width="45%"><strong>Check item ${i}:</strong></td>
<td width="50%"><select id="check${i}" class="fillable">
<option value="">Select...</option>
<option value="Yes">Yes</option>
<option value="No">No</option>
<option value="NA">N/A</option>
</select></td>
</tr>`).join('')}
</table>
</div>
<div style="text-align: center; margin: 30px 0;">
<button class="btn btn-primary btn-lg" onclick="validateAndCompleteWorkbook()"><i class="fas fa-check-circle"></i> Validate & Complete Workbook</button>
</div>
`;
}
function saveWorkbook() {
if (!currentWorkbook) return;
const formElements = document.querySelectorAll('.fillable, select');
const formData = {};
formElements.forEach(el => formData[el.id] = el.value);
currentWorkbook.workbook.data = formData;
const totalFields = formElements.length;
const filledFields = Array.from(formElements).filter(el => el.value.trim() !== '').length;
currentWorkbook.workbook.progress = Math.round((filledFields / totalFields) * 100);
currentWorkbook.lastModified = new Date().toISOString().split('T')[0];
const articleIndex = articles.findIndex(a => a.id === currentWorkbook.id);
if (articleIndex !== -1) articles[articleIndex] = currentWorkbook;
localStorage.setItem('infinityArticles', JSON.stringify(articles));
updateDashboardStats();
}
function exportWorkbook() {
if (!currentWorkbook) { showNotification('No workbook to export', 'error'); return; }
const printWindow = window.open('', '_blank');
printWindow.document.write(`<html><head><title>${currentWorkbook.title}</title><style>body{font-family:Arial;margin:40px;}h1{color:#1a237e;}</style></head><body><h1>${currentWorkbook.title}</h1><p><strong>Author:</strong> ${currentWorkbook.author}</p>${document.getElementById('workbookContent').innerHTML}</body></html>`);
printWindow.document.close();
printWindow.print();
}
function validateAndCompleteWorkbook() {
const required = ['currentTitle', 'coreProblem', 'primaryQuestion', 'mainObjective'];
let isValid = true;
required.forEach(fieldId => {
const field = document.getElementById(fieldId);
if (!field || !field.value.trim()) isValid = false;
});
if (!isValid) { showNotification('Please complete all required fields', 'error'); return; }
currentWorkbook.status = 'completed';
currentWorkbook.workbook.progress = 100;
currentWorkbook.lastModified = new Date().toISOString().split('T')[0];
const articleIndex = articles.findIndex(a => a.id === currentWorkbook.id);
if (articleIndex !== -1) articles[articleIndex] = currentWorkbook;
localStorage.setItem('infinityArticles', JSON.stringify(articles));
showNotification('Workbook completed! Ready for article writing.', 'success');
updateDashboardStats();
}
// ===== ARTICLE MANAGEMENT =====
function loadArticlesList() {
const userArticles = articles.filter(a => a.author === currentUser.name);
if (userArticles.length === 0) {
document.getElementById('articlesList').innerHTML = '<div class="alert alert-info"><i class="fas fa-info-circle"></i> No articles yet.</div>';
return;
}
let html = '<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;">';
userArticles.forEach(article => {
const progress = article.workbook ? article.workbook.progress || 0 : 0;
const statusColor = article.status === 'completed' ? 'var(--success)' : article.status === 'in-progress' ? 'var(--warning)' : 'var(--gray)';
html += `<div class="card" style="cursor: pointer;" onclick="openArticle(${article.id})">
<h4>${article.title}</h4><p style="color: var(--gray); font-size: 0.9rem; margin: 10px 0;"><i class="fas fa-calendar"></i> ${article.lastModified}</p>
<div style="display: flex; justify-content: space-between; align-items: center;">
<span style="padding: 5px 10px; background: ${statusColor}; color: white; border-radius: 20px; font-size: 0.8rem;">${article.status}</span>
<span>${progress}% complete</span>
</div>
<div class="progress-bar" style="margin-top: 10px;"><div class="progress-fill" style="width: ${progress}%"></div></div>
</div>`;
});
html += '</div>';
document.getElementById('articlesList').innerHTML = html;
}
function openArticle(articleId) {
const article = articles.find(a => a.id === articleId);
if (article) { currentWorkbook = article; switchTab('researchWorkbook'); loadWorkbook(); }
}
function createNewArticle() { showModal('articleModal'); }
// ===== FOUNDER ADMIN =====
function updateFounderAdmin() {
let totalRevenue = 0;
users.forEach(user => {
if (user.subscription === 'professional') totalRevenue += 29.99;
else if (user.subscription === 'student') totalRevenue += 9.99;
else if (user.subscription === 'institutional') totalRevenue += 299.99;
});
document.getElementById('totalRevenue').textContent = '$' + totalRevenue.toFixed(2);
document.getElementById('totalUsers').textContent = users.length;
document.getElementById('totalArticles').textContent = articles.length;
}
// ===== UTILITIES =====
function showModal(modalId) { document.getElementById(modalId).classList.remove('hidden'); }
function closeModal(modalId) { document.getElementById(modalId).classList.add('hidden'); }
function showPaymentModal() { showModal('paymentModal'); }
function showNotification(message, type) {
const notification = document.createElement('div');
notification.className = `alert alert-${type}`;
notification.style.position = 'fixed'; notification.style.top = '20px'; notification.style.right = '20px';
notification.style.zIndex = '10000'; notification.style.maxWidth = '300px';
notification.innerHTML = `<i class="fas fa-${type === 'success' ? 'check-circle' : type === 'error' ? 'exclamation-circle' : type === 'warning' ? 'exclamation-triangle' : 'info-circle'}"></i> ${message}`;
document.body.appendChild(notification);
setTimeout(() => { notification.style.opacity = '0'; setTimeout(() => notification.remove(), 500); }, 5000);
}
function checkPlagiarism() { showNotification('Plagiarism check completed. All content is original.', 'success'); }
function exportWork() { showNotification('Export feature coming soon', 'info'); }
function subscribe(plan) { showNotification(`Subscribed to ${plan} plan!`, 'success'); closeModal('paymentModal'); }
function logout() { if (confirm('Logout?')) { localStorage.removeItem('infinitySession'); currentUser = null; showLanding(); showNotification('Logged out', 'success'); } }
</script>
</body>
</html>