privateuserh commited on
Commit
fe9aa86
·
verified ·
1 Parent(s): 03eb6de

Add 2 files

Browse files
Files changed (2) hide show
  1. index.html +431 -287
  2. prompts.txt +2 -1
index.html CHANGED
@@ -96,6 +96,9 @@
96
  body {
97
  overscroll-behavior-y: contain;
98
  }
 
 
 
99
  </style>
100
  </head>
101
  <body class="bg-gray-50 font-sans text-gray-800">
@@ -138,91 +141,74 @@
138
 
139
  <!-- Explore Tab Content (hidden by default) -->
140
  <div id="exploreTab" class="hidden">
141
- <h2 class="text-lg font-semibold mb-4">Browse Categories</h2>
142
 
143
- <div class="grid grid-cols-3 gap-3">
144
- <div class="bg-blue-50 rounded-lg p-3 text-center cursor-pointer hover:bg-blue-100 transition">
145
- <div class="bg-primary text-white w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-2">
146
- <i class="fas fa-music"></i>
147
- </div>
148
- <span class="text-sm font-medium">Music</span>
149
- </div>
150
-
151
- <div class="bg-orange-50 rounded-lg p-3 text-center cursor-pointer hover:bg-orange-100 transition">
152
- <div class="bg-secondary text-white w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-2">
153
- <i class="fas fa-gamepad"></i>
154
- </div>
155
- <span class="text-sm font-medium">Gaming</span>
156
- </div>
157
-
158
- <div class="bg-purple-50 rounded-lg p-3 text-center cursor-pointer hover:bg-purple-100 transition">
159
- <div class="bg-purple-500 text-white w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-2">
160
- <i class="fas fa-newspaper"></i>
161
- </div>
162
- <span class="text-sm font-medium">News</span>
163
- </div>
164
-
165
- <div class="bg-green-50 rounded-lg p-3 text-center cursor-pointer hover:bg-green-100 transition">
166
- <div class="bg-green-500 text-white w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-2">
167
- <i class="fas fa-film"></i>
168
- </div>
169
- <span class="text-sm font-medium">Movies</span>
170
- </div>
171
-
172
- <div class="bg-red-50 rounded-lg p-3 text-center cursor-pointer hover:bg-red-100 transition">
173
- <div class="bg-red-500 text-white w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-2">
174
- <i class="fas fa-lightbulb"></i>
175
- </div>
176
- <span class="text-sm font-medium">Learning</span>
177
- </div>
178
-
179
- <div class="bg-yellow-50 rounded-lg p-3 text-center cursor-pointer hover:bg-yellow-100 transition">
180
- <div class="bg-yellow-500 text-white w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-2">
181
- <i class="fas fa-laugh-beam"></i>
182
- </div>
183
- <span class="text-sm font-medium">Comedy</span>
184
  </div>
185
  </div>
186
 
187
- <div class="mt-6">
188
- <h2 class="text-lg font-semibold mb-4">Popular Hashtags</h2>
189
  <div class="flex flex-wrap gap-2">
190
- <span class="bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition">#Viral</span>
191
- <span class="bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition">#Trending</span>
192
- <span class="bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition">#Explore</span>
193
- <span class="bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition">#Discover</span>
194
- <span class="bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition">#New</span>
195
- <span class="bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition">#Hot</span>
196
- <span class="bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition">#Popular</span>
197
- <span class="bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition">#Latest</span>
198
  </div>
199
  </div>
 
 
 
 
200
  </div>
201
 
202
  <!-- Library Tab Content (hidden by default) -->
203
  <div id="libraryTab" class="hidden">
204
- <h2 class="text-lg font-semibold mb-4">Your Hashtags</h2>
205
 
206
- <div class="grid grid-cols-2 gap-4 mb-6">
207
- <div class="bg-white rounded-lg p-3 shadow-sm border border-gray-200 flex items-center cursor-pointer hover:bg-gray-50" id="savedBtn">
208
- <div class="bg-blue-100 text-primary w-10 h-10 rounded-full flex items-center justify-center mr-3">
209
- <i class="fas fa-bookmark"></i>
210
- </div>
211
- <span class="font-medium text-sm">Saved</span>
212
- </div>
213
-
214
- <div class="bg-white rounded-lg p-3 shadow-sm border border-gray-200 flex items-center cursor-pointer hover:bg-gray-50" id="historyBtn">
215
- <div class="bg-orange-100 text-secondary w-10 h-10 rounded-full flex items-center justify-center mr-3">
216
- <i class="fas fa-history"></i>
217
  </div>
218
- <span class="font-medium text-sm">History</span>
219
  </div>
220
  </div>
221
 
222
- <div>
223
- <h3 class="font-medium mb-3">Recently Viewed</h3>
224
- <div class="space-y-3" id="recentlyViewedContainer">
225
- <!-- Recently viewed items will be dynamically inserted here -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  </div>
227
  </div>
228
  </div>
@@ -237,7 +223,7 @@
237
  </button>
238
 
239
  <button class="tab-button flex flex-col items-center text-gray-500" data-tab="exploreTab">
240
- <i class="fas fa-compass text-lg"></i>
241
  <span class="text-xs mt-1">Explore</span>
242
  </button>
243
 
@@ -250,115 +236,114 @@
250
 
251
  <!-- Floating Hashtag Search Button -->
252
  <button class="floating-btn bg-primary text-white flex items-center justify-center" id="hashtagSearchBtn">
253
- <i class="fas fa-hashtag text-2xl"></i>
254
  </button>
255
 
256
- <!-- Hashtag Search Modal (hidden by default) -->
257
- <div id="hashtagModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
258
  <div class="bg-white rounded-lg w-full max-w-md mx-4">
259
  <div class="p-4 border-b border-gray-200">
260
- <h3 class="font-semibold text-lg">Search Hashtags</h3>
261
  </div>
262
 
263
  <div class="p-4">
264
  <div class="mb-4">
265
- <label class="block text-sm font-medium text-gray-700 mb-1">Enter a hashtag</label>
266
- <input type="text" id="hashtagInput" placeholder="#trending"
267
- class="w-full py-2 px-4 rounded-full bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary">
268
  </div>
269
 
270
  <div class="mb-4">
