theWitcher commited on
Commit
06dff87
·
1 Parent(s): 1a0595a

Removed index_with_tts.html file and updated index.html to enhance video modal functionality, allowing for both YouTube links and direct video URLs. Adjusted styles for improved user experience. Added new entries in tools.json for "Google Labs FX," "Imagen," and "KolWrite," each with detailed descriptions, logos, and categorization, while marking them as new tools.

Browse files
Files changed (3) hide show
  1. index.html +24 -6
  2. index_with_tts.html +0 -1864
  3. tools.json +42 -0
index.html CHANGED
@@ -5,7 +5,7 @@ https://huggingface.co/spaces/theWitcher/sagi-ai-tools
5
  https://chatgpt.com/c/67efa5ae-ab80-8005-a7d4-de3ced6ccec4
6
 
7
  https://bit.ly/a-tools
8
- sagi test sss
9
  -->
10
 
11
  <!DOCTYPE html>
@@ -801,13 +801,13 @@ sagi test sss
801
  >
802
  <button
803
  onclick="closeVideoModal()"
804
- class="absolute top-2 left-2 text-gray-700 hover:text-red-600 text-xl"
805
  >
806
  <i class="fas fa-times"></i>
807
  </button>
808
  <iframe
809
  id="videoIframe"
810
- class="w-full h-[300px] sm:h-[500px]"
811
  src=""
812
  frameborder="0"
813
  allowfullscreen
@@ -1869,14 +1869,32 @@ sagi test sss
1869
  function openVideoModal(url) {
1870
  const modal = document.getElementById('videoModal');
1871
  const iframe = document.getElementById('videoIframe');
1872
- iframe.src = url;
 
 
 
 
 
 
 
 
 
 
 
 
1873
  modal.classList.remove('hidden');
1874
  }
1875
 
1876
  function closeVideoModal() {
1877
  const modal = document.getElementById('videoModal');
1878
- const iframe = document.getElementById('videoIframe');
1879
- iframe.src = '';
 
 
 
 
 
 
1880
  modal.classList.add('hidden');
1881
  }
1882
  fetch('tools.json')
 
5
  https://chatgpt.com/c/67efa5ae-ab80-8005-a7d4-de3ced6ccec4
6
 
7
  https://bit.ly/a-tools
8
+
9
  -->
10
 
11
  <!DOCTYPE html>
 
801
  >
802
  <button
803
  onclick="closeVideoModal()"
804
+ class="absolute top-4 right-4 bg-white bg-opacity-90 border border-gray-300 rounded-full p-3 shadow-lg text-gray-900 hover:bg-red-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-red-400 text-3xl z-[10000] transition-all duration-200"
805
  >
806
  <i class="fas fa-times"></i>
807
  </button>
808
  <iframe
809
  id="videoIframe"
810
+ class="w-full h-[60vh]"
811
  src=""
812
  frameborder="0"
813
  allowfullscreen
 
1869
  function openVideoModal(url) {
1870
  const modal = document.getElementById('videoModal');
1871
  const iframe = document.getElementById('videoIframe');
1872
+
1873
+ // Check if the URL is a YouTube link
1874
+ if (url.includes('youtube.com') || url.includes('youtu.be')) {
1875
+ iframe.src = url;
1876
+ } else {
1877
+ // For direct video URLs, create a video element
1878
+ iframe.outerHTML = `
1879
+ <video id="videoIframe" controls class="w-full h-[60vh]">
1880
+ <source src="${url}" type="video/mp4">
1881
+ Your browser does not support the video tag.
1882
+ </video>
1883
+ `;
1884
+ }
1885
  modal.classList.remove('hidden');
1886
  }
1887
 
1888
  function closeVideoModal() {
1889
  const modal = document.getElementById('videoModal');
1890
+ const videoElement = document.getElementById('videoIframe');
1891
+
1892
+ if (videoElement.tagName === 'VIDEO') {
1893
+ videoElement.pause();
1894
+ videoElement.outerHTML = '<iframe id="videoIframe" class="w-full h-[60vh]" frameborder="0" allowfullscreen></iframe>';
1895
+ } else {
1896
+ videoElement.src = '';
1897
+ }
1898
  modal.classList.add('hidden');
1899
  }
1900
  fetch('tools.json')
