Repository navigation
Expand file tree
/
Copy pathscript.js
More file actions
949 lines (850 loc) · 54.9 KB
/
Copy pathscript.js
File metadata and controls
949 lines (850 loc) · 54.9 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
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
/* ==========================================================================
Abdulah Eren İynemli — Portfolio
script.js — i18n engine, navigation, content rendering, project modal
========================================================================== */
(function () {
'use strict';
/* ------------------------------------------------------------------------
1. TRANSLATIONS
Edit the strings below to change any visible text on the site.
Keys map to elements with a matching data-i18n="key" attribute in
index.html, and are also used directly by the render functions below.
------------------------------------------------------------------------ */
var TRANSLATIONS = {
en: {
'a11y.skipToContent': 'Skip to content',
'nav.home': 'Home',
'nav.about': 'About',
'nav.solutions': 'Solutions',
'nav.projects': 'Projects',
'nav.experience': 'Experience',
'nav.skills': 'Skills',
'nav.contact': 'Contact',
'nav.emailBtn': 'Email',
'hero.badge': 'Available for projects and collaborations',
'hero.role': 'Electrical & Electronics Engineer',
'hero.headline': 'Engineering ideas into working systems.',
'hero.focus': 'Embedded Systems · Robotics · PCB Design · Software · IoT',
'hero.description': 'I design and build integrated engineering solutions that connect electronics, embedded software and mechanical production — from early concept to a working, testable system.',
'hero.btnSolutions': 'Explore Solutions',
'hero.btnProjects': 'View Projects',
'hero.btnEmail': 'Send Email',
'about.kicker': 'About',
'about.title': 'Combining electronics, software and mechanical production',
'about.p1': 'I am an electrical and electronics engineer working across embedded systems, robotics, PCB design and software development. My work generally starts with a real technical need and moves toward a functioning prototype — combining analog and digital electronics, embedded C/C++, control systems and, when useful, artificial intelligence–supported methods.',
'about.p2': 'I design circuits and PCBs, develop embedded firmware, build web and software interfaces, and integrate IoT connectivity and communication systems. Where a project needs a physical structure, I use CAD, 3D design and 3D printing for rapid prototyping and mechanical production.',
'about.p3': 'I have worked on robotics projects including ROS 2–based mobile robots and a competition combat robot, contributed to automation and product-development work, and volunteered as a researcher on a TÜBİTAK-supported project. Alongside project work, I have experience teaching electronics and robotics, which keeps my explanations of technical systems practical and clear.',
'about.point1': 'Hardware + software + mechanical integration',
'about.point2': 'Rapid, testable prototyping',
'about.point3': 'Embedded systems and control',
'about.point4': 'Practical, education-informed communication',
'services.kicker': 'Engineering Services',
'services.title': 'Solutions and Engineering Services',
'services.intro': 'Solutions can be developed as standalone software products or as integrated systems combining electronics, embedded software, web interfaces and physical prototypes.',
'projects.kicker': 'Portfolio',
'projects.title': 'Featured Projects',
'projects.intro': 'A selection of engineering projects spanning robotics, embedded electronics, analog design, research and software.',
'projects.detailsBtn': 'Details',
'projects.modal.technologies': 'Technologies',
'projects.modal.responsibilities': 'Responsibilities',
'experience.kicker': 'Experience',
'experience.title': 'Experience',
'skills.kicker': 'Technical Skills',
'skills.title': 'Technical Skills',
'process.kicker': 'How I Work',
'process.title': 'Working Process',
'education.kicker': 'Education & Development',
'education.title': 'Education and Continuous Development',
'education.p1': 'My background is in Electrical and Electronics Engineering, and I continue to build on that foundation through hands-on, project-based learning in embedded systems, robotics, PCB design, automation and software.',
'education.p2': 'I regularly work with new tools and methods — including ROS 2, artificial intelligence–supported engineering approaches and modern development practices — and apply them directly to real projects rather than only in theory. I also have experience delivering technical training in electronics and robotics.',
'contact.kicker': 'Contact',
'contact.title': "Let's Talk About Your Project",
'contact.description': 'For engineering, software or product development inquiries, reach out by email.',
'contact.emailLabel': 'Email',
'contact.locationLabel': 'Location',
'contact.btnSendEmail': 'Send Email',
'contact.btnCopyEmail': 'Copy Email',
'contact.copied': 'Email copied to clipboard',
'contact.copyFailed': 'Could not copy — please copy the email manually',
'footer.role': 'Electrical & Electronics Engineer',
'footer.closing': 'Thank you for visiting — always open to discussing new engineering ideas.',
'modal.closeLabel': 'Close project details',
'nav.toggleOpen': 'Open navigation menu',
'nav.toggleClose': 'Close navigation menu',
'nav.primaryLabel': 'Primary',
'nav.brandLabel': 'Abdulah Eren İynemli — Home',
'nav.langSwitchLabel': 'Language switch',
'projects.filterGroupLabel': 'Filter projects by category',
'a11y.scrollToTop': 'Scroll to top'
},
tr: {
'a11y.skipToContent': 'İçeriğe geç',
'nav.home': 'Ana Sayfa',
'nav.about': 'Hakkımda',
'nav.solutions': 'Çözümler',
'nav.projects': 'Projeler',
'nav.experience': 'Deneyim',
'nav.skills': 'Yetenekler',
'nav.contact': 'İletişim',
'nav.emailBtn': 'E-posta',
'hero.badge': 'Proje ve iş birliklerine açık',
'hero.role': 'Elektrik-Elektronik Mühendisi',
'hero.headline': 'Mühendislik fikirlerini çalışan sistemlere dönüştürüyorum.',
'hero.focus': 'Gömülü Sistemler · Robotik · PCB Tasarımı · Yazılım · IoT',
'hero.description': 'Elektronik, gömülü yazılım ve mekanik üretimi bir araya getiren entegre mühendislik çözümleri tasarlıyor ve geliştiriyorum — ilk fikirden çalışan, test edilebilir bir sisteme kadar.',
'hero.btnSolutions': 'Çözümleri İncele',
'hero.btnProjects': 'Projeleri Gör',
'hero.btnEmail': 'E-posta Gönder',
'about.kicker': 'Hakkımda',
'about.title': 'Elektronik, yazılım ve mekanik üretimi bir araya getiriyorum',
'about.p1': 'Gömülü sistemler, robotik, PCB tasarımı ve yazılım geliştirme alanlarında çalışan bir elektrik-elektronik mühendisiyim. Çalışmalarım genellikle gerçek bir teknik ihtiyaçla başlar ve analog-dijital elektronik, gömülü C/C++, kontrol sistemleri ile gerektiğinde yapay zekâ destekli yöntemleri bir araya getirerek çalışan bir prototipe doğru ilerler.',
'about.p2': 'Devre ve PCB tasarımı yapıyor, gömülü yazılım geliştiriyor, web ve yazılım arayüzleri kuruyor; IoT bağlantısını ve haberleşme sistemlerini entegre ediyorum. Bir projenin fiziksel bir yapıya ihtiyaç duyduğu durumlarda, hızlı prototipleme ve mekanik üretim için CAD, 3D tasarım ve 3D baskı kullanıyorum.',
'about.p3': 'ROS 2 tabanlı mobil robotlar ve bir yarışma dövüş robotu dahil olmak üzere robotik projelerinde çalıştım, otomasyon ve ürün geliştirme çalışmalarına katkı sağladım ve TÜBİTAK destekli bir projede gönüllü araştırmacı olarak görev aldım. Proje çalışmalarımın yanında elektronik ve robotik alanında eğitim verme deneyimim de var; bu da teknik konuları anlatırken pratik ve anlaşılır olmamı sağlıyor.',
'about.point1': 'Donanım + yazılım + mekanik entegrasyonu',
'about.point2': 'Hızlı, test edilebilir prototipleme',
'about.point3': 'Gömülü sistemler ve kontrol',
'about.point4': 'Pratik, eğitim deneyimiyle şekillenen anlatım',
'services.kicker': 'Mühendislik Hizmetleri',
'services.title': 'Çözümler ve Mühendislik Hizmetleri',
'services.intro': 'Çözümler yalnızca yazılım olarak veya elektronik, gömülü yazılım, web arayüzleri ve fiziksel prototipleri bir araya getiren entegre sistemler şeklinde geliştirilebilir.',
'projects.kicker': 'Portföy',
'projects.title': 'Öne Çıkan Projeler',
'projects.intro': 'Robotik, gömülü elektronik, analog tasarım, araştırma ve yazılım alanlarını kapsayan seçilmiş mühendislik projeleri.',
'projects.detailsBtn': 'Detaylar',
'projects.modal.technologies': 'Teknolojiler',
'projects.modal.responsibilities': 'Sorumluluklar',
'experience.kicker': 'Deneyim',
'experience.title': 'Deneyim',
'skills.kicker': 'Teknik Yetenekler',
'skills.title': 'Teknik Yetenekler',
'process.kicker': 'Çalışma Şeklim',
'process.title': 'Çalışma Süreci',
'education.kicker': 'Eğitim ve Gelişim',
'education.title': 'Eğitim ve Sürekli Gelişim',
'education.p1': 'Eğitim geçmişim Elektrik-Elektronik Mühendisliği üzerine; gömülü sistemler, robotik, PCB tasarımı, otomasyon ve yazılım alanlarında uygulamalı, proje tabanlı öğrenmeyle bu temeli geliştirmeye devam ediyorum.',
'education.p2': 'ROS 2, yapay zekâ destekli mühendislik yaklaşımları ve güncel geliştirme pratikleri gibi yeni araç ve yöntemlerle düzenli olarak çalışıyor, bunları yalnızca teoride değil doğrudan gerçek projelerde uyguluyorum. Ayrıca elektronik ve robotik alanında teknik eğitim verme deneyimim bulunuyor.',
'contact.kicker': 'İletişim',
'contact.title': 'Projeniz Hakkında Konuşalım',
'contact.description': 'Mühendislik, yazılım veya ürün geliştirme talepleriniz için e-posta yoluyla ulaşabilirsiniz.',
'contact.emailLabel': 'E-posta',
'contact.locationLabel': 'Konum',
'contact.btnSendEmail': 'E-posta Gönder',
'contact.btnCopyEmail': 'E-postayı Kopyala',
'contact.copied': 'E-posta panoya kopyalandı',
'contact.copyFailed': 'Kopyalanamadı — lütfen e-postayı elle kopyalayın',
'footer.role': 'Elektrik-Elektronik Mühendisi',
'footer.closing': 'Ziyaretiniz için teşekkürler — yeni mühendislik fikirlerini konuşmaya her zaman açığım.',
'modal.closeLabel': 'Proje detaylarını kapat',
'nav.toggleOpen': 'Gezinme menüsünü aç',
'nav.toggleClose': 'Gezinme menüsünü kapat',
'nav.primaryLabel': 'Birincil gezinme',
'nav.brandLabel': 'Abdulah Eren İynemli — Ana Sayfa',
'nav.langSwitchLabel': 'Dil seçimi',
'projects.filterGroupLabel': 'Projeleri kategoriye göre filtrele',
'a11y.scrollToTop': 'Yukarı kaydır'
}
};
/* ------------------------------------------------------------------------
2. ICON LIBRARY (inline SVG strings, 24x24, currentColor stroke)
------------------------------------------------------------------------ */
var ICONS = {
web: '<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="4.5" width="18" height="15" rx="2" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="M3 8.5h18" stroke="currentColor" stroke-width="1.6"/><circle cx="6" cy="6.5" r="0.7" fill="currentColor"/><circle cx="8.4" cy="6.5" r="0.7" fill="currentColor"/><path d="m9.5 12-2 2 2 2M14.5 12l2 2-2 2" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>',
software: '<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="2" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="m6.5 9 3 3-3 3" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.5 15h5" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>',
app: '<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="6.5" y="2.5" width="11" height="19" rx="2.2" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="M10.6 18.3h2.8" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/><rect x="9" y="6" width="6" height="4.2" rx="0.6" fill="none" stroke="currentColor" stroke-width="1.4"/></svg>',
pcb: '<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="4" width="16" height="16" rx="1.6" fill="none" stroke="currentColor" stroke-width="1.6"/><rect x="9.5" y="9.5" width="5" height="5" rx="0.6" fill="none" stroke="currentColor" stroke-width="1.4"/><path d="M4 8h3M4 13h3M4 17h3M20 8h-3M20 13h-3M20 17h-3M8 4v3M13 4v3M17 4v3M8 20v-3M13 20v-3M17 20v-3" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/></svg>',
analog: '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M2.5 13h3l2-6 3 12 2-9 1.5 3h7.5" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>',
robotics: '<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="9" width="14" height="10" rx="2.4" fill="none" stroke="currentColor" stroke-width="1.6"/><circle cx="9.5" cy="14" r="1.3" fill="currentColor"/><circle cx="14.5" cy="14" r="1.3" fill="currentColor"/><path d="M12 9V6M12 6c-1.3 0-2.2-.9-2.2-2.1S10.7 1.8 12 1.8s2.2.9 2.2 2.1S13.3 6 12 6Z" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M3.5 12v4M20.5 12v4" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>',
iot: '<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="2" fill="currentColor"/><path d="M8.3 15.7a5.2 5.2 0 0 1 0-7.4M15.7 8.3a5.2 5.2 0 0 1 0 7.4M5.6 18.4a9.3 9.3 0 0 1 0-12.8M18.4 5.6a9.3 9.3 0 0 1 0 12.8" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',
comm: '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3v7" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/><path d="M7 6.5 12 10l5-3.5" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/><circle cx="12" cy="10" r="1.4" fill="currentColor"/><path d="M4 21c1.2-4 4-6 8-6s6.8 2 8 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',
automation: '<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="9" cy="9" r="3.3" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="M9 3.7V2M9 16v-1.7M3.7 9H2M16 9h-1.7M4.9 4.9l1.2 1.2M12 12l1.2 1.2M4.9 13.1l1.2-1.2M12 6l1.2-1.2" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/><path d="M14 16h7M18.5 12.5v7" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>',
education: '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M2 8.5 12 4l10 4.5-10 4.5-10-4.5Z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M6 11v4.5c0 1.4 2.7 2.5 6 2.5s6-1.1 6-2.5V11" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M21 9.5v5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',
prototyping: '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2.5 20.5 7v10L12 21.5 3.5 17V7Z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M3.5 7 12 11.5 20.5 7M12 11.5V21.5" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></svg>',
product: '<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="3.5" width="16" height="5" rx="1.4" fill="none" stroke="currentColor" stroke-width="1.5"/><rect x="4" y="9.5" width="16" height="5" rx="1.4" fill="none" stroke="currentColor" stroke-width="1.5"/><rect x="4" y="15.5" width="16" height="5" rx="1.4" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>',
processUnderstand: '<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="6.5" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="m20 20-4.3-4.3" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>',
processDesign: '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3.5 20.5 8 19l10-10-4.5-4.5-10 10Z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="m13.5 4.5 4.5 4.5" stroke="currentColor" stroke-width="1.5"/></svg>',
processPrototype: '<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="4" width="16" height="16" rx="2" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="M8.5 12h7M12 8.5v7" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>',
processImprove: '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 12a8 8 0 0 1 13.7-5.7L20 8.5M20 12a8 8 0 0 1-13.7 5.7L4 15.5" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/><path d="M20 4v4.5h-4.5M4 20v-4.5h4.5" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>',
email: '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 6h18v12H3z" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="m3 7 9 6 9-6" fill="none" stroke="currentColor" stroke-width="1.6"/></svg>',
location: '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 22s7-7.58 7-12.5A7 7 0 0 0 5 9.5C5 14.42 12 22 12 22Z" fill="none" stroke="currentColor" stroke-width="1.6"/><circle cx="12" cy="9.5" r="2.6" fill="none" stroke="currentColor" stroke-width="1.6"/></svg>'
};
/* ------------------------------------------------------------------------
3. SERVICES DATA
To add or edit a service card, edit this array. `icon` refers to a key
in the ICONS object above.
------------------------------------------------------------------------ */
var SERVICES = [
{ icon: 'web', en: { title: 'Web Solutions', desc: 'Responsive, fast and maintainable websites designed for portfolios, businesses, products and technical projects.' }, tr: { title: 'Web Çözümleri', desc: 'Portföyler, işletmeler, ürünler ve teknik projeler için hızlı, responsive ve sürdürülebilir web siteleri.' } },
{ icon: 'software', en: { title: 'Software Solutions', desc: 'Custom software tools, management panels, automation interfaces and engineering-oriented desktop or web solutions.' }, tr: { title: 'Yazılım Çözümleri', desc: 'İhtiyaca özel yazılım araçları, yönetim panelleri, otomasyon arayüzleri ve mühendislik odaklı masaüstü veya web çözümleri.' } },
{ icon: 'app', en: { title: 'Application Development', desc: 'User-focused application prototypes and functional digital products developed according to project requirements.' }, tr: { title: 'Uygulama Geliştirme', desc: 'Proje ihtiyaçlarına göre geliştirilen kullanıcı odaklı uygulama prototipleri ve işlevsel dijital ürünler.' } },
{ icon: 'pcb', en: { title: 'PCB Design', desc: 'Schematic design, component selection, PCB layout, prototyping and production-ready electronic board development.' }, tr: { title: 'PCB Tasarımı', desc: 'Şematik tasarım, komponent seçimi, PCB yerleşimi, prototipleme ve üretime uygun elektronik kart geliştirme.' } },
{ icon: 'analog', en: { title: 'Analog and Digital Electronics', desc: 'Analog front-end circuits, sensor interfaces, filtering, amplification, digital control and mixed-signal system design.' }, tr: { title: 'Analog ve Dijital Elektronik', desc: 'Analog ön uç devreleri, sensör arayüzleri, filtreleme, yükseltme, dijital kontrol ve karma sinyal sistem tasarımı.' } },
{ icon: 'robotics', en: { title: 'Robotics Solutions', desc: 'Mobile robots, competition robots, motor control, sensors, embedded control and ROS 2 based robotic systems.' }, tr: { title: 'Robotik Çözümler', desc: 'Mobil robotlar, yarışma robotları, motor kontrolü, sensörler, gömülü kontrol ve ROS 2 tabanlı robotik sistemler.' } },
{ icon: 'iot', en: { title: 'IoT Solutions', desc: 'Connected devices, remote monitoring, sensor data collection, device control and hardware-software integration.' }, tr: { title: 'IoT Çözümleri', desc: 'Bağlantılı cihazlar, uzaktan izleme, sensör verisi toplama, cihaz kontrolü ve donanım-yazılım entegrasyonu.' } },
{ icon: 'comm', en: { title: 'Communication Systems', desc: 'Wireless and wired communication solutions using technologies such as Wi-Fi, Bluetooth, serial communication and embedded protocols.' }, tr: { title: 'Haberleşme Sistemleri', desc: 'Wi-Fi, Bluetooth, seri haberleşme ve gömülü protokoller gibi teknolojilerle kablolu ve kablosuz haberleşme çözümleri.' } },
{ icon: 'automation', en: { title: 'Automation Solutions', desc: 'Control interfaces, monitoring systems, workflow automation and integrated solutions for physical processes.' }, tr: { title: 'Otomasyon Çözümleri', desc: 'Kontrol arayüzleri, izleme sistemleri, iş akışı otomasyonu ve fiziksel süreçler için entegre çözümler.' } },
{ icon: 'education', en: { title: 'Electronics and Robotics Education', desc: 'Practical electronics, programming, robotics and project development education for different age and experience levels.' }, tr: { title: 'Elektronik ve Robotik Eğitimi', desc: 'Farklı yaş ve deneyim seviyelerine yönelik uygulamalı elektronik, programlama, robotik ve proje geliştirme eğitimleri.' } },
{ icon: 'prototyping', en: { title: 'Rapid Prototyping', desc: 'Fast conversion of concepts into testable prototypes using electronics, embedded software, CAD and 3D printing.' }, tr: { title: 'Hızlı Prototipleme', desc: 'Elektronik, gömülü yazılım, CAD ve 3D baskı kullanılarak fikirlerin hızlı biçimde test edilebilir prototiplere dönüştürülmesi.' } },
{ icon: 'product', en: { title: 'Integrated Product Development', desc: 'End-to-end development that combines electronics, software, mechanical design and product presentation.' }, tr: { title: 'Entegre Ürün Geliştirme', desc: 'Elektronik, yazılım, mekanik tasarım ve ürün sunumunu bir araya getiren uçtan uca geliştirme süreci.' } }
];
/* ------------------------------------------------------------------------
4. PROJECT CATEGORIES + PROJECTS DATA
`url` / `videoUrl` are intentionally left null. See TODO below for how
to attach real links once they exist — no disabled buttons are shown
until then.
------------------------------------------------------------------------ */
var CATEGORIES = [
{ key: 'all', en: 'All', tr: 'Tümü' },
{ key: 'robotics', en: 'Robotics', tr: 'Robotik' },
{ key: 'embedded', en: 'Embedded', tr: 'Gömülü Sistemler' },
{ key: 'electronics', en: 'Electronics', tr: 'Elektronik' },
{ key: 'software', en: 'Software', tr: 'Yazılım' },
{ key: 'research', en: 'Research', tr: 'Araştırma' },
{ key: 'commercial', en: 'Commercial Systems', tr: 'Ticari Sistemler' },
{ key: 'iot', en: 'IoT', tr: 'IoT' }
];
// TODO: Once real project URLs exist, add them here, e.g.:
// url: 'https://github.com/username/repo', videoUrl: 'https://youtube.com/...'
// The project modal will only render a link/button if the value is non-null.
var PROJECTS = [
{
id: 'combat-robot',
image: 'assets/images/combat-robot.svg',
categories: ['robotics', 'embedded'],
technologies: ['STM32', 'ESP32', 'Motor Control', 'Embedded C/C++', 'CAD', '3D Printing'],
url: null,
videoUrl: null,
en: {
title: '13 kg Combat Robot',
description: 'A competition combat robot involving mechanical design, embedded electronics, motor control, system integration and rapid prototyping.',
responsibilities: ['Mechanical chassis and weapon design', 'Embedded control and motor driver integration', 'System-level testing and iteration', 'Rapid prototyping with CAD and 3D printing']
},
tr: {
title: '13 kg Dövüş Robotu',
description: 'Mekanik tasarım, gömülü elektronik, motor kontrolü, sistem entegrasyonu ve hızlı prototipleme süreçlerini içeren yarışma robotu.',
responsibilities: ['Mekanik şasi ve silah tasarımı', 'Gömülü kontrol ve motor sürücü entegrasyonu', 'Sistem düzeyinde test ve iyileştirme', 'CAD ve 3D baskı ile hızlı prototipleme']
}
},
{
id: 'cafe-system',
image: 'assets/images/cafe-system.svg',
categories: ['commercial', 'iot', 'embedded'],
technologies: ['ESP32', 'IoT', 'Embedded Systems', 'Web Interface', 'Product Design'],
url: null,
videoUrl: null,
en: {
title: 'Smart Café Service System',
description: 'An integrated hardware and software solution that allows customers at difficult-to-see tables to request service while helping staff manage requests efficiently.',
responsibilities: ['Wireless call-button hardware design', 'ESP32 firmware and connectivity', 'Staff-facing request web interface', 'Enclosure and product design']
},
tr: {
title: 'Akıllı Kafe Servis Sistemi',
description: 'Görülmesi zor masalardaki müşterilerin servis talebi oluşturmasını ve personelin talepleri verimli şekilde yönetmesini sağlayan entegre donanım ve yazılım çözümü.',
responsibilities: ['Kablosuz çağrı butonu donanım tasarımı', 'ESP32 yazılımı ve bağlantı geliştirme', 'Personel için talep yönetim web arayüzü', 'Kutu ve ürün tasarımı']
}
},
{
id: 'potentiostat',
image: 'assets/images/potentiostat.svg',
categories: ['electronics', 'research'],
technologies: ['Analog Electronics', 'PCB Design', 'OPA4376', 'KiCad', 'Signal Processing'],
url: null,
videoUrl: null,
en: {
title: 'CGM Potentiostat and Analog Front-End',
description: 'A three-electrode amperometric measurement system including potentiostat control, transimpedance amplification, signal conditioning, filtering and PCB design.',
responsibilities: ['Potentiostat and transimpedance amplifier design', 'Analog signal conditioning and filtering', 'Schematic and PCB layout in KiCad', 'Bench testing and signal validation']
},
tr: {
title: 'CGM Potansiyostat ve Analog Ön Uç',
description: 'Potansiyostat kontrolü, transimpedans yükselteci, sinyal şartlandırma, filtreleme ve PCB tasarımını içeren üç elektrotlu amperometrik ölçüm sistemi.',
responsibilities: ['Potansiyostat ve transimpedans yükselteç tasarımı', 'Analog sinyal şartlandırma ve filtreleme', 'KiCad ile şematik ve PCB tasarımı', 'Test ve sinyal doğrulama çalışmaları']
}
},
{
id: 'ros-robot',
image: 'assets/images/ros-robot.svg',
categories: ['robotics', 'software'],
technologies: ['ROS 2', 'Gazebo', 'LiDAR', 'SLAM', 'Nav2', 'Python', 'C++'],
url: null,
videoUrl: null,
en: {
title: 'ROS 2 Autonomous Mobile Robot',
description: 'Development and simulation of mobile robots using LiDAR, SLAM, odometry, TF and navigation technologies.',
responsibilities: ['ROS 2 node and package development', 'SLAM and Nav2 navigation configuration', 'Gazebo simulation and testing', 'Sensor integration (LiDAR, odometry)']
},
tr: {
title: 'ROS 2 Otonom Mobil Robot',
description: 'LiDAR, SLAM, odometri, TF ve navigasyon teknolojileri kullanılarak mobil robot geliştirme ve simülasyonu.',
responsibilities: ['ROS 2 node ve paket geliştirme', 'SLAM ve Nav2 navigasyon yapılandırması', 'Gazebo simülasyonu ve testleri', 'Sensör entegrasyonu (LiDAR, odometri)']
}
},
{
id: 'gait-project',
image: 'assets/images/gait-project.svg',
categories: ['research', 'embedded', 'software'],
technologies: ['STM32', 'EMG', 'Sensor Fusion', 'Machine Learning', 'Python', 'MuJoCo'],
url: null,
videoUrl: null,
en: {
title: 'MultiFüzyon Gait',
description: 'A TÜBİTAK research project combining EMG, flex sensor and camera data for gait analysis and biped robot control research.',
responsibilities: ['EMG and flex sensor data acquisition', 'Sensor fusion and data processing', 'Embedded firmware on STM32', 'Support for biped control research in simulation']
},
tr: {
title: 'MultiFüzyon Gait',
description: 'Yürüme analizi ve iki ayaklı robot kontrolü araştırmaları için EMG, flex sensör ve kamera verilerini birleştiren TÜBİTAK araştırma projesi.',
responsibilities: ['EMG ve flex sensör veri toplama', 'Sensör füzyonu ve veri işleme', 'STM32 üzerinde gömülü yazılım geliştirme', 'Simülasyonda iki ayaklı kontrol araştırmasına destek']
}
},
{
id: 'voice-assistant',
image: 'assets/images/voice-assistant.svg',
categories: ['embedded', 'iot'],
technologies: ['ESP32-S3', 'I2S', 'Embedded C++', 'Audio Processing', 'OLED'],
url: null,
videoUrl: null,
en: {
title: 'ESP32-S3 Voice Assistant',
description: 'An embedded voice assistant prototype using an I2S microphone, speaker amplifier, OLED screen and ESP32-S3.',
responsibilities: ['ESP32-S3 firmware development', 'I2S audio input/output pipeline', 'OLED display integration', 'Hardware bring-up and testing']
},
tr: {
title: 'ESP32-S3 Sesli Asistan',
description: 'I2S mikrofon, hoparlör amplifikatörü, OLED ekran ve ESP32-S3 kullanılarak geliştirilen gömülü sesli asistan prototipi.',
responsibilities: ['ESP32-S3 üzerinde yazılım geliştirme', 'I2S ses giriş/çıkış işlem hattı', 'OLED ekran entegrasyonu', 'Donanım devreye alma ve test']
}
}
];
/* ------------------------------------------------------------------------
5. EXPERIENCE DATA
------------------------------------------------------------------------ */
var EXPERIENCE = [
{
en: { title: 'Robotics Instructor', org: 'Mucit Academy', desc: 'Teaching practical electronics, programming and robotics concepts through hands-on, project-based sessions.' },
tr: { title: 'Robotik Eğitmeni', org: 'Mucit Akademi', desc: 'Uygulamalı ve proje tabanlı derslerle pratik elektronik, programlama ve robotik kavramlarının öğretilmesi.' }
},
{
en: { title: 'TÜBİTAK Scholar & Volunteer Researcher', org: 'BİYOTAM', desc: 'Volunteer research contribution on a TÜBİTAK-supported biomedical/robotics research project, including sensor data acquisition and processing.' },
tr: { title: 'TÜBİTAK Bursiyeri ve Gönüllü Araştırmacı', org: 'BİYOTAM', desc: 'TÜBİTAK destekli bir biyomedikal/robotik araştırma projesinde sensör verisi toplama ve işleme dahil gönüllü araştırma katkısı.' }
},
{
en: { title: 'Rocket Avionics Projects', org: null, desc: 'Contribution to embedded avionics electronics and flight data systems for student rocketry projects.' },
tr: { title: 'Roket Aviyonik Projeleri', org: null, desc: 'Öğrenci roketi projelerinde gömülü aviyonik elektronik ve uçuş verisi sistemlerine katkı.' }
},
{
en: { title: 'Electric Vehicle Embedded Systems', org: null, desc: 'Development work on embedded control and monitoring systems for electric vehicle projects.' },
tr: { title: 'Elektrikli Araç Gömülü Sistemleri', org: null, desc: 'Elektrikli araç projeleri için gömülü kontrol ve izleme sistemleri geliştirme çalışmaları.' }
},
{
en: { title: 'UAV Avionics', org: null, desc: 'Embedded electronics and systems work for unmanned aerial vehicle avionics.' },
tr: { title: 'İHA Aviyonik Sistemleri', org: null, desc: 'İnsansız hava aracı aviyonik sistemleri için gömülü elektronik çalışmaları.' }
},
{
en: { title: 'Air-Defense Electronics and Control Projects', org: null, desc: 'Contribution to electronics and control system work within air-defense related student/technical projects.' },
tr: { title: 'Hava Savunma Elektroniği ve Kontrol Projeleri', org: null, desc: 'Hava savunma ile ilgili öğrenci/teknik projelerde elektronik ve kontrol sistemi çalışmalarına katkı.' }
},
{
en: { title: 'Industrial Internship', org: null, desc: 'Hands-on industrial experience covering electronics, production and engineering workflows.' },
tr: { title: 'Sanayi Stajı', org: null, desc: 'Elektronik, üretim ve mühendislik süreçlerini kapsayan uygulamalı sanayi deneyimi.' }
},
{
en: { title: 'Technical Project Development and Prototyping', org: null, desc: 'Ongoing independent development of embedded, robotics and PCB-based technical projects from concept to prototype.' },
tr: { title: 'Teknik Proje Geliştirme ve Prototipleme', org: null, desc: 'Gömülü sistem, robotik ve PCB tabanlı teknik projelerin fikirden prototipe kadar bağımsız olarak geliştirilmesi.' }
}
];
/* ------------------------------------------------------------------------
6. SKILLS DATA
------------------------------------------------------------------------ */
var SKILLS = [
{ en: 'Embedded Systems', tr: 'Gömülü Sistemler', items: ['STM32', 'ESP32', 'Arduino', 'nRF52', 'PIC', 'Embedded C', 'C++'] },
{ en: 'Electronics', tr: 'Elektronik', items: ['PCB Design', 'KiCad', 'Altium', 'Analog Electronics', 'Digital Electronics', 'Sensors', 'Motor Control', 'Power Electronics', 'Signal Conditioning', 'Measurement Systems'] },
{ en: 'Robotics & Automation', tr: 'Robotik ve Otomasyon', items: ['ROS 2', 'Gazebo', 'SLAM', 'Nav2', 'LiDAR', 'Odometry', 'Control Systems', 'Mobile Robots', 'Automation Interfaces'] },
{ en: 'Software', tr: 'Yazılım', items: ['Python', 'MATLAB', 'Git', 'GitHub', 'VS Code', 'HTML', 'CSS', 'JavaScript'] },
{ en: 'Communication & IoT', tr: 'Haberleşme ve IoT', items: ['Wi-Fi', 'Bluetooth', 'UART', 'I2C', 'SPI', 'CAN', 'MQTT', 'Embedded Communication'] },
{ en: 'Design & Production', tr: 'Tasarım ve Üretim', items: ['Fusion 360', 'CAD', '3D Printing', 'Rapid Prototyping', 'Product Development'] }
];
/* ------------------------------------------------------------------------
7. PROCESS DATA
------------------------------------------------------------------------ */
var PROCESS = [
{ icon: 'processUnderstand', en: { title: 'Understand', desc: 'Understand the need, constraints and expected outcome.' }, tr: { title: 'Anlama', desc: 'İhtiyaç, kısıtlar ve beklenen sonuç belirlenir.' } },
{ icon: 'processDesign', en: { title: 'Design', desc: 'Plan the electronics, software, interface and physical structure.' }, tr: { title: 'Tasarım', desc: 'Elektronik, yazılım, arayüz ve fiziksel yapı planlanır.' } },
{ icon: 'processPrototype', en: { title: 'Prototype', desc: 'Build and test a functional prototype.' }, tr: { title: 'Prototipleme', desc: 'Çalışan bir prototip oluşturulur ve test edilir.' } },
{ icon: 'processImprove', en: { title: 'Improve', desc: 'Evaluate results, fix problems and prepare the system for real use.' }, tr: { title: 'İyileştirme', desc: 'Sonuçlar değerlendirilir, sorunlar giderilir ve sistem gerçek kullanıma hazırlanır.' } }
];
/* ------------------------------------------------------------------------
STATE
------------------------------------------------------------------------ */
var state = {
lang: 'en',
activeFilter: 'all',
lastFocusedBeforeModal: null
};
function safeGet(fn, fallback) {
try { return fn(); } catch (e) { return fallback; }
}
function getStoredLang() {
return safeGet(function () { return localStorage.getItem('portfolio_lang'); }, null);
}
function storeLang(lang) {
safeGet(function () { localStorage.setItem('portfolio_lang', lang); return true; }, false);
}
function t(key) {
var dict = TRANSLATIONS[state.lang] || TRANSLATIONS.en;
return dict[key] !== undefined ? dict[key] : (TRANSLATIONS.en[key] || '');
}
function tField(obj) {
return obj[state.lang] || obj.en;
}
/* ------------------------------------------------------------------------
RENDER: static data-i18n text nodes
------------------------------------------------------------------------ */
function applyStaticTranslations() {
var nodes = document.querySelectorAll('[data-i18n]');
nodes.forEach(function (node) {
var key = node.getAttribute('data-i18n');
var value = t(key);
if (value) node.textContent = value;
});
document.documentElement.lang = state.lang;
document.title = state.lang === 'tr'
? 'Abdulah Eren İynemli — Elektrik-Elektronik Mühendisi'
: 'Abdulah Eren İynemli — Electrical & Electronics Engineer';
var closeBtn = document.getElementById('modalCloseBtn');
if (closeBtn) closeBtn.setAttribute('aria-label', t('modal.closeLabel'));
var primaryNav = document.getElementById('primaryNav');
if (primaryNav) primaryNav.setAttribute('aria-label', t('nav.primaryLabel'));
var brandLink = document.getElementById('brandLink');
if (brandLink) brandLink.setAttribute('aria-label', t('nav.brandLabel'));
var langSwitchGroup = document.getElementById('langSwitchGroup');
if (langSwitchGroup) langSwitchGroup.setAttribute('aria-label', t('nav.langSwitchLabel'));
var filterGroup = document.getElementById('projectFilters');
if (filterGroup) filterGroup.setAttribute('aria-label', t('projects.filterGroupLabel'));
var scrollTopBtn = document.getElementById('scrollTopBtn');
if (scrollTopBtn) scrollTopBtn.setAttribute('aria-label', t('a11y.scrollToTop'));
}
/* ------------------------------------------------------------------------
RENDER: services
------------------------------------------------------------------------ */
function renderServices() {
var grid = document.getElementById('servicesGrid');
grid.innerHTML = '';
SERVICES.forEach(function (svc) {
var content = tField(svc);
var card = document.createElement('article');
card.className = 'service-card reveal';
card.innerHTML =
'<span class="service-icon">' + (ICONS[svc.icon] || '') + '</span>' +
'<h3 class="service-title">' + content.title + '</h3>' +
'<p class="service-desc">' + content.desc + '</p>';
grid.appendChild(card);
});
}
/* ------------------------------------------------------------------------
RENDER: project filters
------------------------------------------------------------------------ */
function renderFilters() {
var wrap = document.getElementById('projectFilters');
wrap.innerHTML = '';
CATEGORIES.forEach(function (cat) {
var btn = document.createElement('button');
btn.type = 'button';
btn.className = 'filter-btn' + (cat.key === state.activeFilter ? ' is-active' : '');
btn.setAttribute('data-filter', cat.key);
btn.setAttribute('aria-pressed', cat.key === state.activeFilter ? 'true' : 'false');
btn.textContent = state.lang === 'tr' ? cat.tr : cat.en;
btn.addEventListener('click', function () {
state.activeFilter = cat.key;
renderFilters();
renderProjects();
});
wrap.appendChild(btn);
});
}
/* ------------------------------------------------------------------------
RENDER: project cards
------------------------------------------------------------------------ */
function renderProjects() {
var grid = document.getElementById('projectsGrid');
grid.innerHTML = '';
var visible = PROJECTS.filter(function (p) {
return state.activeFilter === 'all' || p.categories.indexOf(state.activeFilter) !== -1;
});
visible.forEach(function (project) {
var content = tField(project);
var card = document.createElement('article');
card.className = 'project-card reveal';
var techTags = project.technologies.slice(0, 4).map(function (tech) {
return '<li class="tag">' + tech + '</li>';
}).join('');
card.innerHTML =
'<div class="project-media"><img src="' + project.image + '" alt="' + content.title + '" loading="lazy" width="640" height="420"></div>' +
'<div class="project-body">' +
'<h3 class="project-title">' + content.title + '</h3>' +
'<p class="project-desc">' + content.description + '</p>' +
'<ul class="tag-list" role="list">' + techTags + '</ul>' +
'<button type="button" class="btn btn-secondary project-details-btn">' + t('projects.detailsBtn') + '</button>' +
'</div>';
var detailsBtn = card.querySelector('.project-details-btn');
detailsBtn.addEventListener('click', function () {
openProjectModal(project, detailsBtn);
});
grid.appendChild(card);
});
revealObserve();
}
/* ------------------------------------------------------------------------
RENDER: experience timeline
------------------------------------------------------------------------ */
function renderExperience() {
var list = document.getElementById('experienceTimeline');
list.innerHTML = '';
EXPERIENCE.forEach(function (item) {
var content = tField(item);
var li = document.createElement('li');
li.className = 'timeline-item reveal';
li.innerHTML =
'<span class="timeline-dot" aria-hidden="true"></span>' +
'<div class="timeline-content">' +
'<h3 class="timeline-title">' + content.title + (content.org ? ' <span class="timeline-org">— ' + content.org + '</span>' : '') + '</h3>' +
'<p class="timeline-desc">' + content.desc + '</p>' +
'</div>';
list.appendChild(li);
});
}
/* ------------------------------------------------------------------------
RENDER: skills
------------------------------------------------------------------------ */
function renderSkills() {
var grid = document.getElementById('skillsGrid');
grid.innerHTML = '';
SKILLS.forEach(function (group) {
var card = document.createElement('div');
card.className = 'skill-card reveal';
var tags = group.items.map(function (item) {
return '<li class="tag">' + item + '</li>';
}).join('');
card.innerHTML =
'<h3 class="skill-group-title">' + (state.lang === 'tr' ? group.tr : group.en) + '</h3>' +
'<ul class="tag-list" role="list">' + tags + '</ul>';
grid.appendChild(card);
});
}
/* ------------------------------------------------------------------------
RENDER: process steps
------------------------------------------------------------------------ */
function renderProcess() {
var grid = document.getElementById('processGrid');
grid.innerHTML = '';
PROCESS.forEach(function (step, index) {
var content = tField(step);
var card = document.createElement('div');
card.className = 'process-card reveal';
card.innerHTML =
'<span class="process-number">0' + (index + 1) + '</span>' +
'<span class="process-icon">' + (ICONS[step.icon] || '') + '</span>' +
'<h3 class="process-title">' + content.title + '</h3>' +
'<p class="process-desc">' + content.desc + '</p>';
grid.appendChild(card);
});
}
/* ------------------------------------------------------------------------
PROJECT MODAL
------------------------------------------------------------------------ */
var modalOverlay, modalEl, modalCloseBtn, modalImage, modalTitle, modalDescription, modalTechList, modalRespList;
function initModalRefs() {
modalOverlay = document.getElementById('modalOverlay');
modalEl = document.getElementById('projectModal');
modalCloseBtn = document.getElementById('modalCloseBtn');
modalImage = document.getElementById('modalImage');
modalTitle = document.getElementById('modalTitle');
modalDescription = document.getElementById('modalDescription');
modalTechList = document.getElementById('modalTechList');
modalRespList = document.getElementById('modalRespList');
}
var currentModalProject = null;
function openProjectModal(project, triggerEl) {
currentModalProject = project;
state.lastFocusedBeforeModal = triggerEl || document.activeElement;
fillModal(project);
modalOverlay.hidden = false;
document.body.classList.add('no-scroll');
document.addEventListener('keydown', onModalKeydown, true);
modalCloseBtn.focus();
}
function fillModal(project) {
var content = tField(project);
modalImage.src = project.image;
modalImage.alt = content.title;
modalTitle.textContent = content.title;
modalDescription.textContent = content.description;
modalTechList.innerHTML = project.technologies.map(function (tech) {
return '<li class="tag">' + tech + '</li>';
}).join('');
modalRespList.innerHTML = content.responsibilities.map(function (r) {
return '<li>' + r + '</li>';
}).join('');
// TODO: If project.url / project.videoUrl are set, render optional links here, e.g.:
// if (project.url) { ... create a link to project.url ... }
}
function closeProjectModal() {
modalOverlay.hidden = true;
document.body.classList.remove('no-scroll');
document.removeEventListener('keydown', onModalKeydown, true);
currentModalProject = null;
if (state.lastFocusedBeforeModal && typeof state.lastFocusedBeforeModal.focus === 'function') {
state.lastFocusedBeforeModal.focus();
}
}
function getFocusableInModal() {
return Array.prototype.slice.call(
modalEl.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])')
).filter(function (el) { return el.offsetParent !== null; });
}
function onModalKeydown(e) {
if (e.key === 'Escape') {
e.preventDefault();
closeProjectModal();
return;
}
if (e.key === 'Tab') {
var focusable = getFocusableInModal();
if (!focusable.length) return;
var first = focusable[0];
var last = focusable[focusable.length - 1];
if (e.shiftKey && document.activeElement === first) {
e.preventDefault();
last.focus();
} else if (!e.shiftKey && document.activeElement === last) {
e.preventDefault();
first.focus();
}
}
}
function initModal() {
initModalRefs();
modalCloseBtn.addEventListener('click', closeProjectModal);
modalOverlay.addEventListener('click', function (e) {
if (e.target === modalOverlay) closeProjectModal();
});
}
/* ------------------------------------------------------------------------
NAVIGATION: mobile menu, sticky, active link, smooth scroll
------------------------------------------------------------------------ */
function initNav() {
var toggle = document.getElementById('navToggle');
var panel = document.getElementById('primaryMenu');
var backdrop = document.getElementById('navBackdrop');
var header = document.getElementById('siteHeader');
function openMenu() {
panel.classList.add('is-open');
toggle.setAttribute('aria-expanded', 'true');
toggle.setAttribute('aria-label', t('nav.toggleClose'));
backdrop.hidden = false;
document.body.classList.add('no-scroll');
}
function closeMenu() {
panel.classList.remove('is-open');
toggle.setAttribute('aria-expanded', 'false');
toggle.setAttribute('aria-label', t('nav.toggleOpen'));
backdrop.hidden = true;
document.body.classList.remove('no-scroll');
}
toggle.addEventListener('click', function () {
var isOpen = panel.classList.contains('is-open');
if (isOpen) closeMenu(); else openMenu();
});
backdrop.addEventListener('click', closeMenu);
panel.querySelectorAll('.nav-link').forEach(function (link) {
link.addEventListener('click', function () {
if (window.matchMedia('(max-width: 900px)').matches) closeMenu();
});
});
document.addEventListener('keydown', function (e) {
if (e.key === 'Escape' && panel.classList.contains('is-open')) closeMenu();
});
window.addEventListener('scroll', function () {
if (window.scrollY > 12) header.classList.add('is-scrolled');
else header.classList.remove('is-scrolled');
}, { passive: true });
// Active section highlighting
var sections = Array.prototype.slice.call(document.querySelectorAll('main section[id]'));
var navLinks = Array.prototype.slice.call(document.querySelectorAll('.nav-link'));
if ('IntersectionObserver' in window) {
var sectionObserver = new IntersectionObserver(function (entries) {
entries.forEach(function (entry) {
if (entry.isIntersecting) {
var id = entry.target.id;
navLinks.forEach(function (link) {
var match = link.getAttribute('href') === '#' + id;
link.classList.toggle('is-active', match);
if (match) link.setAttribute('aria-current', 'true');
else link.removeAttribute('aria-current');
});
}
});
}, { rootMargin: '-45% 0px -50% 0px', threshold: 0 });
sections.forEach(function (sec) { sectionObserver.observe(sec); });
}
}
/* ------------------------------------------------------------------------
LANGUAGE SWITCH
------------------------------------------------------------------------ */
function setLanguage(lang) {
state.lang = lang === 'tr' ? 'tr' : 'en';
storeLang(state.lang);
document.getElementById('langEn').setAttribute('aria-pressed', state.lang === 'en' ? 'true' : 'false');
document.getElementById('langTr').setAttribute('aria-pressed', state.lang === 'tr' ? 'true' : 'false');
applyStaticTranslations();
renderServices();
renderFilters();
renderProjects();
renderExperience();
renderSkills();
renderProcess();
if (currentModalProject) fillModal(currentModalProject);
var toggle = document.getElementById('navToggle');
var isOpen = document.getElementById('primaryMenu').classList.contains('is-open');
toggle.setAttribute('aria-label', t(isOpen ? 'nav.toggleClose' : 'nav.toggleOpen'));
revealObserve();
}
function initLangSwitch() {
document.getElementById('langEn').addEventListener('click', function () { setLanguage('en'); });
document.getElementById('langTr').addEventListener('click', function () { setLanguage('tr'); });
}
/* ------------------------------------------------------------------------
SMOOTH SCROLL for in-page anchors
------------------------------------------------------------------------ */
function initSmoothScroll() {
document.addEventListener('click', function (e) {
var link = e.target.closest ? e.target.closest('a[href^="#"]') : null;
if (!link) return;
var id = link.getAttribute('href');
if (id.length < 2) return;
var target = document.querySelector(id);
if (!target) return;
e.preventDefault();
target.scrollIntoView({ behavior: prefersReducedMotion() ? 'auto' : 'smooth', block: 'start' });
history.pushState ? history.pushState(null, '', id) : (window.location.hash = id);
});
}
function prefersReducedMotion() {
return safeGet(function () {
return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
}, false);
}
/* ------------------------------------------------------------------------
SCROLL TO TOP BUTTON
------------------------------------------------------------------------ */
function initScrollTop() {
var btn = document.getElementById('scrollTopBtn');
window.addEventListener('scroll', function () {
btn.hidden = window.scrollY < 480;
}, { passive: true });
btn.addEventListener('click', function () {
window.scrollTo({ top: 0, behavior: prefersReducedMotion() ? 'auto' : 'smooth' });
});
}
/* ------------------------------------------------------------------------
COPY EMAIL + TOAST
------------------------------------------------------------------------ */
var toastTimer = null;
function showToast(message) {
var toast = document.getElementById('toast');
toast.textContent = message;
toast.classList.add('is-visible');
if (toastTimer) clearTimeout(toastTimer);
toastTimer = setTimeout(function () {
toast.classList.remove('is-visible');
}, 2800);
}
function initCopyEmail() {
var btn = document.getElementById('copyEmailBtn');
var email = 'abdullaheren.iynemli@gmail.com';
btn.addEventListener('click', function () {
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(email).then(function () {
showToast(t('contact.copied'));
}, function () {
fallbackCopy();
});
} else {
fallbackCopy();
}
});
function fallbackCopy() {
try {
var temp = document.createElement('textarea');
temp.value = email;
temp.setAttribute('readonly', '');
temp.style.position = 'absolute';
temp.style.left = '-9999px';
document.body.appendChild(temp);
temp.select();
var ok = document.execCommand && document.execCommand('copy');
document.body.removeChild(temp);
showToast(ok ? t('contact.copied') : t('contact.copyFailed'));
} catch (err) {
showToast(t('contact.copyFailed'));
}
}
}
/* ------------------------------------------------------------------------
SCROLL REVEAL
------------------------------------------------------------------------ */
var revealObserver = null;
function revealObserve() {
var targets = document.querySelectorAll('.reveal:not(.is-visible)');
if (!('IntersectionObserver' in window) || prefersReducedMotion()) {
targets.forEach(function (el) { el.classList.add('is-visible'); });
return;
}
if (!revealObserver) {
revealObserver = new IntersectionObserver(function (entries, obs) {
entries.forEach(function (entry) {
if (entry.isIntersecting) {
entry.target.classList.add('is-visible');
obs.unobserve(entry.target);
}
});
}, { threshold: 0.12, rootMargin: '0px 0px -60px 0px' });
}
targets.forEach(function (el) { revealObserver.observe(el); });
}
/* ------------------------------------------------------------------------
FOOTER YEAR
------------------------------------------------------------------------ */
function initFooterYear() {
var el = document.getElementById('footerYear');
el.textContent = new Date().getFullYear();
}
/* ------------------------------------------------------------------------
INIT
------------------------------------------------------------------------ */
function init() {
var stored = getStoredLang();
state.lang = (stored === 'tr' || stored === 'en') ? stored : 'en';
document.getElementById('langEn').setAttribute('aria-pressed', state.lang === 'en' ? 'true' : 'false');
document.getElementById('langTr').setAttribute('aria-pressed', state.lang === 'tr' ? 'true' : 'false');
applyStaticTranslations();
renderServices();
renderFilters();
renderProjects();
renderExperience();
renderSkills();
renderProcess();
initNav();
initLangSwitch();
initSmoothScroll();
initScrollTop();
initCopyEmail();
initModal();
initFooterYear();
revealObserve();
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
})();