271
- <label class="block text-sm font-medium text-gray-700 mb-1">Sort by</label>
272
  <div class="grid grid-cols-2 gap-2">
273
- <button class="bg-primary text-white py-2 px-3 rounded text-sm sort-btn" data-sort="newest">
274
- <i class="fas fa-clock mr-1"></i> Newest
 
 
 
 
 
 
275
  </button>
276
- <button class="bg-gray-200 text-gray-700 py-2 px-3 rounded text-sm sort-btn" data-sort="hottest">
277
- <i class="fas fa-fire mr-1"></i> Hottest
278
  </button>
279
  </div>
280
  </div>
281
 
282
  <div class="mb-4">
283
- <label class="block text-sm font-medium text-gray-700 mb-1">Content type</label>
284
- <div class="grid grid-cols-2 gap-2">
285
- <button class="bg-primary text-white py-2 px-3 rounded text-sm type-btn" data-type="all">
286
- <i class="fas fa-globe mr-1"></i> All
287
- </button>
288
- <button class="bg-gray-200 text-gray-700 py-2 px-3 rounded text-sm type-btn" data-type="media">
289
- <i class="fas fa-photo-video mr-1"></i> Media
290
- </button>
291
  </div>
292
  </div>
293
  </div>
294
 
295
  <div class="p-4 border-t border-gray-200 flex justify-end space-x-3">
296
- <button id="cancelHashtag" class="px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700">
297
  Cancel
298
  </button>
299
- <button id="searchHashtag" class="px-4 py-2 bg-primary text-white rounded-md text-sm font-medium">
300
- Search
301
  </button>
302
  </div>
303
  </div>
304
  </div>
305
 
306
- <!-- Settings Modal (hidden by default) -->
307
- <div id="settingsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
308
- <div class="bg-white rounded-lg w-full max-w-md mx-4 max-h-[80vh] overflow-y-auto">
309
- <div class="p-4 border-b border-gray-200">
310
- <h3 class="font-semibold text-lg">Settings</h3>
 
 
 
311
  </div>
312
 
313
  <div class="p-4">
314
- <div class="mb-6">
315
- <h4 class="font-medium text-gray-700 mb-3">Appearance</h4>
316
-
317
- <div class="space-y-3">
318
- <div class="flex items-center justify-between">
319
- <span class="text-sm text-gray-700">Dark Mode</span>
320
- <label class="relative inline-flex items-center cursor-pointer">
321
- <input type="checkbox" value="" class="sr-only peer" id="darkModeToggleSetting">
322
- <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"></div>
323
- </label>
324
- </div>
325
-
326
- <div class="flex items-center justify-between">
327
- <span class="text-sm text-gray-700">App Theme Color</span>
328
- <div class="flex space-x-2">
329
- <div class="w-6 h-6 rounded-full bg-primary cursor-pointer border-2 border-primary"></div>
330
- <div class="w-6 h-6 rounded-full bg-purple-500 cursor-pointer border-2 border-transparent"></div>
331
- <div class="w-6 h-6 rounded-full bg-green-500 cursor-pointer border-2 border-transparent"></div>
332
- <div class="w-6 h-6 rounded-full bg-red-500 cursor-pointer border-2 border-transparent"></div>
333
- </div>
334
- </div>
335
  </div>
336
  </div>
337
 
338
- <div class="mb-6">
339
- <h4 class="font-medium text-gray-700 mb-3">About</h4>
 
 
 
340
 
341
- <div class="space-y-3">
342
- <div class="flex items-center justify-between">
343
- <span class="text-sm text-gray-700">Version</span>
344
- <span class="text-sm text-gray-500">1.0.0</span>
345
- </div>
346
-
347
- <div class="flex items-center justify-between">
348
- <span class="text-sm text-gray-700">Privacy Policy</span>
349
- <span class="text-sm text-primary">View</span>
350
- </div>
351
-
352
- <div class="flex items-center justify-between">
353
- <span class="text-sm text-gray-700">Terms of Service</span>
354
- <span class="text-sm text-primary">View</span>
355
- </div>
 
 
 
 
 
356
  </div>
357
  </div>
358
  </div>
359
 
360
  <div class="p-4 border-t border-gray-200 flex justify-center">
361
- <button id="closeSettings" class="px-4 py-2 bg-primary text-white rounded-md text-sm font-medium">
362
  Close
363
  </button>
364
  </div>
@@ -377,78 +362,77 @@
377
  // Sample data for trending cards
378
  const trendingData = [
379
  {
380
- hashtag: "#Music",
381
- title: "Top music trends this week across all platforms",
382
- platform: "youtube",
383
  posts: "12K",
384
  trendType: "newest",
385
- popularity: "1.2M"
 
386
  },
387
  {
388
  hashtag: "#Tech",
389
- title: "Latest tech innovations and discussions",
390
  platform: "twitter",
391
  posts: "8K",
392
  trendType: "hottest",
393
- popularity: "890K"
 
394
  },
395
  {
396
- hashtag: "#Fitness",
397
- title: "New workout trends taking over social media",
398
- platform: "instagram",
399
  posts: "15K",
400
  trendType: "newest",
401
- popularity: "750K"
 
402
  },
403
  {
404
- hashtag: "#Foodie",
405
- title: "Viral food trends you need to try",
406
- platform: "tiktok",
407
  posts: "25K",
408
  trendType: "hottest",
409
- popularity: "1.5M"
 
410
  }
411
  ];
412
 
413
  // Sample data for recent cards
414
  const recentData = [
415
  {
416
- hashtag: "#Travel",
417
- title: "Most beautiful destinations trending this season",
418
- platform: "instagram",
419
  posts: "5K",
420
- trendType: "newest"
 
421
  },
422
  {
423
- hashtag: "#Fashion",
424
- title: "Streetwear trends going viral right now",
425
- platform: "tiktok",
426
  posts: "18K",
427
- trendType: "hottest"
 
428
  }
429
  ];
430
 
431
- // Sample data for recently viewed
432
- const recentlyViewedData = [
433
- {
434
- hashtag: "#MusicTrends",
435
- platform: "youtube",
436
- viewed: "2 days ago"
437
- },
438
- {
439
- hashtag: "#TechNews",
440
- platform: "twitter",
441
- viewed: "1 week ago"
442
- }
443
- ];
444
 