index_with_tts.html DELETED
@@ -1,1864 +0,0 @@
1
- <!--
2
- https://thewitcher-sagi-ai-tools.static.hf.space/index.html
3
- https://huggingface.co/spaces/theWitcher/sagi-ai-tools
4
-
5
- https://chatgpt.com/c/67efa5ae-ab80-8005-a7d4-de3ced6ccec4
6
-
7
- https://bit.ly/a-tools
8
-
9
- -->
10
-
11
- <!DOCTYPE html>
12
- <html dir="rtl" lang="he">
13
- <head>
14
- <meta charset="UTF-8" />
15
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
16
- <title>ארגז הכלים שלי לבינה מלאכותית</title>
17
- <link
18
- href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
19
- rel="stylesheet"
20
- />
21
-
22
- <style>
23
- @import url('https://fonts.googleapis.com/css2?family=Arimo:wght@400;500;600;700&display=swap');
24
-
25
- body {
26
- font-family: 'Arimo', sans-serif;
27
- background-color: #f9fafb;
28
- }
29
-
30
- .tool-card:hover {
31
- transform: translateY(-5px);
32
- box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
33
- 0 10px 10px -5px rgba(0, 0, 0, 0.04);
34
- }
35
-
36
- .category-filter .active {
37
- background-color: #3b82f6;
38
- color: white;
39
- }
40
-
41
- .gradient-text {
42
- background: linear-gradient(90deg, #3b82f6, #8b5cf6);
43
- -webkit-background-clip: text;
44
- background-clip: text;
45
- color: transparent;
46
- }
47
-
48
- /* RTL specific styles */
49
- [dir='rtl'] .rotate-180 {
50
- transform: rotate(180deg);
51
- }
52
-
53
- /* Mobile menu styles */
54
- .mobile-menu {
55
- max-height: 0;
56
- overflow: hidden;
57
- transition: max-height 0.3s ease-out;
58
- }
59
-
60
- .mobile-menu.open {
61
- max-height: 500px;
62
- }
63
-
64
- /* Admin badge */
65
- .admin-badge {
66
- position: absolute;
67
- top: -8px;
68
- right: -8px;
69
- background-color: #ef4444;
70
- color: white;
71
- border-radius: 9999px;
72
- width: 20px;
73
- height: 20px;
74
- display: flex;
75
- align-items: center;
76
- justify-content: center;
77
- font-size: 10px;
78
- }
79
-
80
- /* Futuristic profile image */
81
- .profile-container {
82
- position: relative;
83
- width: 200px;
84
- height: 200px;
85
- margin: 0 auto;
86
- }
87
-
88
- .profile-image {
89
- width: 100%;
90
- height: 100%;
91
- border-radius: 50%;
92
- object-fit: cover;
93
- border: 4px solid #3b82f6;
94
- box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
95
- position: relative;
96
- z-index: 2;
97
- }
98
-
99
- .tech-circle {
100
- position: absolute;
101
- border-radius: 50%;
102
- border: 2px solid rgba(59, 130, 246, 0.7);
103
- animation: rotate infinite linear;
104
- }
105
-
106
- .tech-circle-1 {
107
- width: 220px;
108
- height: 220px;
109
- top: -10px;
110
- left: -10px;
111
- animation-duration: 15s;
112
- border-style: dashed;
113
- }
114
-
115
- .tech-circle-2 {
116
- width: 240px;
117
- height: 240px;
118
- top: -20px;
119
- left: -20px;
120
- animation-duration: 20s;
121
- animation-direction: reverse;
122
- }
123
-
124
- .tech-circle-3 {
125
- width: 260px;
126
- height: 260px;
127
- top: -30px;
128
- left: -30px;
129
- animation-duration: 25s;
130
- border-style: dotted;
131
- }
132
-
133
- @keyframes rotate {
134
- from {
135
- transform: rotate(0deg);
136
- }
137
- to {
138
- transform: rotate(360deg);
139
- }
140
- }
141
-
142
- .tech-dots {
143
- position: absolute;
144
- width: 100%;
145
- height: 100%;
146
- border-radius: 50%;
147
- z-index: 1;
148
- }
149
-
150
- .tech-dot {
151
- position: absolute;
152
- width: 8px;
153
- height: 8px;
154
- background-color: #8b5cf6;
155
- border-radius: 50%;
156
- transform: translate(-50%, -50%);
157
- }
158
-
159
- /* Futuristic AI elements */
160
- .ai-particle {
161
- position: absolute;
162
- background: linear-gradient(135deg, #3b82f6, #8b5cf6);
163
- border-radius: 50%;
164
- opacity: 0.6;
165
- filter: blur(10px);
166
- z-index: 0;
167
- }
168
-
169
- .ai-circuit {
170
- position: absolute;
171
- width: 100%;
172
- height: 100%;
173
- background-image: radial-gradient(
174
- circle at center,
175
- transparent 0%,
176
- #f9fafb 100%
177
- ),
178
- linear-gradient(
179
- 90deg,
180
- transparent 49%,
181
- rgba(59, 130, 246, 0.1) 50%,
182
- transparent 51%
183
- ),
184
- linear-gradient(
185
- 0deg,
186
- transparent 49%,
187
- rgba(59, 130, 246, 0.1) 50%,
188
- transparent 51%
189
- );
190
- background-size: 20px 20px;
191
- border-radius: 50%;
192
- opacity: 0.3;
193
- }
194
- /* Added cursor style for clickable stats */
195
- .clickable-stat:hover {
196
- cursor: pointer;
197
- background-color: #f3f4f6; /* Slightly lighter gray on hover */
198
- }
199
- </style>
200
- <!-- Google tag (gtag.js) -->
201
- <script
202
- async
203
- src="https://www.googletagmanager.com/gtag/js?id=G-JVF8N1DVSG"
204
- ></script>
205
- <script>
206
- window.dataLayer = window.dataLayer || [];
207
- function gtag() {
208
- dataLayer.push(arguments);
209
- }
210
- gtag('js', new Date());
211
-
212
- gtag('config', 'G-JVF8N1DVSG');
213
- </script>
214
- <link href="favicon-32.png" rel="icon" sizes="32x32" type="image/png" />
215
- <link href="manifest.json" rel="manifest" />
216
- <meta content="yes" name="apple-mobile-web-app-capable" />
217
- <meta content="AI Tools" name="apple-mobile-web-app-title" />
218
- <link href="icon-192.png" rel="apple-touch-icon" />
219
- <meta content="#3b82f6" name="theme-color" />
220
- </head>
221
- <body class="min-h-screen">
222
- <div
223
- id="newToolBanner"
224
- class="hidden bg-green-100 text-green-800 text-center py-2 text-sm font-semibold"
225
- >
226
- 🎉 התווסף כלי חדש: <span id="newToolName"></span> –
227
- <a href="#toolsContainer" class="underline">צפו עכשיו</a>
228
- <button id="closeBanner" class="ml-4 text-green-800 font-bold">×</button>
229
- </div>
230
-
231
- <!-- Header -->
232
- <header
233
- class="sticky top-0 z-50 backdrop-blur-md bg-white/80 shadow-md border-b border-gray-200"
234
- >
235
- <div class="container mx-auto px-4 py-4">
236
- <div class="flex justify-between items-center">
237
- <div class="flex items-center">
238
- <!-- Mobile menu button -->
239
- <button id="mobileMenuButton" class="md:hidden text-gray-600 mr-4">
240
- <i class="fas fa-bars text-xl"></i>
241
- </button>
242
-
243
- <div>
244
- <h1 class="text-2xl md:text-3xl font-bold gradient-text">
245
- ארגז הכלים שלי ל-AI
246
- </h1>
247
- <p class="text-gray-600 text-sm md:text-base mt-1">
248
- אוסף כלי הבינה המלאכותית המומלצים שלי
249
- </p>
250
- </div>
251
- </div>
252
-
253
- <div class="hidden md:flex items-center space-x-4 space-x-reverse">
254
- <!-- /* --- Refresh Button - Still useful for resetting filters/sort --- */ -->
255
- <button
256
- id="refreshBtn"
257
- class="px-5 py-2 rounded-xl bg-gradient-to-l from-blue-600 to-indigo-500 text-white shadow-md hover:shadow-lg hover:from-blue-700 hover:to-indigo-600 transition-all duration-300"
258
- >
259
- <i class="fas fa-sync-alt ml-2"></i> אפס תצוגה
260
- </button>
261
-
262
- <!-- /* --- Admin Edit Button - Uncomment if needed --- */ -->
263
- <button
264
- id="editJsonBtn"
265
- class="px-5 py-2 rounded-xl bg-gradient-to-l from-pink-500 to-purple-600 text-white shadow-md hover:shadow-lg hover:from-pink-600 hover:to-purple-700 transition-all duration-300 relative"
266
- >
267
- <i class="fas fa-edit ml-2"></i> הציעו כלי חדש
268
- <span class="admin-badge">N</span>
269
- </button>
270
- </div>
271
- </div>
272
-
273
- <!-- /* --- Mobile menu --- */ -->
274
- <div id="mobileMenu" class="mobile-menu md:hidden mt-4">
275
- <div class="flex flex-col space-y-2 py-2">
276
- <button
277
- id="refreshBtnMobile"
278
- class="px-5 py-2 rounded-xl bg-gradient-to-l from-blue-600 to-indigo-500 text-white shadow-md hover:shadow-lg hover:from-blue-700 hover:to-indigo-600 transition-all duration-300"
279
- >
280
- <i class="fas fa-sync-alt ml-2"></i> אפס תצוגה
281
- </button>
282
- <!-- /* --- Admin Edit Button (Mobile) - Uncomment if needed --- */ -->
283
- <button
284
- id="editJsonBtn"
285
- class="px-5 py-2 rounded-xl bg-gradient-to-l from-pink-500 to-purple-600 text-white shadow-md hover:shadow-lg hover:from-pink-600 hover:to-purple-700 transition-all duration-300 relative"
286
- >
287
- <i class="fas fa-edit ml-2"></i> הציעו כלי חדש
288
- <span class="admin-badge">N</span>
289
- </button>
290
- </div>
291
- </div>
292
- </div>
293
- </header>
294
-
295
- <!-- /* --- Main Content --- */ -->
296
- <main class="container mx-auto px-4 py-8">
297
- <!-- /* --- About Me Section --- */ -->
298
- <div
299
- class="bg-white rounded-lg shadow-sm p-6 border border-gray-100 mb-8 relative overflow-hidden"
300
- >
301
- <!-- /* ... (content unchanged) ... */ -->
302
- <div
303
- class="ai-particle"
304
- style="width: 100px; height: 100px; top: -30px; right: -30px"
305
- ></div>
306
- <div
307
- class="ai-particle"
308
- style="width: 150px; height: 150px; bottom: -50px; left: -50px"
309
- ></div>
310
- <div
311
- class="ai-particle"
312
- style="width: 80px; height: 80px; top: 50%; right: 20%"
313
- ></div>
314
-
315
- <h2 class="text-2xl font-bold mb-6 text-gray-800 border-b pb-2">
316
- קצת עליי
317
- </h2>
318
- <div class="flex flex-col md:flex-row gap-6">
319
- <div class="md:w-1/3">
320
- <div class="profile-container">
321
- <div class="ai-circuit"></div>
322
- <div class="tech-circle tech-circle-1"></div>
323
- <div class="tech-circle tech-circle-2"></div>
324
- <div class="tech-circle tech-circle-3"></div>
325
- <div class="tech-dots">
326
- <div class="tech-dot" style="top: 10%; left: 50%"></div>
327
- <div class="tech-dot" style="top: 50%; left: 10%"></div>
328
- <div class="tech-dot" style="top: 90%; left: 50%"></div>
329
- <div class="tech-dot" style="top: 50%; left: 90%"></div>
330
- <div class="tech-dot" style="top: 30%; left: 30%"></div>
331
- <div class="tech-dot" style="top: 70%; left: 70%"></div>
332
- <div class="tech-dot" style="top: 30%; left: 70%"></div>
333
- <div class="tech-dot" style="top: 70%; left: 30%"></div>
334
- </div>
335
- <img
336
- src="https://i.imgur.com/cnlxCuj.jpeg"
337
- alt="שגיא בר און"
338
- class="profile-image"
339
- />
340
- </div>
341
- </div>
342
- <div class="md:w-2/3">
343
- <h3 class="text-xl font-semibold mb-4">שגיא בר און</h3>
344
- <p class="text-gray-700 mb-4">
345
- אני חוקר ויועץ בתחום הבינה המלאכותית, מאסטר NLP, ובעל ניסיון של
346
- למעלה מ-25 שנה בתעשיית ההייטק. בעל מומחיות רחבה בפיתוח תוכנה,
347
- אוטומציה, ניהול פרויקטים ואסטרטגיה עסקית.
348
- </p>
349
- <p class="text-gray-700 mb-4">
350
- מרצה אורח באוניברסיטת רייכמן וחבר בסגל הבוחנים של מה"ט - המכון
351
- הממשלתי להכשרה בטכנולוגיה ובמדע - לבחינות מהנדסי תוכנה
352
- באוניברסיטאות ובמכללות, וכן מנטור לAI במסגרת משרד החינוך.
353
- </p>
354
- <p class="text-gray-700 mb-4">
355
- בעל תואר שני במנהל עסקים עם התמחות בבינה מלאכותית, תואר ראשון
356
- (BSc) במדעי המחשב והנדסאי תוכנה. ההרצאות משלבות ידע עדכני, חשיבה
357
- ביקורתית והתנסות חווייתית, מתוך מטרה להעצים אנשים ולאפשר להם
358
- להשתמש בטכנולוגיה בחוכמה ובקלות.
359
- </p>
360
- <p class="text-gray-700">
361
- שמתי לי למטרה להנגיש, להסביר ולחבר את הטכנולוגיה בצורה פשוטה
362
- וברורה לכולם.
363
- </p>
364
- </div>
365
- </div>
366
- </div>
367
-
368
- <!-- /* --- Search and Filters --- */ -->
369
- <div class="mb-8">
370
- <!-- /* ... (content unchanged) ... */ -->
371
- <div
372
- class="flex flex-col md:flex-row md:items-center md:justify-between gap-4"
373
- >
374
- <div class="relative w-full md:w-96">
375
- <input
376
- type="text"
377
- id="searchInput"
378
- placeholder="חפש כלים..."
379
- class="w-full pr-10 pl-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition"
380
- />
381
- <i class="fas fa-search absolute right-3 top-3.5 text-gray-400"></i>
382
- </div>
383
- <div class="flex items-center space-x-2 space-x-reverse">
384
- <span class="text-gray-600 hidden md:block">סנן לפי:</span>
385
- <div class="category-filter flex flex-wrap gap-2">
386
- <button
387
- class="filter-btn px-3 py-1 rounded-full border text-sm transition border-gray-300 text-gray-700 bg-white hover:bg-blue-50"
388
- data-category="all"
389
- >
390
- הכל
391
- </button>
392
- <button
393
- class="filter-btn px-3 py-1 rounded-full border text-sm transition border-gray-300 text-gray-700 bg-white hover:bg-blue-50"
394
- data-category="productivity"
395
- >
396
- פרודוקטיביות
397
- </button>
398
- <button
399
- class="filter-btn px-3 py-1 rounded-full border text-sm transition border-gray-300 text-gray-700 bg-white hover:bg-blue-50"
400
- data-category="writing"
401
- >
402
- כתיבה
403
- </button>
404
- <button
405
- class="filter-btn px-3 py-1 rounded-full border text-sm transition border-gray-300 text-gray-700 bg-white hover:bg-blue-50"
406
- data-category="design"
407
- >
408
- עיצוב
409
- </button>
410
- <button
411
- class="filter-btn px-3 py-1 rounded-full border text-sm transition border-gray-300 text-gray-700 bg-white hover:bg-blue-50"
412
- data-category="coding"
413
- >
414
- תכנות
415
- </button>
416
- <button
417
- class="filter-btn px-3 py-1 rounded-full border text-sm transition border-gray-300 text-gray-700 bg-white hover:bg-blue-50"
418
- data-category="video"
419
- >
420
- וידאו
421
- </button>
422
- </div>
423
- </div>
424
- </div>
425
- </div>
426
-
427
- <!-- /* --- Stats --- */ -->
428
- <div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
429
- <!-- /* ... (content unchanged, including clickable stat boxes) ... */ -->
430
- <div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
431
- <div class="flex items-center">
432
- <div class="p-3 rounded-full bg-blue-50 text-blue-600 ml-3">
433
- <i class="fas fa-tools text-lg"></i>
434
- </div>
435
- <div>
436
- <p class="text-gray-500 text-sm">סה"כ כלים</p>
437
- <h3 class="text-xl font-semibold" id="totalTools">0</h3>
438
- </div>
439
- </div>
440
- </div>
441
- <div
442
- id="topRatedStatBox"
443
- class="bg-white p-4 rounded-lg shadow-sm border border-gray-100 transition clickable-stat"
444
- >
445
- <div class="flex items-center">
446
- <div class="p-3 rounded-full bg-purple-50 text-purple-600 ml-3">
447
- <i class="fas fa-star text-lg"></i>
448
- </div>
449
- <div>
450
- <p class="text-gray-500 text-sm">מובילים בדירוג</p>
451
- <h3 class="text-xl font-semibold" id="topRated">0</h3>
452
- </div>
453
- </div>
454
- </div>
455
- <div
456
- id="newToolsStatBox"
457
- class="bg-white p-4 rounded-lg shadow-sm border border-gray-100 transition clickable-stat"
458
- >
459
- <div class="flex items-center">
460
- <div class="p-3 rounded-full bg-green-50 text-green-600 ml-3">
461
- <i class="fas fa-bolt text-lg"></i>
462
- </div>
463
- <div>
464
- <p class="text-gray-500 text-sm">חדשים השבוע</p>
465
- <h3 class="text-xl font-semibold" id="newTools">0</h3>
466
- </div>
467
- </div>
468
- </div>
469
- <div class="bg-white p-4 rounded-lg shadow-sm border border-gray-100">
470
- <div class="flex items-center">
471
- <div class="p-3 rounded-full bg-yellow-50 text-yellow-600 ml-3">
472
- <i class="fas fa-tags text-lg"></i>
473
- </div>
474
- <div>
475
- <p class="text-gray-500 text-sm">קטגוריות</p>
476
- <h3 class="text-xl font-semibold" id="totalCategories">0</h3>
477
- </div>
478
- </div>
479
- </div>
480
- </div>
481
-
482
- <!-- /* --- Tools Grid --- */ -->
483
- <div
484
- class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"
485
- id="toolsContainer"
486
- >
487
- <!-- /* --- Tools will be loaded here --- */ -->
488
- <p id="loadingMessage" class="text-center text-gray-500 col-span-full">
489
- טוען כלים...
490
- </p>
491
- </div>
492
-
493
- <!-- /* --- YouTube Videos Section --- */ -->
494
- <div class="mt-16">
495
- <!-- /* ... (content unchanged) ... */ -->
496
- <h2 class="text-2xl font-bold mb-6 text-gray-800 border-b pb-2">
497
- סרטונים נבחרים מערוץ היוטיוב שלי
498
- </h2>
499
- <div
500
- class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"
501
- id="videosContainer"
502
- >
503
- <!-- /* --- Videos will be loaded here --- */ -->
504
- </div>
505
- </div>
506
- </main>
507
-
508
- <!-- /* --- JSON Editor Modal (Admin Feature) --- */ -->
509
- <div
510
- id="jsonEditorModal"
511
- class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"
512
- >
513
- <!-- /* ... (content unchanged) ... */ -->
514
- <div
515
- class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] flex flex-col"
516
- >
517
- <div
518
- class="px-6 py-4 border-b border-gray-200 flex justify-between items-center"
519
- >
520
- <h3 class="text-lg font-semibold">עריכת הנתונים ב-JSON</h3>
521
- <button id="closeModalBtn" class="text-gray-500 hover:text-gray-700">
522
- <i class="fas fa-times"></i>
523
- </button>
524
- </div>
525
- <div class="p-6 flex-1 overflow-auto">
526
- <div class="flex mb-4">
527
- <button
528
- id="showToolsBtn"
529
- class="px-4 py-2 bg-blue-600 text-white rounded-l-lg"
530
- >
531
- כלים
532
- </button>
533
- <button
534
- id="showVideosBtn"
535
- class="px-4 py-2 bg-gray-200 text-gray-700 rounded-r-lg"
536
- >
537
- סרטונים
538
- </button>
539
- </div>
540
- <textarea
541
- id="jsonEditor"
542
- class="w-full h-96 p-4 border border-gray-300 rounded-lg font-mono text-sm"
543
- spellcheck="false"
544
- style="direction: ltr; text-align: left"
545
- ></textarea>
546
- </div>
547
- <div
548
- class="px-6 py-4 border-t border-gray-200 flex justify-end space-x-3 space-x-reverse"
549
- >
550
- <button
551
- id="cancelEditBtn"
552
- class="px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-50 transition"
553
- >
554
- ביטול
555
- </button>
556
- <button
557
- id="saveJsonBtn"
558
- class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition"
559
- >
560
- שמור שינויים (באחסון המקומי)
561
- </button>
562
- </div>
563
- </div>
564
- </div>
565
- <div
566
- id="suggestToolModal"
567
- class="fixed inset-0 bg-black bg-opacity-40 flex items-center justify-center z-[9999] px-4 hidden"
568
- >
569
- <div
570
- class="bg-white rounded-lg w-full max-w-md shadow-lg max-h-[90vh] overflow-hidden flex flex-col text-right relative"
571
- >
572
- <!-- תוכן -->
573
- <div class="p-6 overflow-y-auto flex-grow">
574
- <h2 class="text-xl font-semibold mb-4">הצעת כלי חדש</h2>
575
- <form id="suggestToolForm" class="space-y-4">
576
- <div>
577
- <label class="block mb-1">שם הכלי</label>
578
- <input
579
- type="text"
580
- name="name"
581
- required
582
- class="w-full border rounded p-2"
583
- />
584
- </div>
585
-
586
- <div>
587
- <label class="block mb-1">לינק</label>
588
- <input
589
- type="url"
590
- name="url"
591
- required
592
- placeholder="כתובת URL של הכלי: לדוגמא: https://linktr.ee/sagib"
593
- dir="ltr"
594
- class="w-full border rounded p-2"
595
- />
596
- </div>
597
-
598
- <div>
599
- <label class="block mb-1">תיאור קצר</label>
600
- <textarea
601
- name="description"
602
- required
603
- class="w-full border rounded p-2"
604
- ></textarea>
605
- </div>
606
-
607
- <div>
608
- <label class="block mb-1">השם שלך</label>
609
- <input
610
- type="text"
611
- name="userName"
612
- placeholder="איך לקרוא לך כשנחזור אליך?"
613
- class="w-full border rounded p-2"
614
- />
615
- </div>
616
-
617
- <div>
618
- <label class="block mb-1">מס' טלפון נייד</label>
619
- <input
620
- type="tel"
621
- name="userPhone"
622
- placeholder="05X-XXXXXXX"
623
- class="w-full border rounded p-2"
624
- dir="ltr"
625
- />
626
- </div>
627
-
628
- <p class="text-sm text-gray-500">
629
- נשמח לחזור אליך כשהכלי שצעת נוסף לאתר ❤️
630
- </p>
631
- <p class="text-sm text-gray-500 italic">
632
- ✦ הפרטים שלך נשמרים אצלנו רק לצורך עדכון – אין שימוש אחר.
633
- </p>
634
- </form>
635
- </div>
636
-
637
- <!-- כפתורים קבועים בתחתית -->
638
- <div
639
- class="sticky bottom-0 bg-white/80 backdrop-blur-md px-6 py-4 border-t flex justify-center space-x-4 space-x-reverse z-10 rounded-b-lg"
640
- >
641
- <button
642
- type="button"
643
- onclick="closeSuggestModal()"
644
- class="px-5 py-2 bg-gray-200 text-gray-800 rounded hover:bg-gray-300"
645
- >
646
- ביטול
647
- </button>
648
- <button
649
- type="submit"
650
- form="suggestToolForm"
651
- class="px-6 py-2 bg-purple-600 text-white rounded hover:bg-purple-700"
652
- >
653
- שלח
654
- </button>
655
- </div>
656
- </div>
657
- </div>
658
- <div
659
- id="videoModal"
660
- class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center hidden z-[9999]"
661
- >
662
- <div
663
- class="bg-white rounded-lg overflow-hidden w-full max-w-3xl shadow-lg relative"
664
- >
665
- <button
666
- onclick="closeVideoModal()"
667
- class="absolute top-2 left-2 text-gray-700 hover:text-red-600 text-xl"
668
- >
669
- <i class="fas fa-times"></i>
670
- </button>
671
- <iframe
672
- id="videoIframe"
673
- class="w-full h-[300px] sm:h-[500px]"
674
- src=""
675
- frameborder="0"
676
- allowfullscreen
677
- ></iframe>
678
- </div>
679
- </div>
680
-
681
- <!-- /* --- Footer --- */ -->
682
- <footer
683
- class="fixed bottom-0 left-0 w-full z-50 backdrop-blur-md bg-white/80 shadow-xl border-t border-gray-200"
684
- >
685
- <!-- הוספת כפתור צ'אט צף לקובץ index.html -->
686
- <!-- Improved Chat Component -->
687
- <div id="chatBubble" class="fixed bottom-8 right-5 z-[9999]">
688
- <!-- Introductory message -->
689
- <div
690
- id="chatIntro"
691
- class="bg-white p-3 rounded-lg shadow-md mb-2 text-sm max-w-xs chat-intro-enter hidden"
692
- >
693
- שלום! אני עוזר AI של שגיא. אשמח לעזור לך למצוא כלי AI מתאים או לענות
694
- על שאלות.
695
- <button onclick="hideChatIntro()" class="text-gray-500 float-left">
696
- <i class="fas fa-times"></i>
697
- </button>
698
- </div>
699
-
700
- <!-- Chat Button -->
701
- <button
702
- id="chatButton"
703
- onclick="toggleChatWindow()"
704
- class="chat-pulse bg-gradient-to-r from-purple-500 to-indigo-600 hover:from-purple-600 hover:to-indigo-700 text-white px-4 py-3 rounded-full shadow-xl flex items-center space-x-2 space-x-reverse"
705
- >
706
- <i class="fas fa-robot"></i>
707
- <span>צ'אט</span>
708
- </button>
709
-
710
- <!-- Chat Window -->
711
- <div
712
- id="chatWindow"
713
- class="hidden mt-3 w-[360px] h-[500px] bg-white rounded-2xl shadow-2xl border border-gray-200 overflow-hidden relative"
714
- >
715
- <!-- Chat Header -->
716
- <div
717
- class="bg-gradient-to-r from-purple-500 to-indigo-600 text-white p-3 flex justify-between items-center"
718
- >
719
- <button onclick="toggleChatWindow()" class="text-white">
720
- <i class="fas fa-times"></i>
721
- </button>
722
- <div class="chat-header">
723
- צ'אט עם הבינה של שגיא
724
- <span
725
- id="toolsCount"
726
- class="ml-2 text-sm bg-white text-purple-600 font-semibold px-2 py-1 rounded-full shadow-sm"
727
- ></span>
728
- </div>
729
- <!-- <div class="font-medium">עוזר AI של שגיא</div> -->
730
- <div class="w-6"></div>
731
- <!-- Spacer for balance -->
732
- </div>
733
-
734
- <!-- Chat iframe -->
735
- <iframe
736
- src="https://sagi-ba-sagi-ai-tools-chatbot-main-g1prqf.streamlit.app/?embed=true"
737
- class="w-full h-full border-none"
738
- ></iframe>
739
- </div>
740
- </div>
741
-
742
- <script>
743
- function toggleChatWindow() {
744
- const chatWindow = document.getElementById('chatWindow');
745
- chatWindow.classList.toggle('hidden');
746
- }
747
- </script>
748
-
749
- <!-- <span>© 2025 כל הזכויות שמורות לשגיא בר און.</span> -->
750
- <div class="container mx-auto px-4 py-3 text-center space-y-2">
751
- <!-- כפתור התקנת אפליקציה -->
752
- <div id="installAppContainer" class="flex justify-center">
753
- <button
754
- id="installAppBtn"
755
- class="mt-2 px-4 py-2 rounded-xl bg-gradient-to-br from-green-500 to-emerald-600 text-white font-bold shadow hover:scale-105 transition"
756
- style="display: none"
757
- >
758
- 📲 התקנת האפליקציה
759
- </button>
760
- </div>
761
-
762
- <div class="flex justify-center gap-4">
763
- <!-- אייקונים -->
764
- <a
765
- href="https://chat.whatsapp.com/GPFASYBEA9CFGUMCVZ5RXP"
766
- target="_blank"
767
- class="w-9 h-9 rounded-full bg-white shadow flex items-center justify-center text-green-500 hover:bg-green-500 hover:text-white transition"
768
- ><i class="fab fa-whatsapp"></i
769
- ></a>
770
- <a
771
- href="http://www.linkedin.com/in/sagi-bar-on"
772
- target="_blank"
773
- class="w-9 h-9 rounded-full bg-white shadow flex items-center justify-center text-blue-500 hover:bg-blue-700 hover:text-white transition"
774
- ><i class="fab fa-linkedin-in"></i
775
- ></a>
776
- <a
777
- href="https://www.facebook.com/SAGI.BARON"
778
- target="_blank"
779
- class="w-9 h-9 rounded-full bg-white shadow flex items-center justify-center text-blue-600 hover:bg-blue-800 hover:text-white transition"
780
- ><i class="fab fa-facebook-f"></i
781
- ></a>
782
- <a
783
- href="https://www.youtube.com/@SAGIBARON"
784
- target="_blank"
785
- class="w-9 h-9 rounded-full bg-white shadow flex items-center justify-center text-red-500 hover:bg-red-700 hover:text-white transition"
786
- ><i class="fab fa-youtube"></i
787
- ></a>
788
- </div>
789
- <button
790
- id="editJsonBtnFooter"
791
- class="px-4 py-2 rounded-xl bg-gradient-to-br from-pink-500 to-purple-600 text-white font-bold shadow hover:scale-105 transition"
792
- >
793
- <i class="fas fa-pen-to-square ml-2"></i> הציעו כלי חדש
794
- </button>
795
- <p class="text-gray-500 text-xs">
796
- © 2025 כל הזכויות שמורות לשגיא בר און
797
- </p>
798
- </div>
799
- <!-- זהו ה־div הסוגר של ה־container -->
800
- </footer>
801
-
802
- <!-- /* --- Load Tailwind CSS via CDN --- */ -->
803
- <script src="https://cdn.tailwindcss.com"></script>
804
-
805
- <!-- /* ----------------------------------- */
806
- /* ------- START OF JAVASCRIPT ------- */
807
- /* ----------------------------------- */ -->
808
- <script>
809
- // --- DOM Elements ---
810
- const toolsContainer = document.getElementById('toolsContainer');
811
- const videosContainer = document.getElementById('videosContainer');
812
- const searchInput = document.getElementById('searchInput');
813
- const filterButtons = document.querySelectorAll('.filter-btn');
814
- const totalToolsElement = document.getElementById('totalTools');
815
- const topRatedElement = document.getElementById('topRated');
816
- const newToolsElement = document.getElementById('newTools');
817
- const totalCategoriesElement = document.getElementById('totalCategories');
818
- const mobileMenuButton = document.getElementById('mobileMenuButton');
819
- const mobileMenu = document.getElementById('mobileMenu');
820
- const jsonEditorModal = document.getElementById('jsonEditorModal');
821
- const jsonEditor = document.getElementById('jsonEditor');
822
- const closeModalBtn = document.getElementById('closeModalBtn');
823
- const cancelEditBtn = document.getElementById('cancelEditBtn');
824
- const saveJsonBtn = document.getElementById('saveJsonBtn');
825
- const showToolsBtn = document.getElementById('showToolsBtn');
826
- const showVideosBtn = document.getElementById('showVideosBtn');
827
- const refreshBtn = document.getElementById('refreshBtn');
828
- const refreshBtnMobile = document.getElementById('refreshBtnMobile');
829
- const loadingMessage = document.getElementById('loadingMessage'); // For showing loading status
830
-
831
- const topRatedStatBox = document.getElementById('topRatedStatBox');
832
- const newToolsStatBox = document.getElementById('newToolsStatBox');
833
- const totalToolsStatBox = document
834
- .querySelector('[id="totalTools"]')
835
- .closest('.bg-white');
836
- let filteredStatView = null; // 'topRated', 'newTools', או null
837
-
838
- if (totalToolsStatBox) {
839
- totalToolsStatBox.classList.add('clickable-stat');
840
- totalToolsStatBox.addEventListener('click', () => {
841
- filteredStatView = null;
842
- currentSearchTerm = '';
843
- currentCategory = 'all';
844
- document
845
- .querySelectorAll('.filter-btn')
846
- .forEach((btn) => btn.classList.remove('active'));
847
- const allBtn = document.querySelector(
848
- '.filter-btn[data-category="all"]'
849
- );
850
- if (allBtn) allBtn.classList.add('active');
851
- renderTools();
852
- scrollToTools();
853
- });
854
- }
855
-
856
- if (topRatedStatBox) {
857
- topRatedStatBox.addEventListener('click', () => {
858
- filteredStatView = 'topRated';
859
- currentSearchTerm = '';
860
- currentCategory = 'all';
861
- renderTools();
862
- scrollToTools();
863
- });
864
- }
865
-
866
- if (newToolsStatBox) {
867
- newToolsStatBox.addEventListener('click', () => {
868
- filteredStatView = 'newTools';
869
- currentSearchTerm = '';
870
- currentCategory = 'all';
871
- renderTools();
872
- scrollToTools();
873
- });
874
- }
875
-
876
- // --- State ---
877
- let currentCategory = 'all';
878
- let currentSearchTerm = '';
879
- let toolsData = { tools: [], videos: [] }; // Holds the data fetched from server
880
- let currentSort = 'newest'; // 'newest', 'rating'
881
-
882
- // --- Initialize ---
883
- async function init() {
884
- showLoading();
885
- try {
886
- const savedSearch = localStorage.getItem('searchTerm');
887
- if (savedSearch) {
888
- searchInput.value = savedSearch;
889
- currentSearchTerm = savedSearch;
890
- }
891
-
892
- await loadData(); // ← הנתונים נטענים כאן
893
- sortTools(currentSort);
894
- renderTools();
895
- renderVideos();
896
- updateStats();
897
- setupEventListeners();
898
-
899
- // 👇 כאן נוסיף את הקריאה לבאנר לאחר שהכלים נטענו
900
- showNewToolBanner();
901
-
902
- if (!currentSearchTerm) {
903
- const allFilterBtn = document.querySelector(
904
- '.filter-btn[data-category="all"]'
905
- );
906
- if (allFilterBtn) {
907
- allFilterBtn.classList.add('active');
908
- }
909
- }
910
- } catch (error) {
911
- console.error('Initialization failed:', error);
912
- showError('שגיאה בטעינת הנתונים הראשונית. נסה לרענן את הדף.');
913
- } finally {
914
- hideLoading();
915
- }
916
- }
917
-
918
- const speechSynthesis = window.speechSynthesis;
919
- let currentUtterance = null;
920
-
921
- // פונקציה להקראת טקסט בעברית
922
- function speakText(text) {
923
- // עצירת הקראה קודמת אם יש
924
- if (speechSynthesis.speaking) {
925
- speechSynthesis.cancel();
926
-
927
- // אם זאת אותה הקראה שכבר פועלת, פשוט נעצור ונצא
928
- if (currentUtterance && currentUtterance.text === text) {
929
- currentUtterance = null;
930
- return;
931
- }
932
- }
933
-
934
- // יצירת הקראה חדשה
935
- const utterance = new SpeechSynthesisUtterance(text);
936
-
937
- // הגדרת השפה לעברית
938
- utterance.lang = 'he-IL';
939
-
940
- // בדיקת קולות זמינים ובחירת קול עברי
941
- const voices = speechSynthesis.getVoices();
942
-
943
- if (voices.length) {
944
- const hebrewVoice = voices.find((voice) =>
945
- /he|hebrew|ivrit/i.test(voice.lang)
946
- );
947
-
948
- if (hebrewVoice) {
949
- utterance.voice = hebrewVoice;
950
- console.log('נבחר קול עברי:', hebrewVoice.name);
951
- } else {
952
- console.log('לא נמצא קול עברי, משתמש בקול ברירת מחדל');
953
- }
954
- // ננסה להשתמש בקול גוגל
955
- const googleVoice = voices.find(
956
- (voice) =>
957
- voice.name.includes('Google') &&
958
- (voice.name.includes('US') || voice.name.includes('UK'))
959
- );
960
-
961
- if (googleVoice) {
962
- utterance.voice = googleVoice;
963
- }
964
- } else {
965
- // במקרה שהקולות עדיין לא נטענו, נגדיר מאזין חד-פעמי
966
- speechSynthesis.addEventListener(
967
- 'voiceschanged',
968
- function loadVoice() {
969
- const voices = speechSynthesis.getVoices();
970
- const hebrewVoice = voices.find((voice) =>
971
- /he|hebrew|ivrit/i.test(voice.lang)
972
- );
973
- if (hebrewVoice) {
974
- utterance.voice = hebrewVoice;
975
- console.log('נבחר קול עברי (מדחייה):', hebrewVoice.name);
976
- }
977
- // הסרת המאזין אחרי הפעלה ראשונה
978
- speechSynthesis.removeEventListener('voiceschanged', loadVoice);
979
- },
980
- { once: true }
981
- );
982
- }
983
-
984
- // שמירת ההקראה הנוכחית
985
- currentUtterance = utterance;
986
-
987
- // טיפול באירוע סיום הקראה
988
- utterance.onend = () => {
989
- currentUtterance = null;
990
-
991
- // עדכון כל הכפתורים למצב "לא מנגן"
992
- document.querySelectorAll('.speak-button').forEach((btn) => {
993
- btn.innerHTML = '<i class="fas fa-volume-up"></i>';
994
- btn.classList.remove('speaking');
995
- });
996
- };
997
-
998
- // הפעלת ההקראה
999
- speechSynthesis.speak(utterance);
1000
- }
1001
-
1002
- // --- UI Feedback ---
1003
- function showLoading() {
1004
- if (loadingMessage) loadingMessage.style.display = 'block';
1005
- if (toolsContainer) toolsContainer.innerHTML = ''; // Clear container while loading
1006
- }
1007
-
1008
- function hideLoading() {
1009
- if (loadingMessage) loadingMessage.style.display = 'none';
1010
- }
1011
-
1012
- function showError(message) {
1013
- if (toolsContainer) {
1014
- toolsContainer.innerHTML = `<p class="text-center text-red-600 col-span-full">${message}</p>`;
1015
- }
1016
- hideLoading(); // Make sure loading message is hidden
1017
- }
1018
-
1019
- // --- Data Fetching ---
1020
- async function fetchDefaultData() {
1021
- console.log('Fetching latest data from server...'); // Log fetching attempt
1022
- try {
1023
- const [toolsResponse, videosResponse] = await Promise.all([
1024
- fetch('tools.json?cacheBust=' + Date.now()), // Cache busting
1025
- fetch('videos.json?cacheBust=' + Date.now()), // Cache busting
1026
- ]);
1027
-
1028
- if (!toolsResponse.ok || !videosResponse.ok) {
1029
- const errorMsg = `HTTP error! Status: Tools ${toolsResponse.status}, Videos ${videosResponse.status}`;
1030
- console.error(errorMsg);
1031
- throw new Error('שגיאה בקבלת נתונים מהשרת.'); // User-friendly error
1032
- }
1033
-
1034
- const [toolsArray, videosArray] = await Promise.all([
1035
- toolsResponse.json(),
1036
- videosResponse.json(),
1037
- ]);
1038
-
1039
- // --- Process fetched data with defaults ---
1040
- const processedTools = toolsArray.map((tool) => ({
1041
- ...tool,
1042
- rating: tool.rating ?? 0,
1043
- isNew: tool.isNew ?? false,
1044
- category: tool.category ?? 'general',
1045
- icon: tool.icon || 'fas fa-tools',
1046
- url: tool.url || '#',
1047
- description: tool.description || 'אין תיאור זמין.',
1048
- name: tool.name || 'שם לא ידוע',
1049
- }));
1050
- const processedVideos = videosArray.map((video) => ({
1051
- ...video,
1052
- url: video.url || '#',
1053
- title: video.title || 'כותרת חסרה',
1054
- description: video.description || 'אין תיאור זמין.',
1055
- date: video.date ?? new Date().toISOString(),
1056
- }));
1057
-
1058
- console.log('Data fetched successfully.');
1059
- return { tools: processedTools, videos: processedVideos };
1060
- } catch (error) {
1061
- console.error('Failed to fetch default data:', error);
1062
- // Re-throw the error or a more specific one to be caught by the caller
1063
- throw new Error(
1064
- 'כשל בטעינת נתוני ברירת המחדל מהשרת. בדוק את הקבצים tools.json ו-videos.json.'
1065
- );
1066
- }
1067
- }
1068
-
1069
- // --- Data Loading Strategy ---
1070
- // MODIFIED: Always fetch fresh data from the server on load.
1071
- async function loadData() {
1072
- console.log('loadData called - fetching fresh data.');
1073
- try {
1074
- toolsData = await fetchDefaultData();
1075
- // Note: We are NOT saving to localStorage here anymore for loading purposes.
1076
- // saveData(); // Removed - No longer saving fetched data automatically
1077
- } catch (error) {
1078
- console.error('Error in loadData:', error);
1079
- toolsData = { tools: [], videos: [] }; // Set empty data on error
1080
- // Re-throw error so init() can handle UI feedback
1081
- throw error;
1082
- }
1083
- }
1084
-
1085
- // --- Save Data to Local Storage (Used ONLY by JSON Editor) ---
1086
- // Note: Data saved here will be overwritten on next page load/refresh.
1087
- function saveData() {
1088
- try {
1089
- // Save the current state (potentially modified by editor) to localStorage
1090
- localStorage.setItem('aiToolsData', JSON.stringify(toolsData));
1091
- console.log(
1092
- 'Data saved to localStorage (by editor). Will be overwritten on next load.'
1093
- );
1094
- } catch (e) {
1095
- console.error('Error saving data to localStorage:', e);
1096
- alert('שגיאה בשמירת הנתונים באחסון המקומי.');
1097
- }
1098
- }
1099
-
1100
- // --- Sorting Function (Unchanged) ---
1101
- function sortTools(sortBy) {
1102
- if (!toolsData || !Array.isArray(toolsData.tools)) return;
1103
- console.log('Sorting by:', sortBy);
1104
- currentSort = sortBy;
1105
- toolsData.tools.sort((a, b) => {
1106
- if (sortBy === 'newest') {
1107
- const aIsNew = a.isNew || false;
1108
- const bIsNew = b.isNew || false;
1109
- if (aIsNew !== bIsNew) return bIsNew - aIsNew;
1110
- return 0;
1111
- } else if (sortBy === 'rating') {
1112
- const aRating = a.rating || 0;
1113
- const bRating = b.rating || 0;
1114
- if (bRating !== aRating) return bRating - aRating;
1115
- return 0;
1116
- }
1117
- return 0;
1118
- });
1119
- }
1120
- function scrollToTools() {
1121
- const toolsSection = document.getElementById('toolsContainer');
1122
- if (toolsSection) {
1123
- toolsSection.scrollIntoView({ behavior: 'smooth', block: 'start' });
1124
- }
1125
- }
1126
-
1127
- // --- Rendering Functions (Unchanged logic, but added hideLoading) ---
1128
- function renderTools() {
1129
- hideLoading(); // Ensure loading message is hidden before rendering
1130
- if (!toolsContainer || !toolsData || !Array.isArray(toolsData.tools)) {
1131
- console.error(
1132
- 'Cannot render tools: Missing container or invalid data.'
1133
- );
1134
- showError('שגיאה בהצגת הכלים.');
1135
- return;
1136
- }
1137
- const filteredTools = filterTools();
1138
- toolsContainer.innerHTML = ''; // Clear previous content
1139
-
1140
- if (
1141
- filteredTools.length === 0 &&
1142
- currentSearchTerm === '' &&
1143
- currentCategory === 'all'
1144
- ) {
1145
- // Show specific message if no tools loaded at all
1146
- showError('לא נטענו כלים. בדוק את קובץ tools.json או נסה לרענן.');
1147
- } else if (filteredTools.length === 0) {
1148
- toolsContainer.innerHTML =
1149
- '<p class="text-center text-gray-500 col-span-full">לא נמצאו כלים התואמים את החיפוש, הסינון והמיון.</p>';
1150
- } else {
1151
- filteredTools.forEach((tool) => {
1152
- const toolCard = document.createElement('div');
1153
- toolCard.className = `relative tool-card bg-white rounded-lg shadow-sm border border-gray-100 p-6 transition duration-300 ${
1154
- tool.isFeatured ? 'ring-2 ring-blue-500' : ''
1155
- }`;
1156
-
1157
- // הכנת הטקסט להקראה - שילוב של שם הכלי והתיאור שלו
1158
- const speakableText = `${tool.name}. ${tool.description}`;
1159
- // `${tool.name}`;
1160
- //
1161
-
1162
- toolCard.innerHTML = `
1163
- <div class="flex items-center justify-between mb-4">
1164
- <div class="flex items-center gap-4">
1165
- <!-- לוגו הכלי -->
1166
- <img src="${tool.logo}" alt="${
1167
- tool.name
1168
- } Logo" class="w-14 h-14 object-contain rounded bg-white p-1 shadow-sm">
1169
-
1170
- <div>
1171
- <!-- שם הכלי, תגית 'חדש!' וכפתור רמקול -->
1172
- <div class="flex items-center gap-2">
1173
- <h3 class="text-xl font-semibold">${
1174
- tool.name
1175
- }</h3>
1176
- ${
1177
- tool.isNew
1178
- ? `<span class="text-xs bg-green-500 text-white px-2 py-1 rounded-full animate-pulse">חדש!</span>`
1179
- : ''
1180
- }
1181
- <button title="הקרא תיאור" onclick="event.stopPropagation(); speakText('${tool.description.replace(
1182
- /'/g,
1183
- "\\'"
1184
- )}')" class="text-blue-600 hover:text-blue-800 focus:outline-none">
1185
- <i class="fas fa-volume-up"></i>
1186
- </button>
1187
- </div>
1188
- <!-- תגית קטגוריה -->
1189
- <span class="text-xs px-2 py-1 rounded-full ${getCategoryBadgeColor(
1190
- tool.category
1191
- )}">
1192
- ${getCategoryName(tool.category)}
1193
- </span>
1194
- </div>
1195
- </div>
1196
-
1197
- <!-- אייקון הכלי -->
1198
- <i class="${tool.icon} text-gray-500 text-2xl"></i>
1199
- </div>
1200
-
1201
- <!-- תיאור -->
1202
- <p class="text-gray-700 mb-4 text-base leading-relaxed min-h-[60px]">${
1203
- tool.description
1204
- }</p>
1205
-
1206
- <!-- דירוג + יוטיוב -->
1207
- <div class="flex justify-between items-center mb-4">
1208
- <div class="flex items-center gap-3">
1209
- ${renderRatingStars(tool.rating)}
1210
- ${
1211
- tool.video
1212
- ? `
1213
- <button title="צפה בהדרכה" onclick="openVideoModal('${tool.video}')" class="text-red-500 hover:text-red-600 transition text-xl">
1214
- <i class="fab fa-youtube"></i>
1215
- </button>`
1216
- : ''
1217
- }
1218
- </div>
1219
- </div>
1220
-
1221
- <!-- כפתור גישה לכלי -->
1222
- <a href="${
1223
- tool.url
1224
- }" target="_blank" rel="noopener noreferrer"
1225
- class="inline-block w-full text-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition ${
1226
- tool.url === '#'
1227
- ? 'opacity-50 cursor-not-allowed'
1228
- : ''
1229
- }">
1230
- <i class="fas fa-external-link-alt ml-2"></i> ${
1231
- tool.url !== '#' ? 'גישה לכלי' : 'אין קישור'
1232
- }
1233
- </a>
1234
- `;
1235
-
1236
- toolsContainer.appendChild(toolCard);
1237
- });
1238
- // אנימציה של הופעה חלקה
1239
- requestAnimationFrame(() => {
1240
- toolCard.classList.add('visible');
1241
- });
1242
-
1243
- // הוספת סגנון CSS לכפתור הקראה פעיל
1244
- if (!document.getElementById('speakButtonStyle')) {
1245
- const style = document.createElement('style');
1246
- style.id = 'speakButtonStyle';
1247
- style.innerHTML = `
1248
- .speak-button.speaking { color: #4f46e5; animation: pulse 1.5s infinite; }
1249
- @keyframes pulse {
1250
- 0% { transform: scale(1); }
1251
- 50% { transform: scale(1.2); }
1252
- 100% { transform: scale(1); }
1253
- }
1254
- `;
1255
- document.head.appendChild(style);
1256
- }
1257
- }
1258
- }
1259
-
1260
- // פונקציה נוספת שמוחקת את ההקראה בעת עזיבת העמוד
1261
- function cleanupSpeech() {
1262
- if (speechSynthesis) {
1263
- speechSynthesis.cancel();
1264
- }
1265
- }
1266
-
1267
- // הוספת אירוע לניקוי ההקראה בעת עזיבת העמוד
1268
- window.addEventListener('beforeunload', cleanupSpeech);
1269
-
1270
- // עדכון אירוע הקלקה על כפתור הקראה - להוסיף מחלקת CSS ולשנות אייקון
1271
- document.addEventListener('click', function (e) {
1272
- if (e.target.closest('.speak-button')) {
1273
- const button = e.target.closest('.speak-button');
1274
-
1275
- // החלפת האייקון והוספת מחלקת CSS מהבהבת
1276
- if (speechSynthesis.speaking && currentUtterance) {
1277
- // אם יש הקראה פעילה, נעדכן את כל הכפתורים
1278
- document.querySelectorAll('.speak-button').forEach((btn) => {
1279
- btn.innerHTML = '<i class="fas fa-volume-up"></i>';
1280
- btn.classList.remove('speaking');
1281
- });
1282
-
1283
- // ואז נעדכן את הכפתור הנוכחי אם ההקראה ממשיכה
1284
- if (!button.classList.contains('speaking')) {
1285
- button.innerHTML = '<i class="fas fa-volume-mute"></i>';
1286
- button.classList.add('speaking');
1287
- }
1288
- } else {
1289
- button.innerHTML = '<i class="fas fa-volume-up"></i>';
1290
- button.classList.remove('speaking');
1291
- }
1292
- }
1293
- });
1294
-
1295
- function renderVideos() {
1296
- // ... (renderVideos logic remains the same as before) ...
1297
- if (
1298
- !videosContainer ||
1299
- !toolsData ||
1300
- !Array.isArray(toolsData.videos)
1301
- ) {
1302
- console.error(
1303
- 'Cannot render videos: Missing container or invalid data.'
1304
- );
1305
- if (videosContainer)
1306
- videosContainer.innerHTML =
1307
- '<p class="text-center text-red-500 col-span-full">שגיאה בהצגת הסרטונים.</p>';
1308
- return;
1309
- }
1310
- videosContainer.innerHTML = '';
1311
- if (toolsData.videos.length === 0) {
1312
- videosContainer.innerHTML =
1313
- '<p class="text-center text-gray-500 col-span-full">אין סרטונים להצגה.</p>';
1314
- } else {
1315
- toolsData.videos.forEach((video) => {
1316
- const videoId = getYouTubeID(video.url);
1317
- const embedUrl = videoId
1318
- ? `https://www.youtube.com/embed/${videoId}`
1319
- : '#';
1320
- const videoCard = document.createElement('div');
1321
- videoCard.className =
1322
- 'bg-white rounded-lg shadow-sm border border-gray-100 overflow-hidden';
1323
- videoCard.innerHTML = `
1324
- <div class="relative pt-[56.25%] ${
1325
- !videoId
1326
- ? 'bg-gray-200 flex items-center justify-center'
1327
- : ''
1328
- }">
1329
- ${
1330
- videoId
1331
- ? `<iframe class="absolute top-0 left-0 w-full h-full" src="${embedUrl}" frameborder="0" title="${video.title}" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`
1332
- : `<p class="text-gray-500 text-sm p-4">${
1333
- video.url === '#'
1334
- ? 'אין קישור וידאו'
1335
- : 'קישור וידאו לא תקין'
1336
- }</p>`
1337
- }
1338
- </div>
1339
- <div class="p-4">
1340
- <h3 class="text-lg font-semibold mb-2">${
1341
- video.title
1342
- }</h3>
1343
- <p class="text-gray-600 text-sm mb-3 min-h-[40px]">${
1344
- video.description
1345
- }</p>
1346
- <p class="text-gray-500 text-xs">${formatDate(
1347
- video.date
1348
- )}</p>
1349
- </div>`;
1350
- videosContainer.appendChild(videoCard);
1351
- });
1352
- }
1353
- }
1354
-
1355
- // --- Helper Functions (Filtering, Stats, Stars, Category, Date - Unchanged) ---
1356
- function filterTools() {
1357
- if (!toolsData || !Array.isArray(toolsData.tools)) return [];
1358
-
1359
- let filtered = toolsData.tools;
1360
-
1361
- if (filteredStatView === 'topRated') {
1362
- filtered = filtered.filter((tool) => tool.rating === 5);
1363
- } else if (filteredStatView === 'newTools') {
1364
- filtered = filtered.filter((tool) => tool.isNew);
1365
- }
1366
-
1367
- return filtered.filter((tool) => {
1368
- const searchTermLower = currentSearchTerm.toLowerCase();
1369
- const nameMatch = tool.name.toLowerCase().includes(searchTermLower);
1370
- const descMatch = tool.description
1371
- .toLowerCase()
1372
- .includes(searchTermLower);
1373
- const categoryNameMatch = getCategoryName(tool.category)
1374
- .toLowerCase()
1375
- .includes(searchTermLower);
1376
- const matchesSearch = nameMatch || descMatch || categoryNameMatch;
1377
- const matchesCategoryFilter =
1378
- currentCategory === 'all' || tool.category === currentCategory;
1379
- return matchesCategoryFilter && matchesSearch;
1380
- });
1381
- }
1382
-
1383
- function updateStats() {
1384
- /* ... (unchanged) ... */
1385
- const toolsCount =
1386
- toolsData && Array.isArray(toolsData.tools)
1387
- ? toolsData.tools.length
1388
- : 0;
1389
- totalToolsElement.textContent = toolsCount;
1390
- const topRatedCount =
1391
- toolsCount > 0
1392
- ? toolsData.tools.filter((tool) => tool.rating >= 5).length
1393
- : 0;
1394
- topRatedElement.textContent = topRatedCount;
1395
- const newToolsCount =
1396
- toolsCount > 0
1397
- ? toolsData.tools.filter((tool) => tool.isNew).length
1398
- : 0;
1399
- newToolsElement.textContent = newToolsCount;
1400
- const categories =
1401
- toolsCount > 0
1402
- ? new Set(toolsData.tools.map((tool) => tool.category))
1403
- : new Set();
1404
- totalCategoriesElement.textContent = categories.size;
1405
- }
1406
-
1407
- function renderRatingStars(rating) {
1408
- /* ... (unchanged) ... */
1409
- let stars = '';
1410
- const filledStars = Math.max(0, Math.min(5, Math.round(rating)));
1411
- for (let i = 1; i <= 5; i++) {
1412
- stars += `<i class="${
1413
- i <= filledStars
1414
- ? 'fas fa-star text-yellow-400'
1415
- : 'far fa-star text-gray-300'
1416
- } ml-1"></i>`;
1417
- }
1418
- return stars;
1419
- }
1420
- function getCategoryName(category) {
1421
- /* ... (unchanged) ... */
1422
- const categories = {
1423
- 'ai-agents': 'סוכן AI',
1424
- productivity: 'פרודוקטיביות',
1425
- writing: 'כתיבה',
1426
- design: 'עיצוב',
1427
- coding: 'תכנות',
1428
- video: 'וידאו',
1429
- image: 'תמונה',
1430
- education: 'חינוך',
1431
- data: 'נתונים',
1432
- search: 'חיפוש',
1433
- builder: 'בנייה',
1434
- 'customer-support': 'תמיכה',
1435
- automation: 'אוטומציה',
1436
- hosting: 'אחסון',
1437
- agents: 'סוכנים',
1438
- directory: 'אינדקס',
1439
- utility: 'כלי עזר',
1440
- platform: 'פלטפורמה',
1441
- media: 'מדיה',
1442
- presentation: 'מצגות',
1443
- audio: 'שמע',
1444
- infrastructure: 'תשתיות',
1445
- nlp: 'עיבוד שפה',
1446
- accessibility: 'נגישות',
1447
- general: 'כללי',
1448
- };
1449
- return categories[category] || category || 'כללי';
1450
- }
1451
- function getCategoryColor(category) {
1452
- /* ... (unchanged) ... */
1453
- const colors = {
1454
- productivity: 'bg-blue-600',
1455
- writing: 'bg-purple-600',
1456
- design: 'bg-pink-600',
1457
- coding: 'bg-green-600',
1458
- video: 'bg-red-600',
1459
- image: 'bg-yellow-600',
1460
- education: 'bg-indigo-600',
1461
- data: 'bg-cyan-600',
1462
- search: 'bg-teal-600',
1463
- builder: 'bg-orange-600',
1464
- 'customer-support': 'bg-lime-600',
1465
- automation: 'bg-sky-600',
1466
- hosting: 'bg-amber-600',
1467
- agents: 'bg-violet-600',
1468
- directory: 'bg-fuchsia-600',
1469
- utility: 'bg-rose-600',
1470
- platform: 'bg-emerald-600',
1471
- media: 'bg-stone-600',
1472
- presentation: 'bg-red-500',
1473
- audio: 'bg-blue-500',
1474
- infrastructure: 'bg-gray-700',
1475
- nlp: 'bg-purple-500',
1476
- accessibility: 'bg-green-500',
1477
- general: 'bg-gray-600',
1478
- };
1479
- return colors[category] || 'bg-gray-600';
1480
- }
1481
- function getCategoryBadgeColor(category) {
1482
- /* ... (unchanged) ... */
1483
- const colors = {
1484
- productivity: 'bg-blue-100 text-blue-800',
1485
- writing: 'bg-purple-100 text-purple-800',
1486
- design: 'bg-pink-100 text-pink-800',
1487
- coding: 'bg-green-100 text-green-800',
1488
- video: 'bg-red-100 text-red-800',
1489
- image: 'bg-yellow-100 text-yellow-800',
1490
- education: 'bg-indigo-100 text-indigo-800',
1491
- data: 'bg-cyan-100 text-cyan-800',
1492
- search: 'bg-teal-100 text-teal-800',
1493
- builder: 'bg-orange-100 text-orange-800',
1494
- 'customer-support': 'bg-lime-100 text-lime-800',
1495
- automation: 'bg-sky-100 text-sky-800',
1496
- hosting: 'bg-amber-100 text-amber-800',
1497
- agents: 'bg-violet-100 text-violet-800',
1498
- directory: 'bg-fuchsia-100 text-fuchsia-800',
1499
- utility: 'bg-rose-100 text-rose-800',
1500
- platform: 'bg-emerald-100 text-emerald-800',
1501
- media: 'bg-stone-100 text-stone-800',
1502
- presentation: 'bg-red-100 text-red-800',
1503
- audio: 'bg-blue-100 text-blue-800',
1504
- infrastructure: 'bg-gray-200 text-gray-800',
1505
- nlp: 'bg-purple-100 text-purple-800',
1506
- accessibility: 'bg-green-100 text-green-800',
1507
- general: 'bg-gray-100 text-gray-800',
1508
- };
1509
- return colors[category] || 'bg-gray-100 text-gray-800';
1510
- }
1511
- function getYouTubeID(url) {
1512
- /* ... (unchanged) ... */
1513
- if (!url || url === '#') return '';
1514
- const match = url.match(
1515
- /(?:youtu\.be\/|youtube\.com\/(?:watch\?v=|embed\/|v\/|shorts\/))([^?&\/\s]+)/
1516
- );
1517
- return match ? match[1] : '';
1518
- }
1519
- function formatDate(dateString) {
1520
- /* ... (unchanged, includes fallback parsing) ... */
1521
- if (!dateString) return 'תאריך לא זמין';
1522
- try {
1523
- const date = new Date(dateString);
1524
- if (isNaN(date.getTime())) {
1525
- console.warn('Could not parse date directly:', dateString);
1526
- const parts = dateString.match(
1527
- /(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/
1528
- );
1529
- if (parts) {
1530
- const isoDate = new Date(
1531
- `${parts[3]}-${parts[2].padStart(2, '0')}-${parts[1].padStart(
1532
- 2,
1533
- '0'
1534
- )}T00:00:00Z`
1535
- );
1536
- if (!isNaN(isoDate.getTime()))
1537
- return isoDate.toLocaleDateString('he-IL', {
1538
- year: 'numeric',
1539
- month: 'long',
1540
- day: 'numeric',
1541
- });
1542
- }
1543
- return 'תאריך ��א תקין';
1544
- }
1545
- return date.toLocaleDateString('he-IL', {
1546
- year: 'numeric',
1547
- month: 'long',
1548
- day: 'numeric',
1549
- });
1550
- } catch (e) {
1551
- console.error('Error formatting date:', dateString, e);
1552
- return 'תאריך לא תקין';
1553
- }
1554
- }
1555
-
1556
- // --- Event Listeners Setup ---
1557
- function setupEventListeners() {
1558
- // Search input
1559
- searchInput.addEventListener('input', (e) => {
1560
- currentSearchTerm = e.target.value;
1561
- localStorage.setItem('searchTerm', currentSearchTerm); // שמור בזיכרון הדפדפן
1562
- renderTools();
1563
- });
1564
-
1565
- // Filter buttons
1566
- filterButtons.forEach((button) => {
1567
- button.addEventListener('click', () => {
1568
- filterButtons.forEach((btn) => btn.classList.remove('active'));
1569
- button.classList.add('active');
1570
- currentCategory = button.dataset.category;
1571
- renderTools();
1572
- });
1573
- });
1574
-
1575
- // Mobile menu toggle
1576
- mobileMenuButton.addEventListener('click', () => {
1577
- mobileMenu.classList.toggle('open');
1578
- });
1579
-
1580
- // Uncomment if using admin buttons
1581
- const editJsonBtn = document.getElementById('editJsonBtn');
1582
- const editJsonBtnMobile = document.getElementById('editJsonBtnMobile');
1583
- document
1584
- .getElementById('editJsonBtnFooter')
1585
- ?.addEventListener('click', openEditorHandler);
1586
-
1587
- if (editJsonBtn)
1588
- editJsonBtn.addEventListener('click', openEditorHandler);
1589
- if (editJsonBtnMobile)
1590
- editJsonBtnMobile.addEventListener('click', openEditorHandler);
1591
-
1592
- closeModalBtn.addEventListener('click', () =>
1593
- jsonEditorModal.classList.add('hidden')
1594
- );
1595
- cancelEditBtn.addEventListener('click', () =>
1596
- jsonEditorModal.classList.add('hidden')
1597
- );
1598
-
1599
- // JSON Editor Save Button -> Saves ONLY to localStorage for the current session
1600
- saveJsonBtn.addEventListener('click', () => {
1601
- try {
1602
- const rawData = JSON.parse(jsonEditor.value);
1603
- if (!Array.isArray(rawData))
1604
- throw new Error('Data must be an array.');
1605
- if (showToolsBtn.classList.contains('bg-blue-600')) {
1606
- // Update in-memory data and sort
1607
- toolsData.tools = rawData.map((tool) => ({
1608
- /* add defaults */ ...tool,
1609
- rating: tool.rating ?? 0,
1610
- isNew: tool.isNew ?? false,
1611
- category: tool.category ?? 'general',
1612
- icon: tool.icon || 'fas fa-tools',
1613
- url: tool.url || '#',
1614
- description: tool.description || 'אין תיאור זמין.',
1615
- name: tool.name || 'שם לא ידוע',
1616
- }));
1617
- sortTools(currentSort);
1618
- } else {
1619
- toolsData.videos = rawData.map((video) => ({
1620
- /* add defaults */ ...video,
1621
- url: video.url || '#',
1622
- title: video.title || 'כותרת חסרה',
1623
- description: video.description || 'אין תיאור זמין.',
1624
- date: video.date ?? new Date().toISOString(),
1625
- }));
1626
- }
1627
- // Save the edited data to localStorage (will be lost on next full load)
1628
- saveData();
1629
- // Re-render the UI with the edited data for the current session
1630
- renderTools();
1631
- renderVideos();
1632
- updateStats();
1633
- jsonEditorModal.classList.add('hidden');
1634
- alert(
1635
- 'הנתונים נשמרו זמנית (באחסון המקומי). הם יתעדכנו מחדש מהשרת בטעינה הבאה של הדף.'
1636
- );
1637
- } catch (e) {
1638
- alert('JSON לא תקין או שגיאה בשמירה:\n' + e.message);
1639
- console.error('JSON Save Error:', e);
1640
- }
1641
- });
1642
-
1643
- showToolsBtn.addEventListener('click', () => {
1644
- /* ... (unchanged editor tab logic) ... */
1645
- showToolsBtn.classList.add('bg-blue-600', 'text-white');
1646
- showToolsBtn.classList.remove('bg-gray-200', 'text-gray-700');
1647
- showVideosBtn.classList.add('bg-gray-200', 'text-gray-700');
1648
- showVideosBtn.classList.remove('bg-blue-600', 'text-white');
1649
- jsonEditor.value = JSON.stringify(toolsData.tools, null, 2); // Show current in-memory tools data
1650
- });
1651
- showVideosBtn.addEventListener('click', () => {
1652
- /* ... (unchanged editor tab logic) ... */
1653
- showVideosBtn.classList.add('bg-blue-600', 'text-white');
1654
- showVideosBtn.classList.remove('bg-gray-200', 'text-gray-700');
1655
- showToolsBtn.classList.add('bg-gray-200', 'text-gray-700');
1656
- showToolsBtn.classList.remove('bg-blue-600', 'text-white');
1657
- jsonEditor.value = JSON.stringify(toolsData.videos, null, 2); // Show current in-memory videos data
1658
- });
1659
-
1660
- // Sorting stat boxes (Unchanged)
1661
- if (topRatedStatBox) {
1662
- topRatedStatBox.addEventListener('click', () => {
1663
- sortTools('rating');
1664
- renderTools();
1665
- scrollToTools(); // גלילה חלקה לתחילת רשימת הכלים
1666
- });
1667
- }
1668
-
1669
- if (newToolsStatBox) {
1670
- newToolsStatBox.addEventListener('click', () => {
1671
- sortTools('newest');
1672
- renderTools();
1673
- scrollToTools(); // גלילה חלקה לתחילת רשימת הכלים
1674
- });
1675
- }
1676
-
1677
- // Refresh buttons - Now primarily resets filters/sort/search and re-renders current data
1678
- // It *could* re-fetch, but init() already does that on load.
1679
- // Let's make it just reset the view state.
1680
- const resetViewHandler = () => {
1681
- console.log('Resetting view state (filters, sort, search)...');
1682
- // Reset filters and search
1683
- searchInput.value = '';
1684
- currentSearchTerm = '';
1685
- filterButtons.forEach((btn) => btn.classList.remove('active'));
1686
- const allFilterBtn = document.querySelector(
1687
- '.filter-btn[data-category="all"]'
1688
- );
1689
- if (allFilterBtn) allFilterBtn.classList.add('active');
1690
- currentCategory = 'all';
1691
-
1692
- // Reset sort to newest and re-render
1693
- sortTools('newest');
1694
- renderTools();
1695
- // No need to re-render videos unless their source changes, which this button doesn't do
1696
- // No need to update stats as the underlying data hasn't changed
1697
- alert('התצוגה אופסה (פילטרים, מיון וחיפוש נוקו).');
1698
- };
1699
-
1700
- refreshBtn.addEventListener('click', resetViewHandler);
1701
- refreshBtnMobile.addEventListener('click', resetViewHandler);
1702
- }
1703
-
1704
- // --- Initialize the app ---
1705
- document.addEventListener('DOMContentLoaded', init);
1706
-
1707
- // JSON Editor Modal Logic (If admin buttons are enabled)
1708
- const openEditorHandler = () => {
1709
- document.getElementById('suggestToolModal').classList.remove('hidden');
1710
- };
1711
-
1712
- const closeSuggestModal = () => {
1713
- document.getElementById('suggestToolModal').classList.add('hidden');
1714
- };
1715
-
1716
- document
1717
- .getElementById('suggestToolForm')
1718
- .addEventListener('submit', async (e) => {
1719
- e.preventDefault();
1720
- const form = e.target;
1721
- const rawPhone = form.userPhone.value;
1722
- const cleanedPhone = rawPhone.replace(/\D/g, ''); // מסיר כל תו שאינו ספרה
1723
- // alert(cleanedPhone)
1724
- const data = {
1725
- name: form.name.value,
1726
- url: form.url.value,
1727
- description: form.description.value,
1728
- userName: form.userName.value,
1729
- userPhone: cleanedPhone,
1730
- };
1731
-
1732
- try {
1733
- await fetch(
1734
- 'https://hook.eu2.make.com/lgo6nh36dk804dq1msfmwxo34nzf4o3y',
1735
- {
1736
- method: 'POST',
1737
- headers: {
1738
- 'Content-Type': 'application/json',
1739
- },
1740
- body: JSON.stringify(data),
1741
- }
1742
- );
1743
-
1744
- alert('הכלי נשלח בהצלחה!');
1745
- closeSuggestModal();
1746
- form.reset();
1747
- } catch (err) {
1748
- alert('שגיאה בשליחה 😢');
1749
- console.error(err);
1750
- }
1751
- });
1752
- function openVideoModal(url) {
1753
- const modal = document.getElementById('videoModal');
1754
- const iframe = document.getElementById('videoIframe');
1755
- iframe.src = url;
1756
- modal.classList.remove('hidden');
1757
- }
1758
-
1759
- function closeVideoModal() {
1760
- const modal = document.getElementById('videoModal');
1761
- const iframe = document.getElementById('videoIframe');
1762
- iframe.src = '';
1763
- modal.classList.add('hidden');
1764
- }
1765
- fetch('tools.json')
1766
- .then((res) => res.json())
1767
- .then((tools) => {
1768
- const count = tools.length;
1769
- document.getElementById(
1770
- 'toolsCount'
1771
- ).textContent = `${count} כלים זמינים`;
1772
- })
1773
- .catch((err) => {
1774
- console.error('שגיאה בטעינת כמות הכלים:', err);
1775
- document.getElementById('toolsCount').textContent = 'טעינה נכשלה';
1776
- });
1777
- function showNewToolBanner() {
1778
- const tools = toolsData.tools;
1779
- const lastSeenToolDate = localStorage.getItem('lastSeenToolDate');
1780
- const newTools = tools.filter((tool) => tool.isNew);
1781
- if (newTools.length === 0) return;
1782
-
1783
- const latestTool = newTools.reduce((latest, tool) => {
1784
- return new Date(tool.dateAdded) > new Date(latest.dateAdded)
1785
- ? tool
1786
- : latest;
1787
- }, newTools[0]);
1788
-
1789
- if (
1790
- !lastSeenToolDate ||
1791
- new Date(latestTool.dateAdded) > new Date(lastSeenToolDate)
1792
- ) {
1793
- const banner = document.getElementById('newToolBanner');
1794
- const toolNameSpan = document.getElementById('newToolName');
1795
- const closeBtn = document.getElementById('closeBanner');
1796
-
1797
- toolNameSpan.textContent = latestTool.name;
1798
- banner.classList.remove('hidden');
1799
- const viewNowLink = banner.querySelector('a');
1800
- viewNowLink.addEventListener('click', (e) => {
1801
- e.preventDefault();
1802
- filteredStatView = 'newTools';
1803
- currentCategory = 'all';
1804
- currentSearchTerm = '';
1805
- renderTools();
1806
- scrollToTools();
1807
- });
1808
-
1809
- closeBtn.addEventListener('click', () => {
1810
- banner.classList.add('hidden');
1811
- localStorage.setItem('lastSeenToolDate', latestTool.dateAdded);
1812
- });
1813
- }
1814
- }
1815
-
1816
- if ('serviceWorker' in navigator) {
1817
- navigator.serviceWorker
1818
- .register('/service-worker.js')
1819
- .then(() => console.log('Service Worker registered successfully.'))
1820
- .catch((err) =>
1821
- console.error('Service Worker registration failed:', err)
1822
- );
1823
- }
1824
-
1825
- let deferredPrompt;
1826
- const installBtn = document.getElementById('installAppBtn');
1827
- const container = document.getElementById('installAppContainer');
1828
-
1829
- window.addEventListener('beforeinstallprompt', (e) => {
1830
- e.preventDefault();
1831
- deferredPrompt = e;
1832
- installBtn.style.display = 'inline-block';
1833
-
1834
- installBtn.addEventListener('click', () => {
1835
- deferredPrompt.prompt();
1836
- deferredPrompt.userChoice.then((choiceResult) => {
1837
- if (choiceResult.outcome === 'accepted') {
1838
- console.log('User accepted the A2HS prompt');
1839
- installBtn.style.display = 'none';
1840
- } else {
1841
- console.log('User dismissed the A2HS prompt');
1842
- }
1843
- deferredPrompt = null;
1844
- });
1845
- });
1846
- });
1847
- </script>
1848
-
1849
- <!-- /* --------------------------------- */
1850
- /* ------- END OF JAVASCRIPT ------- */
1851
- /* --------------------------------- */ -->
1852
-
1853
- <script>
1854
- function speakText(text) {
1855
- const audio = new Audio(
1856
- `https://translate.google.com/translate_tts?ie=UTF-8&tl=iw&client=tw-ob&q=${encodeURIComponent(
1857
- text
1858
- )}`
1859
- );
1860
- audio.play();
1861
- }
1862
- </script>
1863
- </body>
1864
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tools.json CHANGED
@@ -1,4 +1,46 @@
1
  [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  {
3
  "name": "Stitch by Google – עיצוב ממשקים באמצעות AI",
4
  "description": "Stitch הוא כלי חדשני מבית Google המאפשר ליצור ממשקי משתמש (UI) לאפליקציות ולווב באמצעות תיאורים טקסטואליים או תמונות. הכלי מייצר עיצובים רספונסיביים וקוד HTML/CSS מוכן, עם אפשרות לייצוא ישיר ל-Figma להמשך עריכה. מתאים במיוחד למפתחים ומעצבים המעוניינים לייעל את תהליך העיצוב והפיתוח.",
 
1
  [
2
+ {
3
+ "name": "Google Labs FX",
4
+ "description": "אוסף ניסיונות חדשניים של גוגל המשלבים בינה מלאכותית, חוויות אינטראקטיביות וכלים ניסיוניים. כאן תוכלו לגלות פרויקטים ניסיוניים כמו כלי עריכת תמונה, עיצוב, סאונד וטקסט – ישירות מהמעבדות של גוגל.",
5
+ "url": "https://labs.google/fx",
6
+ "logo": "https://labs.google/fx/icons/favicon/favicon.svg",
7
+ "category": "creative",
8
+ "icon": "fas fa-flask",
9
+ "video": "",
10
+ "isFeatured": false,
11
+ "rating": 4,
12
+ "isNew": true,
13
+ "dateAdded": "2025-06-07T10:45:00Z",
14
+ "free": true
15
+ },
16
+ {
17
+ "name": "Imagen",
18
+ "description": "מודל יצירת תמונות מבית DeepMind של גוגל. Imagen מתמקד ביצירת תמונות ריאליסטיות באיכות גבוהה מתוך טקסט, עם הבנה עמוקה של שפה טבעית ומרכיבים חזותיים. הכלי מדגיש דיוק בתיאור והבנת הקשר טקסטואלי.",
19
+ "url": "https://deepmind.google/models/imagen/",
20
+ "logo": "https://www.gstatic.com/images/branding/productlogos/google_deepmind/v3/web-96dp/logo_google_deepmind_color_2x_web_96dp.png",
21
+ "category": "image",
22
+ "icon": "fas fa-image",
23
+ "video": "https://deepmind.google/api/blob/website/media/imagen__page_cover.mp4",
24
+ "isFeatured": false,
25
+ "rating": 4,
26
+ "isNew": true,
27
+ "dateAdded": "2025-06-07T10:30:00Z",
28
+ "free": false
29
+ },
30
+ {
31
+ "name": "KolWrite – תמלול חכם בעברית",
32
+ "description": "KolWrite היא פלטפורמת תמלול חדשנית שמבינה עברית – כולל ניבים ומבטאים. מאפשרת לתמלל שיחות, שיעורים וישיבות בצורה מדויקת, לסכם אוטומטית, לתרגם מעברית לאנגלית ולהיפך, לסנן רעשי רקע, ולייצא לקבצי PDF, Word ו-SRT. בנוסף, כוללת צ'אט AI שיכול לענות על שאלות מהתמלול. הכלי מאפשר שימוש חינמי עד שעה וחצי.",
33
+ "url": "https://www.kolwrite.com/",
34
+ "logo": "https://web.kolwrite.com/favicon_2.png",
35
+ "category": "audio",
36
+ "icon": "fas fa-file-audio",
37
+ "video": "",
38
+ "isFeatured": false,
39
+ "rating": 53,
40
+ "isNew": true,
41
+ "free": true,
42
+ "dateAdded": "2025-07-09T00:00:00Z"
43
+ },
44
  {
45
  "name": "Stitch by Google – עיצוב ממשקים באמצעות AI",
46
  "description": "Stitch הוא כלי חדשני מבית Google המאפשר ליצור ממשקי משתמש (UI) לאפליקציות ולווב באמצעות תיאורים טקסטואליים או תמונות. הכלי מייצר עיצובים רספונסיביים וקוד HTML/CSS מוכן, עם אפשרות לייצוא ישיר ל-Figma להמשך עריכה. מתאים במיוחד למפתחים ומעצבים המעוניינים לייעל את תהליך העיצוב והפיתוח.",