-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcourse-projects.html
More file actions
901 lines (792 loc) · 28.6 KB
/
course-projects.html
File metadata and controls
901 lines (792 loc) · 28.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
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
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Course Projects</title>
<link rel="stylesheet" href="styles.css">
<style>
html {
scroll-behavior: smooth;
}
body {
overflow-y: auto;
padding: 40px;
font-family: 'Inter', 'Segoe UI', sans-serif;
background-color: #020c1b; /* Darker blue background color to match other pages */
color: #fff;
position: relative;
}
/* Circuit Background Elements */
.background-animation {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background-color: #020c1b;
opacity: 1;
overflow: hidden;
}
.tech-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background-image:
linear-gradient(rgba(13, 39, 80, 0.2) 1px, transparent 1px),
linear-gradient(90deg, rgba(13, 39, 80, 0.2) 1px, transparent 1px);
background-size: 50px 50px;
opacity: 0.5;
}
/* Circuit Lines Animation */
.circuit-lines {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: -1;
}
.circuit-line {
position: absolute;
background: linear-gradient(90deg, transparent, rgba(0, 120, 200, 0.4), transparent);
height: 2px;
width: 100%;
animation: circuitMove 8s infinite linear;
opacity: 0;
box-shadow: 0 0 8px rgba(0, 100, 170, 0.6);
}
.circuit-line:nth-child(1) {
top: 15%;
animation-duration: 7s;
animation-delay: 0s;
}
.circuit-line:nth-child(2) {
top: 25%;
animation-duration: 10s;
animation-delay: 1s;
}
.circuit-line:nth-child(3) {
top: 35%;
animation-duration: 12s;
animation-delay: 2s;
}
.circuit-line:nth-child(4) {
top: 45%;
animation-duration: 9s;
animation-delay: 3s;
}
.circuit-line:nth-child(5) {
top: 55%;
animation-duration: 11s;
animation-delay: 4s;
}
.circuit-line:nth-child(6) {
top: 65%;
animation-duration: 8s;
animation-delay: 5s;
}
.circuit-line:nth-child(7) {
top: 75%;
animation-duration: 13s;
animation-delay: 6s;
}
.circuit-line:nth-child(8) {
top: 85%;
animation-duration: 7s;
animation-delay: 7s;
}
.circuit-dot {
position: absolute;
width: 4px;
height: 4px;
border-radius: 50%;
background-color: rgba(0, 120, 200, 0.6);
box-shadow: 0 0 10px rgba(0, 100, 170, 0.6);
animation: pulse 4s infinite;
}
.circuit-dot:nth-child(9) {
top: 20%;
left: 30%;
animation-delay: 0s;
}
.circuit-dot:nth-child(10) {
top: 70%;
left: 60%;
animation-delay: 1s;
}
.circuit-dot:nth-child(11) {
top: 40%;
left: 80%;
animation-delay: 2s;
}
.circuit-dot:nth-child(12) {
top: 60%;
left: 20%;
animation-delay: 3s;
}
.circuit-dot:nth-child(13) {
top: 30%;
left: 50%;
animation-delay: 2.5s;
}
.circuit-dot:nth-child(14) {
top: 80%;
left: 40%;
animation-delay: 3.5s;
}
.circuit-branch {
position: absolute;
background: rgba(0, 100, 170, 0.35);
height: 1px;
animation: fadeInOut 5s infinite;
box-shadow: 0 0 5px rgba(0, 100, 170, 0.5);
}
.circuit-branch:nth-child(15) {
top: 25%;
left: 40%;
width: 100px;
transform: rotate(45deg);
animation-delay: 0.5s;
}
.circuit-branch:nth-child(16) {
top: 65%;
left: 60%;
width: 120px;
transform: rotate(-30deg);
animation-delay: 1.5s;
}
.circuit-branch:nth-child(17) {
top: 45%;
left: 25%;
width: 80px;
transform: rotate(60deg);
animation-delay: 2.5s;
}
/* Animation Keyframes for Circuit Elements */
@keyframes circuitMove {
0% {
transform: translateX(-100%);
opacity: 0;
}
10% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
transform: translateX(100%);
opacity: 0;
}
}
@keyframes pulse {
0% {
transform: scale(1);
opacity: 0.5;
}
50% {
transform: scale(1.2);
opacity: 1;
}
100% {
transform: scale(1);
opacity: 0.5;
}
}
@keyframes fadeInOut {
0% {
opacity: 0.2;
}
50% {
opacity: 0.8;
}
100% {
opacity: 0.2;
}
}
.container {
max-width: 1200px;
margin: 0 auto;
position: relative;
z-index: 1;
}
.page-title {
text-align: center;
margin-bottom: 40px;
color: #fff;
text-shadow: 0 0 10px rgba(0, 120, 200, 0.6);
}
/* Projects Slider */
.projects-slider {
position: relative;
overflow: hidden;
margin-bottom: 40px;
}
.slider-container {
display: flex;
transition: transform 0.5s ease;
}
.slider-controls {
display: flex;
justify-content: center;
margin-top: 20px;
gap: 10px;
}
.slider-btn {
background-color: rgba(0, 120, 200, 0.2);
border: none;
color: white;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
}
.slider-btn:hover {
background-color: rgba(0, 120, 200, 0.4);
transform: translateY(-2px);
}
.slider-dots {
display: flex;
justify-content: center;
margin-top: 15px;
gap: 8px;
}
.slider-dot {
width: 12px;
height: 12px;
border-radius: 50%;
background-color: rgba(0, 120, 200, 0.2);
cursor: pointer;
transition: all 0.3s ease;
}
.slider-dot.active {
background-color: rgba(0, 120, 200, 0.8);
transform: scale(1.2);
box-shadow: 0 0 10px rgba(0, 120, 200, 0.6);
}
/* Project Cards */
.project-card {
flex: 0 0 100%;
background-color: rgba(13, 39, 80, 0.3);
border-radius: 10px;
overflow: hidden;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
backdrop-filter: blur(5px);
border: 1px solid rgba(0, 120, 200, 0.2);
display: flex;
flex-direction: column;
cursor: pointer;
transition: all 0.3s ease;
padding-bottom: 20px;
}
.project-card:hover {
transform: translateY(-5px);
background-color: rgba(13, 39, 80, 0.4);
box-shadow: 0 8px 20px rgba(0, 120, 200, 0.3);
}
.card-header {
padding: 20px;
border-bottom: 1px solid rgba(0, 120, 200, 0.2);
text-align: center;
}
.card-header h3 {
margin: 0;
font-size: 1.4rem;
margin-bottom: 8px;
color: #fff;
text-shadow: 0 0 5px rgba(0, 120, 200, 0.4);
}
.course-name {
font-style: italic;
font-size: 0.9rem;
opacity: 0.8;
margin-bottom: 10px;
}
.card-date {
display: inline-block;
padding: 4px 12px;
font-size: 0.8rem;
background-color: rgba(0, 120, 200, 0.2);
border-radius: 20px;
margin-top: 5px;
}
.card-body {
padding: 20px;
flex: 1;
}
.card-body p {
font-size: 0.95rem;
line-height: 1.6;
opacity: 0.9;
margin-bottom: 20px;
}
.tech-tags {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 15px;
justify-content: center;
}
.tech-tag {
padding: 5px 12px;
background-color: rgba(0, 120, 200, 0.2);
border-radius: 30px;
font-size: 0.8rem;
}
.card-footer {
padding: 0 20px;
display: flex;
justify-content: center;
gap: 15px;
}
.view-button {
padding: 8px 24px;
font-size: 0.9rem;
background-color: rgba(0, 120, 200, 0.2);
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
display: inline-block;
}
.view-button:hover {
background-color: rgba(0, 120, 200, 0.4);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 120, 200, 0.3);
}
.source-button {
padding: 8px 24px;
font-size: 0.9rem;
background-color: rgba(255, 255, 255, 0.1);
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
display: inline-block;
}
.source-button:hover {
background-color: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
}
/* Project Details */
.project-details {
max-height: 0;
overflow: hidden;
opacity: 0;
transition: all 0.5s ease;
background-color: rgba(13, 39, 80, 0.3);
border-radius: 10px;
margin-top: 10px;
position: relative;
backdrop-filter: blur(5px);
border: 1px solid rgba(0, 120, 200, 0.2);
}
.project-details.active {
max-height: 1500px;
opacity: 1;
padding: 30px;
margin: 20px 0 40px;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}
.project-details h2 {
text-align: center;
margin-bottom: 30px;
position: relative;
padding-bottom: 15px;
color: #fff;
text-shadow: 0 0 10px rgba(0, 120, 200, 0.6);
}
.project-details h2::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 80px;
height: 3px;
background-color: rgba(0, 120, 200, 0.8);
border-radius: 3px;
box-shadow: 0 0 10px rgba(0, 120, 200, 0.6);
}
/* Child cards for Data Visualization */
.child-cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 20px;
margin-bottom: 20px;
}
.child-card {
background-color: rgba(13, 39, 80, 0.3);
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
height: 100%;
display: flex;
flex-direction: column;
border: 1px solid rgba(0, 120, 200, 0.2);
}
.child-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 15px rgba(0, 120, 200, 0.3);
}
.child-card img {
width: 100%;
height: 180px;
object-fit: cover;
object-position: center;
transition: all 0.3s ease;
}
.child-card:hover img {
transform: scale(1.05);
}
.child-card-content {
padding: 15px;
flex: 1;
display: flex;
flex-direction: column;
}
.child-card-content h4 {
margin-top: 0;
margin-bottom: 10px;
font-size: 1rem;
color: #fff;
text-shadow: 0 0 5px rgba(0, 120, 200, 0.4);
}
.child-card-content p {
font-size: 0.85rem;
opacity: 0.9;
margin-bottom: 15px;
line-height: 1.4;
flex: 1;
}
.code-link {
display: inline-block;
font-size: 0.8rem;
padding: 6px 12px;
background-color: rgba(0, 120, 200, 0.2);
color: #fff;
text-decoration: none;
border-radius: 4px;
transition: all 0.3s ease;
text-align: center;
margin-top: auto;
}
.code-link:hover {
background-color: rgba(0, 120, 200, 0.4);
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 120, 200, 0.3);
}
/* Game video container */
.game-container {
width: 100%;
margin: 0 auto 30px;
text-align: center;
}
.game-video {
width: 100%;
max-width: 800px;
border-radius: 8px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
border: 1px solid rgba(0, 120, 200, 0.3);
}
.game-description {
margin: 20px auto;
max-width: 800px;
padding: 0 15px;
text-align: center;
font-size: 0.95rem;
line-height: 1.6;
opacity: 0.9;
}
.back-button {
display: inline-block;
margin-top: 30px;
padding: 10px 20px;
background-color: rgba(0, 120, 200, 0.2);
border-radius: 4px;
font-size: 0.9rem;
transition: all 0.3s ease;
text-decoration: none;
color: #fff;
}
.back-button:hover {
background-color: rgba(0, 120, 200, 0.4);
transform: translateX(-5px);
box-shadow: 0 4px 12px rgba(0, 120, 200, 0.3);
}
/* Animations */
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(50px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.child-card {
animation: slideIn 0.5s ease forwards;
opacity: 0;
}
.child-card:nth-child(1) { animation-delay: 0.1s; }
.child-card:nth-child(2) { animation-delay: 0.2s; }
.child-card:nth-child(3) { animation-delay: 0.3s; }
.child-card:nth-child(4) { animation-delay: 0.4s; }
/* Responsive */
@media (max-width: 768px) {
.child-cards {
grid-template-columns: 1fr;
}
.card-header h3 {
font-size: 1.2rem;
}
.project-details.active {
padding: 20px;
}
.card-footer {
flex-direction: column;
gap: 10px;
}
}
</style>
</head>
<body>
<!-- Circuit Background -->
<div class="background-animation">
<div class="tech-overlay"></div>
<div class="circuit-lines">
<div class="circuit-line"></div>
<div class="circuit-line"></div>
<div class="circuit-line"></div>
<div class="circuit-line"></div>
<div class="circuit-line"></div>
<div class="circuit-line"></div>
<div class="circuit-line"></div>
<div class="circuit-line"></div>
<div class="circuit-dot"></div>
<div class="circuit-dot"></div>
<div class="circuit-dot"></div>
<div class="circuit-dot"></div>
<div class="circuit-dot"></div>
<div class="circuit-dot"></div>
<div class="circuit-branch"></div>
<div class="circuit-branch"></div>
<div class="circuit-branch"></div>
</div>
</div>
<div class="container">
<h1 class="page-title">Course Projects</h1>
<div class="projects-slider">
<div class="slider-container">
<!-- Data Visualization Project -->
<div class="project-card" data-project="data-viz">
<div class="card-header">
<h3>Data Visualization Project</h3>
<div class="course-name">COMP 4304 - Data Visualization</div>
<div class="card-date">February 2025</div>
</div>
<div class="card-body">
<p>Created multiple interactive and static visualizations to analyze complex datasets, demonstrating effective techniques for conveying data insights through visual representations. This project focused on making data more accessible and understandable through proper visual encoding techniques.</p>
<div class="tech-tags">
<span class="tech-tag">Python</span>
<span class="tech-tag">Matplotlib</span>
<span class="tech-tag">Pandas</span>
<span class="tech-tag">Numpy</span>
<span class="tech-tag">Plotly</span>
</div>
</div>
<div class="card-footer">
<button class="view-button" onclick="toggleProject('data-viz')">View Visualizations</button>
</div>
</div>
<!-- Four Board Game Project -->
<div class="project-card" data-project="four-game">
<div class="card-header">
<h3>Four Board Game</h3>
<div class="course-name">COMP 2005 - Software Development</div>
<div class="card-date">September 2024</div>
</div>
<div class="card-body">
<p>Developed a board game using Java Swing for the GUI by collaborating with a team. Implemented game logic, UI design, and turn-based multiplayer along with colour blind friendly functionalities. The game includes features such as game history, and customizable appearance.</p>
<div class="tech-tags">
<span class="tech-tag">Java</span>
<span class="tech-tag">Java Swing</span>
<span class="tech-tag">Game Dev</span>
<span class="tech-tag">UI Design</span>
</div>
</div>
<div class="card-footer">
<button class="view-button" onclick="toggleProject('four-game')">Watch Gameplay</button>
</div>
</div>
</div>
<div class="slider-controls">
<button class="slider-btn prev-btn">Previous</button>
<button class="slider-btn next-btn">Next</button>
</div>
<div class="slider-dots">
<div class="slider-dot active"></div>
<div class="slider-dot"></div>
</div>
</div>
<!-- Data Visualization Project Details -->
<div id="data-viz-details" class="project-details">
<h2>Data Visualization Techniques</h2>
<div class="child-cards">
<div class="child-card">
<img src="radial_design.png" alt="Network Graph Visualization">
<div class="child-card-content">
<h4>The Baby Spike</h4>
<p>This visualization shows the average number of babies born per minute in the USA for the year 2014.( A recreation of Nadieh Bremer and Zan Armstrong's plot )</p>
<a href="Assignment5.ipynb" class="code-link">See Code
</a>
</div>
</div>
<div class="child-card">
<img src="grid.png" alt="Time Series Visualization">
<div class="child-card-content">
<h4>Waffle Chart</h4>
<p>This Visualization shows waffle per occupation, each of which show the gender breakdown of images generated for that occupation.</p>
<a href="Assignment3.ipynb" class="code-link">See Code</a>
</div>
</div>
<div class="child-card">
<img src="alluvial.png" alt="Geospatial Data Visualization">
<div class="child-card-content">
<h4>Sankey Diagram (Alluvial)</h4>
<p>Alluvial Diagram showing migration of people from one country to another</p>
<a href="alluv.ipynb" class="code-link">See Code</a>
</div>
</div>
<div class="child-card">
<img src="space.png" alt="Multivariate Data Visualization">
<div class="child-card-content">
<h4>The Growing Crisis of Space Debris</h4>
<p>A digital platform unveiling the escalating crisis of orbital debris, featuring compelling visualizations and interactive dashboards that illustrate the growing menace of space junk and its profound implications for future space exploration.</p>
<a href="https://spacejunk.fun/" class="code-link">See website</a>
</div>
</div>
</div>
</div>
<!-- Four Board Game Details -->
<div id="four-game-details" class="project-details">
<h2>Four Board Game Gameplay</h2>
<div class="game-container">
<video class="game-video" controls>
<source src="four.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<p class="game-description">
This Java-based board game implements a Tetris style gameplay with a custom user interface.
Players take turns choosing a piece and placing it on the board, while maintaining the game constraints.
</p>
</div>
</div>
<a href="index.html" class="back-button">← Back to Portfolio</a>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Slider functionality
const sliderContainer = document.querySelector('.slider-container');
const slides = document.querySelectorAll('.project-card');
const prevBtn = document.querySelector('.prev-btn');
const nextBtn = document.querySelector('.next-btn');
const dots = document.querySelectorAll('.slider-dot');
let currentIndex = 0;
const slideWidth = 100; // 100%
// Set initial position
updateSlider();
// Previous button click
prevBtn.addEventListener('click', function() {
if (currentIndex > 0) {
// Close any open project details
hideAllProjectDetails();
currentIndex--;
updateSlider();
}
});
// Next button click
nextBtn.addEventListener('click', function() {
if (currentIndex < slides.length - 1) {
// Close any open project details
hideAllProjectDetails();
currentIndex++;
updateSlider();
}
});
// Dot navigation
dots.forEach((dot, index) => {
dot.addEventListener('click', function() {
// Close any open project details
hideAllProjectDetails();
currentIndex = index;
updateSlider();
});
});
function updateSlider() {
// Update slider position
sliderContainer.style.transform = `translateX(-${currentIndex * slideWidth}%)`;
// Update dots
dots.forEach((dot, index) => {
if (index === currentIndex) {
dot.classList.add('active');
} else {
dot.classList.remove('active');
}
});
// Update buttons
prevBtn.disabled = currentIndex === 0;
nextBtn.disabled = currentIndex === slides.length - 1;
// Update button opacity based on state
prevBtn.style.opacity = currentIndex === 0 ? '0.5' : '1';
nextBtn.style.opacity = currentIndex === slides.length - 1 ? '0.5' : '1';
}
// Initialize project details as closed
const projectDetails = document.querySelectorAll('.project-details');
projectDetails.forEach(detail => {
detail.classList.remove('active');
});
// Function to hide all project details
window.hideAllProjectDetails = function() {
const allDetails = document.querySelectorAll('.project-details');
allDetails.forEach(detail => {
detail.classList.remove('active');
});
};
});
// Toggle project details
function toggleProject(projectId) {
const detailsElement = document.getElementById(projectId + '-details');
// Close all other project details
const allDetails = document.querySelectorAll('.project-details');
allDetails.forEach(detail => {
if (detail.id !== projectId + '-details') {
detail.classList.remove('active');
}
});
// Toggle the clicked project details
if (detailsElement) {
detailsElement.classList.toggle('active');
// Scroll to the details if it's now active
if (detailsElement.classList.contains('active')) {
setTimeout(() => {
detailsElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
}, 300);
}
}
}
</script>
</body>
</html>