445
  // Function to generate platform icon
446
  function getPlatformIcon(platform) {
447
  const icons = {
448
- twitter: '<i class="fab fa-twitter twitter-bg"></i>',
449
- tiktok: '<i class="fab fa-tiktok tiktok-bg"></i>',
450
- instagram: '<i class="fab fa-instagram instagram-bg"></i>',
451
- youtube: '<i class="fab fa-youtube youtube-bg"></i>'
452
  };
453
  return icons[platform] || '<i class="fas fa-hashtag"></i>';
454
  }
@@ -471,13 +455,14 @@
471
 
472
  trendingData.forEach(item => {
473
  const card = document.createElement('div');
474
- card.className = 'trend-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300 cursor-pointer p-4';
475
  card.innerHTML = `
476
  <div class="flex items-start justify-between mb-2">
477
  <div>
478
  <span class="inline-flex items-center bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded-full">
479
  ${getPlatformIcon(item.platform)}
480
  <span class="ml-1">${item.hashtag}</span>
 
481
  </span>
482
  </div>
483
  <span class="inline-flex items-center bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded-full">
@@ -501,7 +486,7 @@
501
 
502
  recentData.forEach(item => {
503
  const card = document.createElement('div');
504
- card.className = 'trend-card bg-white rounded-lg shadow-sm transition duration-300 cursor-pointer p-3 flex items-start';
505
  card.innerHTML = `
506
  <div class="flex-shrink-0 mr-3">
507
  <span class="platform-indicator ${getPlatformColor(item.platform)}"></span>
@@ -509,7 +494,7 @@
509
  <div class="flex-1">
510
  <h3 class="font-medium text-sm line-clamp-2">${item.title}</h3>
511
  <div class="flex justify-between items-center mt-2 text-xs text-gray-500">
512
- <span>${item.hashtag}</span>
513
  <span class="capitalize">${item.trendType}</span>
514
  </div>
515
  </div>
@@ -518,37 +503,204 @@
518
  });
519
  }
520
 
521
- // Function to render recently viewed items
522
- function renderRecentlyViewed() {
523
- const container = document.getElementById('recentlyViewedContainer');
524
  container.innerHTML = '';
525
 
526
- recentlyViewedData.forEach(item => {
 
 
 
 
527
  const element = document.createElement('div');
528
- element.className = 'flex items-center p-2 rounded-lg bg-white shadow-sm cursor-pointer hover:bg-gray-50';
529
  element.innerHTML = `
530
  <div class="flex-shrink-0 mr-3">
531
- <div class="w-8 h-8 rounded-full ${getPlatformColor(item.platform)} flex items-center justify-center text-white">
532
- ${getPlatformIcon(item.platform)}
533
  </div>
534
  </div>
535
  <div class="flex-1">
536
- <h4 class="font-medium text-sm line-clamp-1">${item.hashtag}</h4>
537
- <p class="text-gray-500 text-xs">Viewed ${item.viewed}</p>
 
 
 
538
  </div>
539
  <button class="text-gray-500">
540
  <i class="fas fa-ellipsis-v"></i>
541
  </button>
542
  `;
543
  container.appendChild(element);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
544
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
545
  }
546
 
547
  // Initialize the app
548
  function initApp() {
549
  renderTrendingCards();
550
  renderRecentCards();
551
- renderRecentlyViewed();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
552
  }
553
 
554
  // Tab switching functionality
@@ -575,40 +727,86 @@
575
 
576
  // Scroll to top when switching tabs
577
  document.getElementById('mainContent').scrollTo(0, 0);
 
 
 
 
 
 
 
578
  });
579
  });
580
 
581
- // Hashtag search modal
582
- const hashtagSearchBtn = document.getElementById('hashtagSearchBtn');
583
- const hashtagModal = document.getElementById('hashtagModal');
584
- const cancelHashtag = document.getElementById('cancelHashtag');
585
- const searchHashtag = document.getElementById('searchHashtag');
586
- const hashtagInput = document.getElementById('hashtagInput');
587
-
588
- hashtagSearchBtn.addEventListener('click', function() {
589
- hashtagModal.classList.remove('hidden');
590
  });
591
 
592
- cancelHashtag.addEventListener('click', function() {
593
- hashtagModal.classList.add('hidden');
 
 
 
 
 
594
  });
595
 
596
- // Sort button selection
597
- document.querySelectorAll('.sort-btn').forEach(btn => {
598
  btn.addEventListener('click', function() {
599
- document.querySelectorAll('.sort-btn').forEach(b => {
600
- b.classList.remove('bg-primary', 'text-white');
601
- b.classList.add('bg-gray-200', 'text-gray-700');
602
- });
603
- this.classList.remove('bg-gray-200', 'text-gray-700');
604
- this.classList.add('bg-primary', 'text-white');
605
  });
606
  });
607
 
608
- // Type button selection
609
- document.querySelectorAll('.type-btn').forEach(btn => {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
610
  btn.addEventListener('click', function() {
611
- document.querySelectorAll('.type-btn').forEach(b => {
612
  b.classList.remove('bg-primary', 'text-white');
613
  b.classList.add('bg-gray-200', 'text-gray-700');
614
  });
@@ -617,62 +815,32 @@
617
  });
618
  });
619
 
