-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
634 lines (618 loc) · 24 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
const awesomeLists = [
{
title: "Awesome AI",
description:
"A general list of resources, libraries, and tools for artificial intelligence.",
link: "https://github.com/awesomelistsio/awesome-ai"
},
{
title: "Awesome AI Ethics",
description:
"Resources and discussions on the ethical implications of AI, including bias, fairness, and transparency.",
link: "https://github.com/awesomelistsio/awesome-ai-ethics"
},
{
title: "Awesome AI for Edge Computing",
description:
"Tools and frameworks for running AI models on edge devices and IoT.",
link: "https://github.com/awesomelistsio/awesome-ai-edge-computing"
},
{
title: "Awesome AI in Healthcare",
description:
"A curated list of tools, frameworks, applications, datasets, and resources for AI in Healthcare.",
link: "https://github.com/awesomelistsio/awesome-ai-healthcare"
},
{
title: "Awesome AI Infrastructure",
description:
"Resources for building scalable AI infrastructure, including distributed training, MLOps, and model deployment.",
link: "https://github.com/awesomelistsio/awesome-ai-infrastructure"
},
{
title: "Awesome AI Research Papers",
description:
"A curated list of influential AI research papers and academic resources.",
link: "https://github.com/awesomelistsio/awesome-ai-research-papers"
},
{
title: "Awesome Computer Vision",
description:
"A list of resources for computer vision, including libraries, frameworks, and datasets.",
link: "https://github.com/awesomelistsio/awesome-computer-vision"
},
{
title: "Awesome Deep Learning",
description:
"A curated collection of resources and frameworks for deep learning and neural networks.",
link: "https://github.com/awesomelistsio/awesome-deep-learning"
},
{
title: "Awesome Machine Learning",
description:
"A comprehensive list of libraries, frameworks, and tools for machine learning.",
link: "https://github.com/awesomelistsio/awesome-machine-learning"
},
{
title: "Awesome Natural Language Processing (NLP)",
description: "Tools, libraries, and datasets for NLP and text analysis.",
link: "https://github.com/awesomelistsio/awesome-nlp"
},
{
title: "Awesome Reinforcement Learning",
description:
"A collection of tools, frameworks, and research papers for reinforcement learning.",
link: "https://github.com/awesomelistsio/awesome-reinforcement-learning"
},
{
title: "Awesome Blogging",
description:
"A curated list of awesome tools, resources, platforms, and tips for bloggers of all levels.",
link: "https://github.com/awesomelistsio/awesome-blogging"
},
{
title: "Awesome Blogging Monetization",
description:
"A curated list of tools, platforms, strategies, and resources for blog monetization.",
link: "https://github.com/awesomelistsio/awesome-blogging-monetization"
},
{
title: "Awesome Ghost",
description:
"A curated list of awesome resources, themes, plugins, and tools for the Ghost blogging platform.",
link: "https://github.com/awesomelistsio/awesome-ghost"
},
{
title: "Awesome Microblogging",
description:
"A curated list of tools, platforms, resources, and strategies for microblogging.",
link: "https://github.com/awesomelistsio/awesome-microblogging"
},
{
title: "Awesome Travel Blogging",
description:
"A curated list of awesome resources, tools, platforms, and tips for travel bloggers.",
link: "https://github.com/awesomelistsio/awesome-travel-blogging"
},
{
title: "Awesome WordPress",
description: "A curated list of resources for WordPress.",
link: "https://github.com/awesomelistsio/awesome-wordpress"
},
{
title: "Awesome Altcoins",
description:
"A collection of resources, tools, and information for alternative cryptocurrencies beyond Bitcoin and Ethereum.",
link: "https://github.com/awesomelistsio/awesome-altcoins"
},
{
title: "Awesome Bitcoin",
description:
"A curated list of tools, libraries, and resources for Bitcoin, the first and most widely used cryptocurrency.",
link: "https://github.com/awesomelistsio/awesome-bitcoin"
},
{
title: "Awesome Crypto Exchanges",
description:
"A list of centralized and decentralized cryptocurrency exchanges, including trading tools and analytics.",
link: "https://github.com/awesomelistsio/awesome-crypto-exchanges"
},
{
title: "Awesome Crypto Mining",
description:
"A collection of resources for cryptocurrency mining, including software, hardware, and mining pools.",
link: "https://github.com/awesomelistsio/awesome-crypto-mining"
},
{
title: "Awesome Crypto Wallets",
description:
"A curated list of secure and popular cryptocurrency wallets for storing digital assets.",
link: "https://github.com/awesomelistsio/awesome-crypto-wallets"
},
{
title: "Awesome DeFi",
description:
"A list of tools, platforms, and resources for the decentralized finance ecosystem.",
link: "https://github.com/awesomelistsio/awesome-defi"
},
{
title: "Awesome Ethereum",
description:
"A comprehensive list of resources, tools, and development frameworks for Ethereum.",
link: "https://github.com/awesomelistsio/awesome-ethereum"
},
{
title: "Awesome Privacy Coins",
description:
"Resources and tools focused on privacy-oriented cryptocurrencies (e.g., Monero, Zcash).",
link: "https://github.com/awesomelistsio/awesome-privacy-coins"
},
{
title: "Awesome Smart Contracts",
description:
"Libraries, tools, and frameworks for developing and auditing smart contracts.",
link: "https://github.com/awesomelistsio/awesome-smart-contracts"
},
{
title: "Awesome Cassandra",
description:
"A curated list of awesome libraries, tools, frameworks, and resources for Apache Cassandra, a highly scalable, distributed NoSQL database designed for handling large amounts of data across many commodity servers.",
link: "https://github.com/awesomelistsio/awesome-cassandra"
},
{
title: "Awesome CouchDB",
description:
"A curated list of awesome libraries, tools, frameworks, and resources for CouchDB, an open-source NoSQL database known for its ease of use, scalability, and master-master replication.",
link: "https://github.com/awesomelistsio/awesome-couchdb"
},
{
title: "Awesome HBase",
description:
"A curated list of awesome libraries, tools, frameworks, and resources for Apache HBase, a scalable, distributed, and NoSQL database built on top of Hadoop, designed for handling large amounts of data.",
link: "https://github.com/awesomelistsio/awesome-hbase"
},
{
title: "Awesome MongoDB",
description:
"A curated list of awesome libraries, tools, frameworks, and resources for MongoDB, a NoSQL document database designed for modern application development.",
link: "https://github.com/awesomelistsio/awesome-mongodb"
},
{
title: "Awesome MySQL",
description:
"A curated list of awesome frameworks, libraries, tools, and resources for MySQL, a popular open-source relational database management system.",
link: "https://github.com/awesomelistsio/awesome-mysql"
},
{
title: "Awesome PostgreSQL",
description:
"A curated list of awesome libraries, tools, frameworks, and resources for PostgreSQL, an advanced open-source relational database system known for its performance, extensibility, and SQL compliance.",
link: "https://github.com/awesomelistsio/awesome-postgresql"
},
{
title: "Awesome Blockchain Protocols",
description:
"A list of various blockchain protocols and frameworks, including Layer 1 and Layer 2 solutions.",
link: "https://github.com/awesomelistsio/awesome-blockchain-protocols"
},
{
title: "Awesome Consensus Algorithms",
description:
"A comprehensive list of consensus mechanisms and protocols used in decentralized systems (e.g., Proof of Work, Proof of Stake, Raft, Paxos).",
link: "https://github.com/awesomelistsio/awesome-consensus-algorithms"
},
{
title: "Awesome Decentralized Autonomous Organizations (DAOs)",
description:
"A collection of resources for building and participating in decentralized autonomous organizations.",
link: "https://github.com/awesomelistsio/awesome-daos"
},
{
title: "Awesome Decentralized Finance (DeFi)",
description:
"Resources and tools for building and understanding decentralized finance applications.",
link: "https://github.com/awesomelistsio/awesome-defi"
},
{
title: "Awesome Decentralized Identity (DID)",
description:
"A list of tools, protocols, and libraries for decentralized identity systems and self-sovereign identity (SSI).",
link: "https://github.com/awesomelistsio/awesome-decentralized-identity"
},
{
title: "Awesome Decentralized Systems",
description:
"A curated list of tools, protocols, and resources for building decentralized applications and services.",
link: "https://github.com/awesomelistsio/awesome-decentralized-systems"
},
{
title: "Awesome Distributed Databases",
description:
"A collection of distributed database technologies and tools, including consensus protocols and replication strategies.",
link: "https://github.com/awesomelistsio/awesome-distributed-databases"
},
{
title: "Awesome IPFS",
description:
"A curated list of resources, tools, and libraries for the InterPlanetary File System (IPFS), a protocol for decentralized storage.",
link: "https://github.com/awesomelistsio/awesome-ipfs"
},
{
title: "Awesome Peer-to-Peer (P2P) Networks",
description:
"Resources and tools for building and understanding peer-to-peer networks.",
link: "https://github.com/awesomelistsio/awesome-p2p-networks"
},
{
title: "Awesome Web3 Development",
description:
"Tools, frameworks, and resources for building decentralized applications (dApps) using Web3 technologies.",
link: "https://github.com/awesomelistsio/awesome-web3-development"
},
{
title: "Awesome Content Marketing",
description:
"A curated list of tools, platforms, strategies, and resources for content marketing.",
link: "https://github.com/awesomelistsio/awesome-content-marketing"
},
{
title: "Awesome Email Marketing",
description:
"A curated list of tools, platforms, strategies, and resources for email marketing.",
link: "https://github.com/awesomelistsio/awesome-email-marketing"
},
{
title: "Awesome SEO",
description:
"A curated list of awesome SEO resources and tips to help you improve your website's search engine optimization.",
link: "https://github.com/awesomelistsio/awesome-seo"
},
{
title: "Awesome Social Media",
description:
"A curated list of resources and tips to level up your social media game!",
link: "https://github.com/awesomelistsio/awesome-social-media"
},
{
title: "Awesome Aerospace Engineering",
description:
"A curated list of tools, frameworks, resources, and educational content for aerospace engineering.",
link: "https://github.com/awesomelistsio/awesome-aerospace-engineering"
},
{
title: "Awesome Civil Engineering",
description:
"A curated list of tools, frameworks, resources, and educational content for civil engineering.",
link: "https://github.com/awesomelistsio/awesome-civil-engineering"
},
{
title: "Awesome Drone Engineers",
description:
"A curated list of resources, tools, and communities for drone engineers.",
link: "https://github.com/awesomelistsio/awesome-drone-engineers"
},
{
title: "Awesome Environmental Engineering",
description:
"A curated list of tools, frameworks, resources, and educational content for environmental engineering.",
link: "https://github.com/awesomelistsio/awesome-environmental-engineering"
},
{
title: "Awesome Mechanical Engineering",
description:
"A curated list of tools, platforms, resources, and educational content for mechanical engineering.",
link: "https://github.com/awesomelistsio/awesome-mechanical-engineering"
},
{
title: "Awesome Robotics",
description:
"A curated list of tools, frameworks, libraries, and resources for robotics.",
link: "https://github.com/awesomelistsio/awesome-robotics"
},
{
title: "Awesome Electron",
description:
"A curated list of awesome resources for developing applications with Electron, a framework that allows you to build cross-platform desktop apps using web technologies.",
link: "https://github.com/awesomelistsio/awesome-electron"
},
{
title: "Awesome Game Engines",
description:
"A curated list of game engines, frameworks, tools, and resources for game development.",
link: "https://github.com/awesomelistsio/awesome-game-engines"
},
{
title: "Awesome Computational Mathematics",
description:
"A curated list of tools, frameworks, libraries, and educational resources for computational mathematics.",
link: "https://github.com/awesomelistsio/awesome-computational-mathematics"
},
{
title: "Awesome Open Source Math Tools",
description:
"A curated list of open-source tools, libraries, and resources for mathematical computations.",
link: "https://github.com/awesomelistsio/awesome-open-source-math-tools"
},
{
title: "Awesome Audiovisual",
description:
"A curated list of awesome tools, libraries, frameworks, and resources for working with audiovisual content, including video editing, audio processing, streaming, and multimedia applications.",
link: "https://github.com/awesomelistsio/awesome-audiovisual"
},
{
title: "Awesome FFmpeg",
description:
"A curated list of awesome tools, libraries, guides, and resources for FFmpeg, a complete, cross-platform solution to record, convert, and stream audio and video.",
link: "https://github.com/awesomelistsio/awesome-ffmpeg"
},
{
title: "Awesome Podcasting Tools",
description:
"A curated list of tools, platforms, resources, and tips for podcasting.",
link: "https://github.com/awesomelistsio/awesome-podcasting-tools"
},
{
title: "Awesome Node.js",
description:
"A curated list of awesome Node.js packages and resources to enhance your development experience.",
link: "https://github.com/awesomelistsio/awesome-nodejs"
},
{
title: "Awesome Quantum Programming Frameworks",
description:
"A curated list of frameworks, tools, libraries, and resources for quantum programming.",
link:
"https://github.com/awesomelistsio/awesome-quantum-programming-frameworks"
},
{
title: "Awesome Neuroscience",
description:
"A curated list of tools, frameworks, datasets, educational resources, and community links for neuroscience.",
link: "https://github.com/awesomelistsio/awesome-neuroscience"
},
{
title: "Awesome Open Science",
description:
"A curated list of tools, platforms, resources, and communities that promote open science.",
link: "https://github.com/awesomelistsio/awesome-open-science"
},
{
title: "Awesome Green Cloud Computing",
description:
"A curated list of awesome tools, resources, frameworks, and educational content focused on Green Cloud Computing.",
link: "https://github.com/awesomelistsio/awesome-green-cloud-computing"
},
{
title: "Awesome Open Source Space Data APIs",
description:
"A curated list of open source APIs, tools, and resources for accessing and analyzing space-related data.",
link:
"https://github.com/awesomelistsio/awesome-open-source-space-data-apis"
},
{
title: "Awesome Digital Nomads",
description:
"A curated list of awesome resources, tools, communities, and tips for digital nomads who want to embrace a location-independent lifestyle.",
link: "https://github.com/awesomelistsio/awesome-digital-nomads"
},
{
title: "Awesome Travel Hacking",
description:
"A curated list of awesome resources, tools, and strategies for travel hacking, designed to help you save money, earn points and miles, and travel the world for less.",
link: "https://github.com/awesomelistsio/awesome-travel-hacking"
},
{
title: "Awesome Web Accessibility",
description:
"A curated list of awesome resources, tools, and tips to improve web accessibility.",
link: "https://github.com/awesomelistsio/awesome-web-accessibility"
},
{
title: "Awesome Web Performance",
description:
"A curated list of awesome resources, tools, and tips to improve web performance.",
link: "https://github.com/awesomelistsio/awesome-web-performance"
},
{
title: "Awesome ColdFusion",
description:
"A curated list of awesome ColdFusion resources and tips for developers.",
link: "https://github.com/awesomelistsio/awesome-coldfusion"
},
{
title: "Awesome Erlang",
description:
"A curated list of awesome frameworks, libraries, tools, and resources for Erlang programming.",
link: "https://github.com/awesomelistsio/awesome-erlang"
},
{
title: "Awesome Go",
description:
"A curated list of awesome Go resources and tips to help you become a more productive and proficient Go developer.",
link: "https://github.com/awesomelistsio/awesome-go"
},
{
title: "Awesome Haskell",
description: "A curated list of awesome Haskell resources and tips.",
link: "https://github.com/awesomelistsio/awesome-haskell"
},
{
title: "Awesome npm",
description:
"A curated list of awesome npm resources, tips, and best practices.",
link: "https://github.com/awesomelistsio/awesome-npm"
},
{
title: "Awesome OCaml",
description:
"A curated list of awesome frameworks, libraries, tools, and resources for the OCaml programming language.",
link: "https://github.com/awesomelistsio/awesome-ocaml"
},
{
title: "Awesome Java",
description:
"A curated list of awesome frameworks, libraries, tools, and resources for Java programming.",
link: "https://github.com/awesomelistsio/awesome-java"
},
{
title: "Awesome Julia",
description:
"A curated list of awesome resources, libraries, tools, and tips for Julia programming.",
link: "https://github.com/awesomelistsio/awesome-julia"
},
{
title: "Awesome Kotlin",
description:
"A curated list of awesome tools, libraries, frameworks, and resources for Kotlin.",
link: "https://github.com/awesomelistsio/awesome-kotlin"
},
{
title: "Awesome Perl",
description:
"A curated list of awesome frameworks, libraries, tools, and resources for the Perl programming language.",
link: "https://github.com/awesomelistsio/awesome-perl"
},
{
title: "Awesome PureScript",
description:
"A curated list of awesome PureScript resources, libraries, tools, and tips.",
link: "https://github.com/awesomelistsio/awesome-purescript"
},
{
title: "Awesome Python",
description:
"A curated list of awesome frameworks, libraries, tools, and resources for Python programming.",
link: "https://github.com/awesomelistsio/awesome-python"
},
{
title: "Awesome R",
description:
"A curated list of awesome R frameworks, libraries, tools, and resources for data analysis, statistics, and visualization.",
link: "https://github.com/awesomelistsio/awesome-r"
},
{
title: "Awesome Ruby",
description:
"A curated list of awesome Ruby resources, libraries, frameworks, and tips to help you level up your Ruby development skills.",
link: "https://github.com/awesomelistsio/awesome-ruby"
},
{
title: "Awesome Rust",
description:
"A curated list of awesome resources and tips for Rust programming language enthusiasts.",
link: "https://github.com/awesomelistsio/awesome-rust"
},
{
title: "Awesome Scala",
description:
"A curated list of awesome resources and tips for Scala development.",
link: "https://github.com/awesomelistsio/awesome-scala"
},
{
title: "Awesome Swift",
description:
"A curated list of awesome Swift frameworks, libraries, and resources.",
link: "https://github.com/awesomelistsio/awesome-swift"
},
{
title: "Awesome TypeScript",
description:
"A curated list of awesome tools, libraries, frameworks, and resources for TypeScript.",
link: "https://github.com/awesomelistsio/awesome-typescript"
}
];
let favorites = JSON.parse(localStorage.getItem('favorites')) || [];
let currentPage = 1;
const itemsPerPage = 12;
let currentView = 'all';
function saveFavorites() {
localStorage.setItem('favorites', JSON.stringify(favorites));
}
function toggleFavorite(title) {
if (favorites.includes(title)) {
favorites = favorites.filter(fav => fav !== title);
} else {
favorites.push(title);
}
saveFavorites();
displayLists();
}
function shareList(title, link) {
if (navigator.share) {
navigator.share({
title: `Check out ${title}`,
text: `I found this awesome list: ${title}`,
url: link
}).catch(console.error);
} else {
alert("Sharing not supported on this browser.");
}
}
function displayLists() {
const grid = document.getElementById('awesomeGrid');
const dataSource = currentView === 'favorites' ? awesomeLists.filter(list => favorites.includes(list.title)) : awesomeLists;
const startIndex = (currentPage - 1) * itemsPerPage;
const endIndex = startIndex + itemsPerPage;
const visibleLists = dataSource.slice(startIndex, endIndex);
grid.innerHTML = '';
if (visibleLists.length === 0) {
grid.innerHTML = `<p class="text-center text-gray-500">No lists to display.</p>`;
return;
}
visibleLists.forEach(list => {
const isFavorited = favorites.includes(list.title);
const listItem = document.createElement('div');
listItem.className = 'p-6 bg-white rounded-lg shadow-md border border-gray-200';
listItem.innerHTML = `
<div class="flex flex-col h-full">
<h2 class="text-xl font-semibold mb-2">${list.title}</h2>
<p class="mb-4 text-gray-700">${list.description}</p>
<div class="mt-auto flex justify-between items-center">
<button onclick="toggleFavorite('${list.title}')" class="text-red-600">
${isFavorited ? 'Unfavorite' : 'Favorite'}
</button>
<button onclick="shareList('${list.title}', '${list.link}')" class="text-green-600">
Share
</button>
<a href="${list.link}" target="_blank" class="text-blue-600 hover:underline">View List</a>
</div>
</div>
`;
grid.appendChild(listItem);
});
displayPagination(dataSource);
}
function displayPagination(dataSource) {
const controls = document.getElementById('paginationControls');
const totalPages = Math.ceil(dataSource.length / itemsPerPage);
controls.innerHTML = '';
for (let i = 1; i <= totalPages; i++) {
const button = document.createElement('button');
button.textContent = i;
button.className = `px-3 py-1 border rounded ${i === currentPage ? 'bg-blue-500 text-white' : ''}`;
button.onclick = () => {
currentPage = i;
displayLists();
};
controls.appendChild(button);
}
}
function showLists(view) {
currentView = view;
document.getElementById('allTab').classList.toggle('bg-blue-500', view === 'all');
document.getElementById('favoritesTab').classList.toggle('bg-blue-500', view === 'favorites');
displayLists();
}
function toggleDarkMode() {
const html = document.documentElement;
if (html.classList.contains('light')) {
html.classList.replace('light', 'dark');
document.body.classList.replace('bg-gray-100', 'bg-gray-900');
} else {
html.classList.replace('dark', 'light');
document.body.classList.replace('bg-gray-900', 'bg-gray-100');
}
}
document.getElementById('toggleDarkMode').addEventListener('click', toggleDarkMode);
// Initial render
displayLists();