forked from agnilondapakou/helloWorld
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
809 lines (795 loc) · 24.2 KB
/
script.js
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
const languages = [
{
name: 'ABAP',
description: 'Programming language developed by SAP',
link: 'https://pages.community.sap.com/topics/abap'
},
{
name: 'ActionScript',
description: 'Programming language for Flash applications',
link: 'https://en.wikipedia.org/wiki/ActionScript'
},
{
name: 'Ada',
description: 'Langage de programmation structuré pour systèmes embarqués',
link: 'https://ada-lang.io/'
},
{
name: 'ALGOL 68',
description: 'Langage de programmation historique influent',
link: 'https://jmvdveer.home.xs4all.nl/en.algol-68-genie.html'
},
{
name: 'AppleScript',
description: 'Langage de script pour automatiser les tâches sur macOS',
link: 'https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html'
},
{
name: 'Assembly',
description: 'Langage de programmation de bas niveau',
link: 'https://en.wikipedia.org/wiki/Assembly_language'
},
{
name: 'AutoIt',
description: 'Langage de script pour l\'automatisation Windows',
link: 'https://www.autoitscript.com/site/autoit/'
},
{
name: 'Awk',
description: 'A Text-processing programming language',
link: 'http://www.awklang.org/'
},
{
name: 'Azle',
description: 'Framework de développement moderne',
link: 'https://demergent-labs.github.io/azle/'
},
{
name: 'B',
description: 'Programming language developed at Bell Labs & Predecessor to C',
link: 'https://www.bell-labs.com/usr/dmr/www/bintro.html'
},
{
name: 'BASIC',
description: 'Langage de programmation classique pour débutants',
link: 'https://www.vintage-basic.net/'
},
{
name: 'Bash',
description: 'Shell Unix et langage de script',
link: 'https://www.gnu.org/software/bash/'
},
{
name: 'Batch',
description: 'Langage de script Windows',
link: 'https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands'
},
{
name: 'BCPL',
description: 'Basic Combined Programming Language',
link: 'https://bcpl.org/'
},
{
name: 'Bhailang',
description: 'Langage de programmation expérimental',
link: 'https://bhailang.js.org'
},
{
name: 'Bicep',
description: 'Langage déclaratif pour Azure',
link: 'https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview'
},
{
name: 'Boo',
description: 'Langage orienté objet pour .NET',
link: 'https://boo-language.github.io/'
},
{
name: 'Brainfuck',
description: 'Langage de programmation ésotérique minimaliste',
link: 'https://brainfuck.org/'
},
{
name: 'C',
description: 'Langage de programmation système',
link: 'https://en.wikipedia.org/wiki/C_(programming_language)'
},
{
name: 'C++',
description: 'Langage de programmation orienté objet',
link: 'https://en.wikipedia.org/wiki/C%2B%2B'
},
{
name: 'C#',
description: 'Langage de programmation orienté objet',
link: 'https://en.wikipedia.org/wiki/C_Sharp_(programming_language)'
},
{
name: 'D',
description: 'Langage de programmation système',
link: 'https://en.wikipedia.org/wiki/D_(programming_language)'
},
{
name: 'Dart',
description: 'Langage de programmation orienté objet',
link: 'https://dart.dev/'
},
{
name: 'E',
description: 'Object oriented programming language',
link: 'http://www.erights.org/'
},
{
name: 'Delphi',
description: 'Object oriented programming Language created by Borland ',
link: 'https://learndelphi.org/'
},
{
name: 'Eiffel',
description: 'Langage de programmation orienté objet',
link: 'https://en.wikipedia.org/wiki/Eiffel_(programming_language)'
},
{
name: 'Elixir',
description: 'Langage de programmation fonctionnelle',
link: 'https://elixir-lang.org/'
},
{
name: 'Erlang',
description: 'Langage de programmation fonctionnelle',
link: 'https://www.erlang.org/'
},
{
name: 'F#',
description: 'Langage de programmation fonctionnelle',
link: 'https://en.wikipedia.org/wiki/F_Sharp_(programming_language)'
},
{
name: 'Fortran',
description: 'Langage de programmation haut niveau',
link: 'https://en.wikipedia.org/wiki/Fortran'
},
{
name: 'Fantom',
description: 'Programming language for multi-platform applications (JVM, .NET, JavaScript)',
link: 'https://fantom.org/'
},
{
name: 'GML',
description: 'Langage de script pour GameMaker',
link: 'https://manual.gamemaker.io/monthly/en/#t=GameMaker_Language.htm'
},
{
name: 'Go',
description: 'Langage de programmation système',
link: 'https://golang.org/'
},
{
name: 'Haskell',
description: 'Langage de programmation fonctionnelle',
link: 'https://www.haskell.org/'
},
{
name: 'HTML',
description: 'Langage de balisage pour la création de pages web',
link: 'https://developer.mozilla.org/en-US/docs/Web/HTML'
},
{
name: 'Java',
description: 'Langage de programmation orienté objet',
link: 'https://www.java.com/en/'
},
{
name: 'JavaScript',
description: 'Langage de programmation client-side',
link: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript'
},
{
name: 'Julia',
description: 'Langage de programmation haut niveau',
link: 'https://julialang.org/'
},
{
name: 'Kotlin',
description: 'Langage de programmation orienté objet',
link: 'https://kotlinlang.org/'
},
{
name: 'KornShell',
description: 'Unix shell and scripting language',
link: 'http://kornshell.com/'
},
{
name: 'Lisp',
description: 'Langage de programmation fonctionnel historique',
link: 'https://common-lisp.net/'
},
{
name: 'Lua',
description: 'Langage de programmation orienté objet',
link: 'https://www.lua.org/'
},
{
name: 'MATLAB',
description: 'Langage de programmation haut niveau',
link: 'https://www.mathworks.com/products/matlab.html'
},
{
name: 'Objective-C',
description: 'Langage de programmation orienté objet',
link: 'https://en.wikipedia.org/wiki/Objective-C'
},
{
name: 'OCaml',
description: 'Langage de programmation fonctionnelle',
link: 'https://ocaml.org/'
},
{
name: 'Pascal',
description: 'Langage de programmation structuré',
link: 'https://en.wikipedia.org/wiki/Pascal_(programming_language)'
},
{
name: 'Perl',
description: 'Langage de programmation orienté objet',
link: 'https://www.perl.org/'
},
{
name: 'PHP',
description: 'Langage de programmation server-side',
link: 'https://www.php.net/'
},
{
name: 'Python',
description: 'Langage de programmation haut niveau',
link: 'https://www.python.org/'
},
{
name: 'R',
description: 'Langage de programmation statistique',
link: 'https://www.r-project.org/'
},
{
name: 'Ruby',
description: 'Langage de programmation orienté objet',
link: 'https://www.ruby-lang.org/en/'
},
{
name: 'Rust',
description: 'Langage de programmation système',
link: 'https://www.rust-lang.org/'
},
{
name: 'Scala',
description: 'Langage de programmation fonctionnelle',
link: 'https://www.scala-lang.org/'
},
{
name: 'Shell',
description: 'Langage de script',
link: 'https://en.wikipedia.org/wiki/Shell_script'
},
{
name: 'Swift',
description: 'Langage de programmation orienté objet',
link: 'https://developer.apple.com/swift/'
},
{
name: 'TypeScript',
description: 'Langage de programmation client-side',
link: 'https://www.typescriptlang.org/'
},
{
name: 'Transact-SQL',
description: 'Microsoft SQL Server',
link: 'https://learn.massstreet.net/transact-sql/basic/hello-world.html'
},
{
name: 'Visual Basic',
description: 'Langage de programmation classique pour débutants',
link: 'https://en.wikipedia.org/wiki/Visual_Basic'
},
{
name: 'Zig',
description: 'Langage système moderne et performant',
link: 'https://ziglang.org/'
},
{
name: 'Zsh',
description: 'Unix shell and scripting language',
link: 'https://zsh.sourceforge.io/'
},
{
name: 'Cangjie',
description: 'Langage de programmation basé sur les caractères chinois',
link: 'https://learnxyz.in/cangjie-programming-language/'
},
{
name: 'Carbon',
description: 'Langage de programmation expérimental de Google',
link: 'https://docs.carbon-lang.dev/'
},
{
name: 'Cairo',
description: 'Langage pour les smart contracts',
link: 'https://www.cairo-lang.org/'
},
{
name: 'Cecil',
description: 'Langage de programmation orienté objet',
link: 'https://en.wikipedia.org/wiki/Cecil_(programming_language)'
},
{
name: 'Chapel',
description: 'Langage de programmation parallèle',
link: 'https://chapel-lang.org/'
},
{
name: 'Clojure',
description: 'Langage fonctionnel pour la JVM',
link: 'https://clojure.org/'
},
{
name: 'CLIPS',
description: 'Langage pour systèmes experts',
link: 'https://www.clipsrules.net/'
},
{
name: 'COBOL',
description: 'Langage pour applications commerciales',
link: 'https://www.ibm.com/docs/en/cobol-zos'
},
{
name: 'Coffeescript',
description: 'Langage qui se compile en JavaScript',
link: 'https://coffeescript.org/'
},
{
name: 'Crystal',
description: 'Langage statiquement typé inspiré de Ruby',
link: 'https://crystal-lang.org/'
},
{
name: 'Daytona',
description: 'Plateforme de développement cloud',
link: 'https://daytona.io/'
},
{
name: 'Dylan',
description: 'Langage de programmation dynamique',
link: 'https://opendylan.org/'
},
{
name: 'Elm',
description: 'Langage fonctionnel pour le web frontend',
link: 'https://guide.elm-lang.org/'
},
{
name: 'Euphoria',
description: 'Langage de programmation interprété',
link: 'https://openeuphoria.org/'
},
{
name: 'Factor',
description: 'Langage de programmation stack-based',
link: 'https://factorcode.org/'
},
{
name: 'Falcon',
description: 'Langage de script orienté objet',
link: 'http://www.falconpl.org/'
},
{
name: 'Forth',
description: 'Langage de programmation stack-based',
link: 'https://forth-standard.org/'
},
{
name: 'Futhark',
description: 'Langage fonctionnel pour GPU',
link: 'https://futhark-lang.org/'
},
{
name: 'GDScript',
description: 'Langage de script pour Godot Engine',
link: 'https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/index.html'
},
{
name: 'Groovy',
description: 'Langage dynamique pour la JVM',
link: 'https://groovy-lang.org/'
},
{
name: 'Hack',
description: 'Langage de programmation pour HHVM',
link: 'https://hacklang.org/'
},
{
name: 'Haxe',
description: 'Langage multi-plateforme',
link: 'https://haxe.org/'
},
{
name: 'HolyC',
description: 'Langage de programmation pour TempleOS',
link: 'https://holyc-lang.com'
},
{
name: 'Icon',
description: 'Langage de programmation pour le traitement de chaînes et structures de données',
link: 'https://www2.cs.arizona.edu/icon/'
},
{
name: 'Idris',
description: 'Langage de programmation fonctionnel avec types dépendants',
link: 'https://www.idris-lang.org/'
},
{
name: 'INTERCAL',
description: 'Langage de programmation parodique',
link: 'https://www.tutorialspoint.com/intercal/'
},
{
name: 'J',
description: 'Langage de programmation array',
link: 'https://www.jsoftware.com/'
},
{
name: 'Janet',
description: 'Langage fonctionnel et impératif',
link: 'https://janet-lang.org/'
},
{
name: 'JavaServer Pages',
description: 'A server-side programming technology',
link: 'https://www.oracle.com/java/technologies/jspt.html'
},
{
name: 'K',
description: 'Langage de programmation array',
link: 'https://kx.com/'
},
{
name: 'Lisk',
description: 'Framework pour applications blockchain',
link: 'https://docs.lisk.com/'
},
{
name: 'Logo',
description: 'Langage de programmation éducatif',
link: 'https://people.eecs.berkeley.edu/~bh/logo.html'
},
{
name: 'Maple',
description: 'Système de calcul symbolique',
link: 'https://en.wikipedia.org/wiki/Maple_(software)'
},
{
name: 'Mercury',
description: 'Langage de programmation logique et fonctionnel',
link: 'https://mercurylang.org/'
},
{
name: 'Miranda',
description: 'Langage de programmation fonctionnel',
link: 'https://miranda.org.uk/'
},
{
name: 'Modula-2',
description: 'Langage de programmation successeur de Pascal',
link: 'https://www.modula2.org/'
},
{
name: 'Motoko',
description: 'Langage pour Internet Computer',
link: 'https://internetcomputer.org/docs/current/motoko/'
},
{
name: 'Occam',
description: 'Langage de programmation parallèle',
link: 'https://www.cs.kent.ac.uk/projects/ofa/kroc/'
},
{
name: 'Pike',
description: 'Langage de programmation orienté objet',
link: 'https://pike.lysator.liu.se/'
},
{
name: 'Plug',
description: 'Langage de programmation moderne',
link: 'https://pluglanguage.org'
},
{
name: 'Pony',
description: 'Langage de programmation orienté acteur',
link: 'https://www.ponylang.io/'
},
{
name: 'PostScript',
description: 'Langage de description de page',
link: 'https://www.adobe.com/products/postscript.html'
},
{
name: 'Q',
description: 'Langage de programmation de KDB+',
link: 'https://kx.com/'
},
{
name: 'Racket',
description: 'Langage de programmation dérivé de Scheme',
link: 'https://racket-lang.org/'
},
{
name: 'ReasonML',
description: 'Syntaxe alternative pour OCaml',
link: 'https://reasonml.github.io/'
},
{
name: 'Red',
description: 'Langage de programmation full-stack',
link: 'https://www.red-lang.org/'
},
{
name: 'Sather',
description: 'Langage orienté objet inspiré d\'Eiffel',
link: 'https://en.wikipedia.org/wiki/Sather'
},
{
name: 'SNOBOL',
description: 'Langage spécialisé dans la manipulation de chaînes',
link: 'https://www.regressive.org/snobol4/'
},
{
name: 'Soroban',
description: 'Framework pour Stellar blockchain',
link: 'https://developers.stellar.org/'
},
{
name: 'SPARK',
description: 'Sous-ensemble d\'Ada pour systèmes critiques',
link: 'https://en.wikipedia.org/wiki/SPARK_(programming_language)'
},
{
name: 'Stata',
description: 'A programming Language for Statistical language',
link: 'https://www.stata.com/'
},
{
name: 'Thue',
description: 'Langage de programmation ésotérique',
link: 'https://esolangs.org/wiki/Thue'
},
{
name: 'Turing',
description: 'Langage de programmation éducatif',
link: 'https://turing-lang.io/'
},
{
name: 'Vala',
description: 'Langage de programmation orienté objet',
link: 'https://vala.dev/'
},
{
name: 'VBScript',
description: 'Langage de script Microsoft',
link: 'https://docs.microsoft.com/en-us/previous-versions//d1wf56tt(v=vs.85)'
},
{
name: 'WhiteSpace',
description: 'Langage de programmation ésotérique',
link: 'https://en.wikipedia.org/wiki/Whitespace_(programming_language)'
},
{
name: 'Wolfram',
description: 'Langage de programmation Mathematica',
link: 'https://www.wolfram.com/language/'
},
{
name: 'Xamarin',
description: 'Framework pour applications mobiles',
link: 'https://dotnet.microsoft.com/en-us/apps/xamarin'
},
{
name: 'Xquery',
description: 'Langage de requête XML',
link: 'https://www.w3.org/TR/xquery-31/'
},
{
name: 'Xojo',
description: 'Build Native, Cross-Platform Apps',
link: 'https://www.xojo.com'
},
{
name: 'COOL',
description: 'Classroom Object-Oriented Language',
link: 'https://theory.stanford.edu/~aiken/software/cool/cool.html'
},
{
name: 'Curl',
description: 'Langage de programmation pour applications web',
link: 'https://en.wikipedia.org/wiki/Curl_(programming_language)'
},
{
name: 'Cypher',
description: 'Langage de requête pour bases de données graphes Neo4j',
link: 'https://neo4j.com/docs/cypher-manual/current/introduction/'
},
{
name: 'Io',
description: 'Langage de programmation prototype',
link: 'https://iolanguage.org/'
},
{
name: 'Nim',
description: 'Langage de programmation système efficace',
link: 'https://nim-lang.org/'
},
{
name: 'PowerShell',
description: 'Shell et langage de script Microsoft',
link: 'https://learn.microsoft.com/en-us/powershell/'
},
{
name: 'Prolog',
description: 'Langage de programmation logique',
link: 'https://www.gprolog.org/'
},
{
name: 'Pug',
description: 'Moteur de template pour Node.js',
link: 'https://pugjs.org/'
},
{
name: 'Raku',
description: 'Langage de programmation moderne et flexible',
link: 'https://docs.raku.org/'
},
{
name: 'SAS',
description: 'Langage pour l\'analyse statistique',
link: 'https://www.sas.com/'
},
{
name: 'Scheme',
description: 'Dialecte minimaliste de Lisp',
link: 'https://www.scheme.org/'
},
{
name: 'Smalltalk',
description: 'Langage de programmation orienté objet pur',
link: 'https://squeak.org/'
},
{
name: 'SQL',
description: 'Langage de requête pour bases de données relationnelles',
link: 'https://www.iso.org/standard/76583.html'
},
{
name: 'Simula',
description: 'Early object-oriented programming language',
link: 'https://en.wikipedia.org/wiki/Simula'
},
{
name: 'Tcl',
description: 'Tool Command Language',
link: 'https://www.tcl.tk/about/language.html'
},
{
name: 'V',
description: 'Langage de programmation système simple et rapide',
link: 'https://vlang.io/'
},
{
name: 'Verilog',
description: 'Langage de description matérielle',
link: 'https://en.wikipedia.org/wiki/Verilog'
},
{
name: 'VIM',
description: 'Langage de script pour l\'éditeur Vim',
link: 'https://www.vim.org/'
},
{
name: 'LOL',
description: 'LOLCODE is an esoteric programming language',
link: 'https://gist.github.com/sharmaeklavya2/8a0e2581baf969be0f64'
},
{
name: 'YAML',
description: 'A simple data serialization language',
link: 'https://yaml.org/'
},
{
name: 'Wren',
description: 'Lightweight scripting language for embedding in applications',
link: 'https://wren.io/'
},
{
name: 'ChucK',
description: 'Strongly-timed, concurrent audio programming language',
link: 'https://chuck.cs.princeton.edu/'
},
{
name: 'COBOLScript',
description: 'Scripting variant of COBOL',
link: 'https://sites.google.com/view/cobolscripting'
},
{
name: 'LiveCode',
description: 'Visual, high-level programming language',
link: 'https://livecode.com/'
},
{
name: 'Monkey X',
description: 'Programming language for game development',
link: 'https://monkeycoder.co.nz/'
},
{
name: 'Dragon',
description: 'A multi-paradigm, general-purpose programming language ',
link: 'https://dragon-lang.org/'
}
];
function createAlphabetFilter() {
const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
const filterContainer = document.querySelector('.alphabet-filter');
alphabet.forEach(letter => {
const button = document.createElement('button');
button.className = 'letter-btn';
button.textContent = letter;
button.addEventListener('click', () => filterByLetter(letter));
filterContainer.appendChild(button);
});
}
function filterByLetter(letter) {
const buttons = document.querySelectorAll('.letter-btn');
buttons.forEach(btn => {
btn.classList.toggle('active', btn.textContent === letter);
});
const cards = document.querySelectorAll('.language-card');
cards.forEach(card => {
const name = card.querySelector('.language-name').textContent;
card.style.display = name.toUpperCase().startsWith(letter) ? 'block' : 'none';
});
}
function createLanguageCards() {
const languagesGrid = document.getElementById('languagesGrid');
languagesGrid.innerHTML = '';
languages.sort((a, b) => a.name.localeCompare(b.name)).forEach(language => {
const card = document.createElement('div');
card.className = 'language-card';
card.innerHTML = `
<div class="language-name">${language.name}</div>
<div class="language-description">${language.description}</div>
<a href="${language.link}"
class="language-link"
target="_blank"
rel="noopener noreferrer">Official Documentation</a>
`;
card.addEventListener('click', () => {
window.open(language.link, '_blank', 'noopener,noreferrer');
});
languagesGrid.appendChild(card);
});
}
function setupSearch() {
const searchInput = document.getElementById('searchInput');
searchInput.addEventListener('input', (e) => {
const searchTerm = e.target.value.toLowerCase();
const cards = document.querySelectorAll('.language-card');
cards.forEach(card => {
const name = card.querySelector('.language-name').textContent.toLowerCase();
card.style.display = name.includes(searchTerm) ? 'block' : 'none';
});
});
}
function showError() {
const errorMessage = document.getElementById('errorMessage');
errorMessage.style.display = 'block';
errorMessage.textContent = 'Unable to load languages. Please try again later.';
}
document.addEventListener('DOMContentLoaded', () => {
createAlphabetFilter();
createLanguageCards();
setupSearch();
});