620
- // Search hashtag
621
- searchHashtag.addEventListener('click', function() {
622
- const hashtag = hashtagInput.value.trim();
623
- if (!hashtag) return;
624
-
625
- // Get selected sort option
626
- const sortBtn = document.querySelector('.sort-btn.bg-primary');
627
- const sort = sortBtn ? sortBtn.getAttribute('data-sort') : 'newest';
628
-
629
- // Get selected type option
630
- const typeBtn = document.querySelector('.type-btn.bg-primary');
631
- const type = typeBtn ? typeBtn.getAttribute('data-type') : 'all';
632
-
633
- hashtagModal.classList.add('hidden');
634
- showToast(`Searching for ${hashtag} (${sort}, ${type})...`);
635
-
636
- // Simulate search with timeout
637
- setTimeout(() => {
638
- // In a real app, this would fetch actual trending content
639
- const container = document.getElementById('trendingCardsContainer');
640
- const card = document.createElement('div');
641
- card.className = 'trend-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300 cursor-pointer p-4';
642
-
643
- // Random platform for demo
644
- const platforms = ['twitter', 'tiktok', 'instagram', 'youtube'];
645
- const randomPlatform = platforms[Math.floor(Math.random() * platforms.length)];
646
-
647
- card.innerHTML = `
648
- <div class="flex items-start justify-between mb-2">
649
- <div>
650
- <span class="inline-flex items-center bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded-full">
651
- ${getPlatformIcon(randomPlatform)}
652
- <span class="ml-1">${hashtag}</span>
653
- </span>
654
- </div>
655
- <span class="inline-flex items-center bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded-full">
656
- <i class="fas fa-fire text-orange-400 mr-1"></i> ${Math.floor(Math.random() * 1000)}K
657
- </span>
658
- </div>
659
- <h3 class="font-medium text-sm line-clamp-2 mb-3">Latest content for ${hashtag} sorted by ${sort} (${type})</h3>
660
- <div class="flex justify-between items-center text-xs text-gray-500">
661
- <span>${Math.floor(Math.random() * 100)}K posts</span>
662
- <span class="capitalize">${sort}</span>
663
- </div>
664
- `;
665
-
666
- // Insert at the top of the container
667
- container.insertBefore(card, container.firstChild);
668
-
669
- showToast(`Found results for ${hashtag}`);
670
- }, 2000);
671
  });
672
 
673
  // Dark mode toggle
674
  const darkModeToggle = document.getElementById('darkModeToggle');
675
- const darkModeToggleSetting = document.getElementById('darkModeToggleSetting');
676
 
677
  function toggleDarkMode() {
678
  document.body.classList.toggle('bg-gray-900');
@@ -691,36 +859,12 @@
691
  }
692
 
693
  darkModeToggle.addEventListener('click', toggleDarkMode);
694
- darkModeToggleSetting.addEventListener('change', toggleDarkMode);
695
 
696
  // Check for saved dark mode preference
697
  if (localStorage.getItem('darkMode') === 'true') {
698
  toggleDarkMode();
699
- darkModeToggleSetting.checked = true;
700
  }
701
 
702
- // Settings modal
703
- const settingsBtn = document.getElementById('settingsBtn');
704
- const settingsModal = document.getElementById('settingsModal');
705
- const closeSettings = document.getElementById('closeSettings');
706
-
707
- settingsBtn.addEventListener('click', function() {
708
- settingsModal.classList.remove('hidden');
709
- });
710
-
711
- closeSettings.addEventListener('click', function() {
712
- settingsModal.classList.add('hidden');
713
- });
714
-
715
- // Library buttons
716
- document.getElementById('savedBtn').addEventListener('click', function() {
717
- showToast('Saved hashtags view would be shown here');
718
- });
719
-
720
- document.getElementById('historyBtn').addEventListener('click', function() {
721
- showToast('History view would be shown here');
722
- });
723
-
724
  // Toast notification function
725
  function showToast(message) {
726
  const toast = document.getElementById('toast');
 
96
  body {
97
  overscroll-behavior-y: contain;
98
  }
99
+
100
+ /* DMIM token color */
101
+ .dmim-bg { background-color: #4a6fdc; }
102
  </style>
103
  </head>
104
  <body class="bg-gray-50 font-sans text-gray-800">
 
141
 
142
  <!-- Explore Tab Content (hidden by default) -->
143
  <div id="exploreTab" class="hidden">
144
+ <h2 class="text-lg font-semibold mb-4">Search Trends</h2>
145
 
146
+ <div class="mb-4">
147
+ <div class="relative">
148
+ <input type="text" id="trendSearchInput" placeholder="Search for trends..."
149
+ class="w-full py-3 px-4 rounded-lg bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary">
150
+ <button id="searchTrendBtn" class="absolute right-3 top-3 text-gray-500 hover:text-primary">
151
+ <i class="fas fa-search"></i>
152
+ </button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  </div>
154
  </div>
155
 
156
+ <div class="mb-6">
157
+ <h3 class="font-medium mb-2">Popular Categories</h3>
158
  <div class="flex flex-wrap gap-2">
159
+ <button class="category-btn bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition" data-category="crypto">#Crypto</button>
160
+ <button class="category-btn bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition" data-category="tech">#Tech</button>
161
+ <button class="category-btn bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition" data-category="gaming">#Gaming</button>
162
+ <button class="category-btn bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition" data-category="music">#Music</button>
163
+ <button class="category-btn bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition" data-category="finance">#Finance</button>
164
+ <button class="category-btn bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full text-sm cursor-pointer transition" data-category="news">#News</button>
 
 
165
  </div>
166
  </div>
167
+
168
+ <div class="grid grid-cols-1 gap-4" id="searchResultsContainer">
169
+ <!-- Search results will appear here -->
170
+ </div>
171
  </div>
172
 
173
  <!-- Library Tab Content (hidden by default) -->
174
  <div id="libraryTab" class="hidden">
175
+ <h2 class="text-lg font-semibold mb-4">Saved Trends</h2>
176
 
177
+ <div class="mb-4">
178
+ <div class="flex items-center justify-between bg-gray-100 rounded-lg p-3">
179
+ <div class="flex items-center">
180
+ <div class="w-8 h-8 rounded-full dmim-bg text-white flex items-center justify-center mr-3">
181
+ <i class="fas fa-coins"></i>
182
+ </div>
183
+ <div>
184
+ <span class="font-medium">DMIM Token</span>
185
+ <span class="text-xs text-gray-500 block">Bitcoin Cash CHIP Protocol</span>
186
+ </div>
 
187
  </div>
188
+ <span class="text-sm font-medium">0.3% APY</span>
189
  </div>
190
  </div>
191
 
192
+ <div class="space-y-3" id="savedTrendsContainer">
193
+ <!-- Saved trends will appear here -->
194
+ </div>
195
+
196
+ <div class="mt-6">
197
+ <h3 class="font-medium mb-2">Stake DMIM to Trends</h3>
198
+ <div class="bg-gray-100 rounded-lg p-4">
199
+ <div class="mb-3">
200
+ <label class="block text-sm font-medium mb-1">Select Trend</label>
201
+ <select id="trendSelect" class="w-full p-2 rounded border border-gray-300">
202
+ <option value="">-- Select a saved trend --</option>
203
+ </select>
204
+ </div>
205
+ <div class="mb-3">
206
+ <label class="block text-sm font-medium mb-1">DMIM Amount</label>
207
+ <input type="number" id="stakeAmount" placeholder="0.00" class="w-full p-2 rounded border border-gray-300">
208
+ </div>
209
+ <button id="stakeBtn" class="w-full py-2 bg-primary text-white rounded-lg font-medium">
210
+ Stake & Farm Yield
211
+ </button>
212
  </div>
213
  </div>
214
  </div>
 
223
  </button>
224
 
225
  <button class="tab-button flex flex-col items-center text-gray-500" data-tab="exploreTab">
226
+ <i class="fas fa-search text-lg"></i>
227
  <span class="text-xs mt-1">Explore</span>
228
  </button>
229
 
 
236
 
237
  <!-- Floating Hashtag Search Button -->
238
  <button class="floating-btn bg-primary text-white flex items-center justify-center" id="hashtagSearchBtn">
239
+ <i class="fas fa-plus text-2xl"></i>
240
  </button>
241
 
242
+ <!-- Add Trend Modal (hidden by default) -->
243
+ <div id="addTrendModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
244
  <div class="bg-white rounded-lg w-full max-w-md mx-4">
245
  <div class="p-4 border-b border-gray-200">
246
+ <h3 class="font-semibold text-lg">Add New Trend</h3>
247
  </div>
248
 
249
  <div class="p-4">
250
  <div class="mb-4">
251
+ <label class="block text-sm font-medium text-gray-700 mb-1">Hashtag</label>
252
+ <input type="text" id="newHashtag" placeholder="#trend"
253
+ class="w-full py-2 px-4 rounded-lg bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary">
254
  </div>
255
 
256
  <div class="mb-4">
257
+ <label class="block text-sm font-medium text-gray-700 mb-1">Platform</label>
258
  <div class="grid grid-cols-2 gap-2">
259
+ <button class="platform-btn bg-gray-200 text-gray-700 py-2 px-3 rounded text-sm" data-platform="twitter">
260
+ <i class="fab fa-twitter mr-1 text-blue-400"></i> Twitter
261
+ </button>
262
+ <button class="platform-btn bg-gray-200 text-gray-700 py-2 px-3 rounded text-sm" data-platform="tiktok">
263
+ <i class="fab fa-tiktok mr-1"></i> TikTok
264
+ </button>
265
+ <button class="platform-btn bg-gray-200 text-gray-700 py-2 px-3 rounded text-sm" data-platform="instagram">
266
+ <i class="fab fa-instagram mr-1 text-pink-500"></i> Instagram
267
  </button>
268
+ <button class="platform-btn bg-gray-200 text-gray-700 py-2 px-3 rounded text-sm" data-platform="youtube">
269
+ <i class="fab fa-youtube mr-1 text-red-500"></i> YouTube
270
  </button>
271
  </div>
272
  </div>
273
 
274
  <div class="mb-4">
275
+ <label class="block text-sm font-medium text-gray-700 mb-1">Link DMIM Token</label>
276
+ <div class="flex items-center">
277
+ <input type="checkbox" id="linkDmim" class="mr-2">
278
+ <label for="linkDmim" class="text-sm">Stake DMIM to this trend</label>
 
 
 
 
279
  </div>
280
  </div>
281
  </div>
282
 
283
  <div class="p-4 border-t border-gray-200 flex justify-end space-x-3">
284
+ <button id="cancelAddTrend" class="px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700">
285
  Cancel
286
  </button>
287
+ <button id="saveTrend" class="px-4 py-2 bg-primary text-white rounded-md text-sm font-medium">
288
+ Save Trend
289
  </button>
290
  </div>
291
  </div>
292
  </div>
293
 
294
+ <!-- DMIM Token Info Modal (hidden by default) -->
295
+ <div id="dmimModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
296
+ <div class="bg-white rounded-lg w-full max-w-md mx-4">
297
+ <div class="p-4 border-b border-gray-200 flex justify-between items-center">
298
+ <h3 class="font-semibold text-lg">DMIM Token</h3>
299
+ <span class="inline-flex items-center bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">
300
+ <i class="fas fa-check-circle mr-1"></i> Verified
301
+ </span>
302
  </div>
303
 
304
  <div class="p-4">
305
+ <div class="flex items-center mb-4">
306
+ <div class="w-12 h-12 rounded-full dmim-bg text-white flex items-center justify-center mr-3">
307
+ <i class="fas fa-coins text-xl"></i>
308
+ </div>
309
+ <div>
310
+ <h4 class="font-medium">Bitcoin Cash CHIP Protocol</h4>
311
+ <p class="text-sm text-gray-500">0.3% APY Yield Farming</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  </div>
313
  </div>
314
 
315
+ <div class="mb-4">
316
+ <p class="text-sm text-gray-700 mb-3">
317
+ DMIM is a private cryptocurrency token on the Bitcoin Cash network using the CHIP protocol.
318
+ Stake DMIM to your saved trends to earn yield.
319
+ </p>
320
 
321
+ <div class="space-y-2">
322
+ <a href="https://tokenexplorer.cash/?tokenId=81fd176d7e3769aad00bc21539082cc3345f9cd613623fa281e6726f451f32f9" target="_blank" class="flex items-center text-blue-500 text-sm">
323
+ <i class="fas fa-external-link-alt mr-2"></i> View on Token Explorer
324
+ </a>
325
+ <a href="https://app.cauldron.quest/swap/81fd176d7e3769aad00bc21539082cc3345f9cd613623fa281e6726f451f32f9" target="_blank" class="flex items-center text-blue-500 text-sm">
326
+ <i class="fas fa-exchange-alt mr-2"></i> Swap on Cauldron
327
+ </a>
328
+ <a href="https://blockchair.com/bitcoin-cash/transaction/81fd176d7e3769aad00bc21539082cc3345f9cd613623fa281e6726f451f32f9" target="_blank" class="flex items-center text-blue-500 text-sm">
329
+ <i class="fas fa-link mr-2"></i> View Transaction
330
+ </a>
331
+ </div>
332
+ </div>
333
+
334
+ <div class="bg-gray-100 rounded-lg p-3">
335
+ <h4 class="font-medium text-sm mb-2">Your DMIM Balance</h4>
336
+ <div class="flex justify-between items-center">
337
+ <span class="font-medium" id="dmimBalance">0 DMIM</span>
338
+ <button id="addDmimBtn" class="text-sm text-primary font-medium">
339
+ <i class="fas fa-plus-circle mr-1"></i> Add DMIM
340
+ </button>
341
  </div>
342
  </div>
343
  </div>
344
 
345
  <div class="p-4 border-t border-gray-200 flex justify-center">
346
+ <button id="closeDmimModal" class="px-4 py-2 bg-primary text-white rounded-md text-sm font-medium">
347
  Close
348
  </button>
349
  </div>
 
362
  // Sample data for trending cards
363
  const trendingData = [
364
  {
365
+ hashtag: "#Crypto",
366
+ title: "Latest cryptocurrency trends and discussions",
367
+ platform: "twitter",
368
  posts: "12K",
369
  trendType: "newest",
370
+ popularity: "1.2M",
371
+ hasDmim: true
372
  },
373
  {
374
  hashtag: "#Tech",
375
+ title: "New tech innovations and product launches",
376
  platform: "twitter",
377
  posts: "8K",
378
  trendType: "hottest",
379
+ popularity: "890K",
380
+ hasDmim: false
381
  },
382
  {
383
+ hashtag: "#Gaming",
384
+ title: "Upcoming game releases and esports news",
385
+ platform: "youtube",
386
  posts: "15K",
387
  trendType: "newest",
388
+ popularity: "750K",
389
+ hasDmim: true
390
  },
391
  {
392
+ hashtag: "#Finance",
393
+ title: "Stock market updates and investment tips",
394
+ platform: "twitter",
395
  posts: "25K",
396
  trendType: "hottest",
397
+ popularity: "1.5M",
398
+ hasDmim: false
399
  }
400
  ];
401
 
402
  // Sample data for recent cards
403
  const recentData = [
404
  {
405
+ hashtag: "#Bitcoin",
406
+ title: "Bitcoin price analysis and market trends",
407
+ platform: "twitter",
408
  posts: "5K",
409
+ trendType: "newest",
410
+ hasDmim: true
411
  },
412
  {
413
+ hashtag: "#DeFi",
414
+ title: "Decentralized finance protocols and yield farming",
415
+ platform: "twitter",
416
  posts: "18K",
417
+ trendType: "hottest",
418
+ hasDmim: true
419
  }
420
  ];
421
 
422
+ // User data
423
+ let userData = {
424
+ dmimBalance: 0,
425
+ savedTrends: [],
426
+ stakedTrends: {}
427
+ };
 
 
 
 
 
 
 
428
 
429
  // Function to generate platform icon
430
  function getPlatformIcon(platform) {
431
  const icons = {
432
+ twitter: '<i class="fab fa-twitter text-blue-400"></i>',
433
+ tiktok: '<i class="fab fa-tiktok"></i>',
434
+ instagram: '<i class="fab fa-instagram text-pink-500"></i>',
435
+ youtube: '<i class="fab fa-youtube text-red-500"></i>'
436
  };
437
  return icons[platform] || '<i class="fas fa-hashtag"></i>';
438
  }
 
455
 
456
  trendingData.forEach(item => {
457
  const card = document.createElement('div');
458
+ card.className = 'trend-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300 cursor-pointer p-4 h-32 flex flex-col justify-between';
459
  card.innerHTML = `
460
  <div class="flex items-start justify-between mb-2">
461
  <div>
462
  <span class="inline-flex items-center bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded-full">
463
  ${getPlatformIcon(item.platform)}
464
  <span class="ml-1">${item.hashtag}</span>
465
+ ${item.hasDmim ? '<span class="ml-1 text-green-500"><i class="fas fa-check-circle"></i></span>' : ''}
466
  </span>
467
  </div>
468
  <span class="inline-flex items-center bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded-full">
 
486
 
487
  recentData.forEach(item => {
488
  const card = document.createElement('div');
489
+ card.className = 'trend-card bg-white rounded-lg shadow-sm transition duration-300 cursor-pointer p-3 flex items-start h-28';
490
  card.innerHTML = `
491
  <div class="flex-shrink-0 mr-3">
492
  <span class="platform-indicator ${getPlatformColor(item.platform)}"></span>
 
494
  <div class="flex-1">
495
  <h3 class="font-medium text-sm line-clamp-2">${item.title}</h3>
496
  <div class="flex justify-between items-center mt-2 text-xs text-gray-500">
497
+ <span>${item.hashtag} ${item.hasDmim ? '<i class="fas fa-check-circle text-green-500 ml-1"></i>' : ''}</span>
498
  <span class="capitalize">${item.trendType}</span>
499
  </div>
500
  </div>
 
503
  });
504
  }
505
 
506
+ // Function to render saved trends
507
+ function renderSavedTrends() {
508
+ const container = document.getElementById('savedTrendsContainer');
509
  container.innerHTML = '';
510
 
511
+ // Update select dropdown
512
+ const trendSelect = document.getElementById('trendSelect');
513
+ trendSelect.innerHTML = '<option value="">-- Select a saved trend --</option>';
514
+
515
+ userData.savedTrends.forEach(trend => {
516
  const element = document.createElement('div');
517
+ element.className = 'flex items-center p-3 rounded-lg bg-white shadow-sm cursor-pointer hover:bg-gray-50';
518
  element.innerHTML = `
519
  <div class="flex-shrink-0 mr-3">
520
+ <div class="w-8 h-8 rounded-full ${getPlatformColor(trend.platform)} flex items-center justify-center text-white">
521
+ ${getPlatformIcon(trend.platform)}
522
  </div>
523
  </div>
524
  <div class="flex-1">
525
+ <div class="flex items-center">
526
+ <h4 class="font-medium text-sm line-clamp-1">${trend.hashtag}</h4>
527
+ ${trend.hasDmim ? '<span class="ml-1 text-green-500"><i class="fas fa-check-circle"></i></span>' : ''}
528
+ </div>
529
+ <p class="text-gray-500 text-xs">${trend.platform} • ${trend.hasDmim ? 'Staked: ' + (userData.stakedTrends[trend.hashtag] || 0) + ' DMIM' : 'Not staked'}</p>
530
  </div>
531
  <button class="text-gray-500">
532
  <i class="fas fa-ellipsis-v"></i>
533
  </button>
534
  `;
535
  container.appendChild(element);
536
+
537
+ // Add to select dropdown
538
+ const option = document.createElement('option');
539
+ option.value = trend.hashtag;
540
+ option.textContent = trend.hashtag;
541
+ trendSelect.appendChild(option);
542
+ });
543
+
544
+ // Update DMIM balance display
545
+ document.getElementById('dmimBalance').textContent = userData.dmimBalance + ' DMIM';
546
+ }
547
+
548
+ // Function to show search results
549
+ function showSearchResults(query) {
550
+ const container = document.getElementById('searchResultsContainer');
551
+ container.innerHTML = '';
552
+
553
+ if (!query) return;
554
+
555
+ // Simulate search with timeout
556
+ setTimeout(() => {
557
+ // In a real app, this would fetch actual search results
558
+ const results = [
559
+ {
560
+ hashtag: `#${query}`,
561
+ title: `Latest content about ${query}`,
562
+ platform: "twitter",
563
+ posts: Math.floor(Math.random() * 100) + "K",
564
+ trendType: "hottest"
565
+ },
566
+ {
567
+ hashtag: `#${query}News`,
568
+ title: `Breaking news about ${query}`,
569
+ platform: "twitter",
570
+ posts: Math.floor(Math.random() * 50) + "K",
571
+ trendType: "newest"
572
+ },
573
+ {
574
+ hashtag: `#${query}Trends`,
575
+ title: `Trending topics related to ${query}`,
576
+ platform: "youtube",
577
+ posts: Math.floor(Math.random() * 30) + "K",
578
+ trendType: "hottest"
579
+ }
580
+ ];
581
+
582
+ results.forEach(item => {
583
+ const card = document.createElement('div');
584
+ card.className = 'trend-card bg-white rounded-lg overflow-hidden shadow-md transition duration-300 cursor-pointer p-4 h-32 flex flex-col justify-between';
585
+ card.innerHTML = `
586
+ <div class="flex items-start justify-between mb-2">
587
+ <div>
588
+ <span class="inline-flex items-center bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded-full">
589
+ ${getPlatformIcon(item.platform)}
590
+ <span class="ml-1">${item.hashtag}</span>
591
+ </span>
592
+ </div>
593
+ <button class="save-trend-btn text-gray-400 hover:text-primary" data-hashtag="${item.hashtag}" data-platform="${item.platform}">
594
+ <i class="fas fa-bookmark"></i>
595
+ </button>
596
+ </div>
597
+ <h3 class="font-medium text-sm line-clamp-2 mb-3">${item.title}</h3>
598
+ <div class="flex justify-between items-center text-xs text-gray-500">
599
+ <span>${item.posts} posts</span>
600
+ <span class="capitalize">${item.trendType}</span>
601
+ </div>
602
+ `;
603
+ container.appendChild(card);
604
+ });
605
+
606
+ // Add event listeners to save buttons
607
+ document.querySelectorAll('.save-trend-btn').forEach(btn => {
608
+ btn.addEventListener('click', function(e) {
609
+ e.stopPropagation();
610
+ const hashtag = this.getAttribute('data-hashtag');
611
+ const platform = this.getAttribute('data-platform');
612
+ saveTrend(hashtag, platform);
613
+ });
614
+ });
615
+
616
+ showToast(`Found results for ${query}`);
617
+ }, 1000);
618
+ }
619
+
620
+ // Function to save a trend
621
+ function saveTrend(hashtag, platform) {
622
+ // Check if already saved
623
+ if (userData.savedTrends.some(t => t.hashtag === hashtag)) {
624
+ showToast('This trend is already saved');
625
+ return;
626
+ }
627
+
628
+ // Add to saved trends
629
+ userData.savedTrends.push({
630
+ hashtag,
631
+ platform,
632
+ hasDmim: false
633
  });
634
+
635
+ // Update UI
636
+ renderSavedTrends();
637
+ showToast(`${hashtag} saved to your library`);
638
+
639
+ // Close modal if open
640
+ document.getElementById('addTrendModal').classList.add('hidden');
641
+ }
642
+
643
+ // Function to stake DMIM to a trend
644
+ function stakeDmim(hashtag, amount) {
645
+ if (!hashtag || !amount || amount <= 0) {
646
+ showToast('Please select a trend and enter a valid amount');
647
+ return;
648
+ }
649
+
650
+ if (amount > userData.dmimBalance) {
651
+ showToast('Insufficient DMIM balance');
652
+ return;
653
+ }
654
+
655
+ // Update staked amount
656
+ userData.stakedTrends[hashtag] = (userData.stakedTrends[hashtag] || 0) + amount;
657
+ userData.dmimBalance -= amount;
658
+
659
+ // Mark trend as having DMIM
660
+ const trend = userData.savedTrends.find(t => t.hashtag === hashtag);
661
+ if (trend) {
662
+ trend.hasDmim = true;
663
+ }
664
+
665
+ // Update UI
666
+ renderSavedTrends();
667
+ showToast(`Staked ${amount} DMIM to ${hashtag}`);
668
+ }
669
+
670
+ // Function to add DMIM tokens
671
+ function addDmim(amount) {
672
+ userData.dmimBalance += amount;
673
+ renderSavedTrends();
674
+ showToast(`Added ${amount} DMIM to your balance`);
675
  }
676
 
677
  // Initialize the app
678
  function initApp() {
679
  renderTrendingCards();
680
  renderRecentCards();
681
+ renderSavedTrends();
682
+
683
+ // Add some sample saved trends
684
+ userData.savedTrends = [
685
+ {
686
+ hashtag: "#Bitcoin",
687
+ platform: "twitter",
688
+ hasDmim: true
689
+ },
690
+ {
691
+ hashtag: "#DeFi",
692
+ platform: "twitter",
693
+ hasDmim: false
694
+ }
695
+ ];
696
+
697
+ // Add some sample staked trends
698
+ userData.stakedTrends = {
699
+ "#Bitcoin": 500
700
+ };
701
+
702
+ // Set initial DMIM balance
703
+ userData.dmimBalance = 1000;
704
  }
705
 
706
  // Tab switching functionality
 
727
 
728
  // Scroll to top when switching tabs
729
  document.getElementById('mainContent').scrollTo(0, 0);
730
+
731
+ // If switching to explore tab, focus search input
732
+ if (tabId === 'exploreTab') {
733
+ setTimeout(() => {
734
+ document.getElementById('trendSearchInput').focus();
735
+ }, 100);
736
+ }
737
  });
738
  });
739
 
740
+ // Search trend functionality
741
+ document.getElementById('searchTrendBtn').addEventListener('click', function() {
742
+ const query = document.getElementById('trendSearchInput').value.trim();
743
+ if (query) {
744
+ showSearchResults(query);
745
+ }
 
 
 
746
  });
747
 
748
+ document.getElementById('trendSearchInput').addEventListener('keypress', function(e) {
749
+ if (e.key === 'Enter') {
750
+ const query = this.value.trim();
751
+ if (query) {
752
+ showSearchResults(query);
753
+ }
754
+ }
755
  });
756
 
757
+ // Category buttons
758
+ document.querySelectorAll('.category-btn').forEach(btn => {
759
  btn.addEventListener('click', function() {
760
+ const category = this.getAttribute('data-category');
761
+ document.getElementById('trendSearchInput').value = category;
762
+ showSearchResults(category);
 
 
 
763
  });
764
  });
765
 
766
+ // Floating button to add new trend
767
+ document.getElementById('hashtagSearchBtn').addEventListener('click', function() {
768
+ document.getElementById('addTrendModal').classList.remove('hidden');
769
+ });
770
+
771
+ // Cancel add trend
772
+ document.getElementById('cancelAddTrend').addEventListener('click', function() {
773
+ document.getElementById('addTrendModal').classList.add('hidden');
774
+ });
775
+
776
+ // Save new trend
777
+ document.getElementById('saveTrend').addEventListener('click', function() {
778
+ const hashtag = document.getElementById('newHashtag').value.trim();
779
+ const platform = document.querySelector('.platform-btn.bg-primary')?.getAttribute('data-platform');
780
+ const linkDmim = document.getElementById('linkDmim').checked;
781
+
782
+ if (!hashtag || !platform) {
783
+ showToast('Please enter a hashtag and select a platform');
784
+ return;
785
+ }
786
+
787
+ // Add to saved trends
788
+ userData.savedTrends.push({
789
+ hashtag,
790
+ platform,
791
+ hasDmim: linkDmim
792
+ });
793
+
794
+ // If linking DMIM, add some stake
795
+ if (linkDmim) {
796
+ userData.stakedTrends[hashtag] = 100;
797
+ userData.dmimBalance = Math.max(0, userData.dmimBalance - 100);
798
+ }
799
+
800
+ // Update UI
801
+ renderSavedTrends();
802
+ document.getElementById('addTrendModal').classList.add('hidden');
803
+ showToast(`${hashtag} saved to your library`);
804
+ });
805
+
806
+ // Platform selection in add trend modal
807
+ document.querySelectorAll('.platform-btn').forEach(btn => {
808
  btn.addEventListener('click', function() {
809
+ document.querySelectorAll('.platform-btn').forEach(b => {
810
  b.classList.remove('bg-primary', 'text-white');
811
  b.classList.add('bg-gray-200', 'text-gray-700');
812
  });
 
815
  });
816
  });
817
 
818
+ // Stake DMIM button
819
+ document.getElementById('stakeBtn').addEventListener('click', function() {
820
+ const hashtag = document.getElementById('trendSelect').value;
821
+ const amount = parseFloat(document.getElementById('stakeAmount').value);
822
+ stakeDmim(hashtag, amount);
823
+ });
824
+
825
+ // DMIM token info
826
+ document.addEventListener('click', function(e) {
827
+ if (e.target.closest('.dmim-info')) {
828
+ document.getElementById('dmimModal').classList.remove('hidden');
829
+ }
830
+ });
831
+
832
+ // Close DMIM modal
833
+ document.getElementById('closeDmimModal').addEventListener('click', function() {
834
+ document.getElementById('dmimModal').classList.add('hidden');
835
+ });
836
+
837
+ // Add DMIM button
838
+ document.getElementById('addDmimBtn').addEventListener('click', function() {
839
+ addDmim(1000);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
840
  });
841
 
842
  // Dark mode toggle
843
  const darkModeToggle = document.getElementById('darkModeToggle');
 
844
 
845
  function toggleDarkMode() {
846
  document.body.classList.toggle('bg-gray-900');
 
859
  }
860
 
861
  darkModeToggle.addEventListener('click', toggleDarkMode);
 
862
 
863
  // Check for saved dark mode preference
864
  if (localStorage.getItem('darkMode') === 'true') {
865
  toggleDarkMode();
 
866
  }
867
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
868
  // Toast notification function
869
  function showToast(message) {
870
  const toast = document.getElementById('toast');
prompts.txt CHANGED
@@ -1,2 +1,3 @@
1
  Remove videos and download links only keep the cards on the cards add a floating button to allow user input of a hashtag make the hashtag search for the newest trending to hottest trending content audio and video only display the newest or hottest in the card window
2
- Remove images for cards on use data
 
 
1
  Remove videos and download links only keep the cards on the cards add a floating button to allow user input of a hashtag make the hashtag search for the newest trending to hottest trending content audio and video only display the newest or hottest in the card window
2
+ Remove images for cards on use data
3
+ Modify the explorer button to search for trends modify the library to add a hashtag to save the search add a private Cryptocurrency token named DMIM it's a Bitcoin Cash CHIP Protocol token the user should be able to stake the tokens to the saved trend search and yield farm at 0.3% max correlate trends to token reference https://tokenexplorer.cash/?tokenId=81fd176d7e3769aad00bc21539082cc3345f9cd613623fa281e6726f451f32f9 and https://app.cauldron.quest/swap/81fd176d7e3769aad00bc21539082cc3345f9cd613623fa281e6726f451f32f9 and https://blockchair.com/bitcoin-cash/transaction/81fd176d7e3769aad00bc21539082cc3345f9cd613623fa281e6726f451f32f9 add a verified green checkmark next to the tokento the saved search also make the main screen cards a little taller make the user interface very simple and efficient