SameerArz commited on
Commit
b92cd10
·
verified ·
1 Parent(s): 874ec72

do same with other categories as well

Browse files
Files changed (1) hide show
  1. index.html +197 -10
index.html CHANGED
@@ -96,19 +96,19 @@
96
  <button class="category-filter flex-shrink-0 px-6 py-2 rounded-full bg-white shadow text-gray-700 font-medium" data-category="food-culture">
97
  Food & Culture
98
  </button>
99
- <button class="category-filter flex-shrink-0 px-6 py-2 rounded-full bg-white shadow text-gray-700 font-medium">
100
  Parties
101
  </button>
102
- <button class="category-filter flex-shrink-0 px-6 py-2 rounded-full bg-white shadow text-gray-700 font-medium">
103
  Workshops
104
  </button>
105
- <button class="category-filter flex-shrink-0 px-6 py-2 rounded-full bg-white shadow text-gray-700 font-medium">
106
  Sports
107
  </button>
108
- <button class="category-filter flex-shrink-0 px-6 py-2 rounded-full bg-white shadow text-gray-700 font-medium">
109
  Networking
110
  </button>
111
- </div>
112
  </div>
113
 
114
  <!-- Events Grid -->
@@ -436,7 +436,126 @@
436
  }
437
  ];
438
 
439
- function createEventCard(event) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
440
  return `
441
  <div class="event-card bg-white rounded-xl shadow-md overflow-hidden transition-all duration-300" data-category="food-culture">
442
  <div class="h-48 bg-indigo-100 relative">
@@ -465,7 +584,6 @@
465
  </div>
466
  `;
467
  }
468
-
469
  function showFoodCultureEvents() {
470
  // Update title
471
  popularEventsTitle.textContent = "Food & Culture Events";
@@ -482,7 +600,70 @@
482
  attachEventListeners();
483
  }
484
 
485
- function showAllEvents() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
486
  // Reset to original content
487
  popularEventsTitle.textContent = "Popular Events Near You";
488
  location.reload();
@@ -502,15 +683,21 @@
502
  filter.addEventListener('click', () => {
503
  categoryFilters.forEach(f => f.classList.remove('active'));
504
  filter.classList.add('active');
505
-
506
  const category = filter.dataset.category;
507
 
508
  if (category === 'food-culture') {
509
  showFoodCultureEvents();
 
 
 
 
 
 
 
 
510
  } else if (category === 'all') {
511
  showAllEvents();
512
  }
513
- // Add more categories as needed
514
  });
515
  });
516
  // Event details modal
 
96
  <button class="category-filter flex-shrink-0 px-6 py-2 rounded-full bg-white shadow text-gray-700 font-medium" data-category="food-culture">
97
  Food & Culture
98
  </button>
99
+ <button class="category-filter flex-shrink-0 px-6 py-2 rounded-full bg-white shadow text-gray-700 font-medium" data-category="party">
100
  Parties
101
  </button>
102
+ <button class="category-filter flex-shrink-0 px-6 py-2 rounded-full bg-white shadow text-gray-700 font-medium" data-category="workshop">
103
  Workshops
104
  </button>
105
+ <button class="category-filter flex-shrink-0 px-6 py-2 rounded-full bg-white shadow text-gray-700 font-medium" data-category="sport">
106
  Sports
107
  </button>
108
+ <button class="category-filter flex-shrink-0 px-6 py-2 rounded-full bg-white shadow text-gray-700 font-medium" data-category="networking">
109
  Networking
110
  </button>
111
+ </div>
112
  </div>
113
 
114
  <!-- Events Grid -->
 
436
  }
437
  ];
438
 
439
+ const partyEvents = [
440
+ {
441
+ title: "Neon Glow Party",
442
+ category: "Party",
443
+ location: "Miami",
444
+ date: "Nov 18, 2023",
445
+ description: "Dance the night away under neon lights with the best DJs in town.",
446
+ image: "http://static.photos/technology/640x360/201",
447
+ price: "$25.00"
448
+ },
449
+ {
450
+ title: "Beach Sunset Rave",
451
+ category: "Party",
452
+ location: "Santa Monica",
453
+ date: "Nov 22, 2023",
454
+ description: "Epic beach party with fire dancers and electronic beats at sunset.",
455
+ image: "http://static.photos/outdoor/640x360/202",
456
+ price: "$30.00"
457
+ },
458
+ {
459
+ title: "Rooftop VIP Night",
460
+ category: "Party",
461
+ location: "New York",
462
+ date: "Dec 1, 2023",
463
+ description: "Exclusive rooftop party with skyline views and premium cocktails.",
464
+ image: "http://static.photos/cityscape/640x360/203",
465
+ price: "$50.00"
466
+ }
467
+ ];
468
+
469
+ const workshopEvents = [
470
+ {
471
+ title: "Pottery Workshop",
472
+ category: "Workshop",
473
+ location: "Portland",
474
+ date: "Nov 19, 2023",
475
+ description: "Get your hands dirty and create beautiful ceramic pieces with expert guidance.",
476
+ image: "http://static.photos/studio/640x360/301",
477
+ price: "$40.00"
478
+ },
479
+ {
480
+ title: "Digital Photography Basics",
481
+ category: "Workshop",
482
+ location: "Seattle",
483
+ date: "Nov 28, 2023",
484
+ description: "Learn the fundamentals of photography and master your camera settings.",
485
+ image: "http://static.photos/technology/640x360/302",
486
+ price: "$55.00"
487
+ },
488
+ {
489
+ title: "Bread Making Class",
490
+ category: "Workshop",
491
+ location: "San Francisco",
492
+ date: "Dec 5, 2023",
493
+ description: "From sourdough to baguettes - master the art of artisan bread making.",
494
+ image: "http://static.photos/food/640x360/303",
495
+ price: "$35.00"
496
+ }
497
+ ];
498
+
499
+ const sportEvents = [
500
+ {
501
+ title: "Sunrise Yoga Session",
502
+ category: "Sports",
503
+ location: "San Diego",
504
+ date: "Nov 21, 2023",
505
+ description: "Start your day with energizing yoga by the beach as the sun rises.",
506
+ image: "http://static.photos/outdoor/640x360/401",
507
+ price: "$20.00"
508
+ },
509
+ {
510
+ title: "Group Hiking Adventure",
511
+ category: "Sports",
512
+ location: "Denver",
513
+ date: "Nov 26, 2023",
514
+ description: "Explore beautiful mountain trails with experienced guides and new friends.",
515
+ image: "http://static.photos/nature/640x360/402",
516
+ price: "$15.00"
517
+ },
518
+ {
519
+ title: "Beach Volleyball Tournament",
520
+ category: "Sports",
521
+ location: "Santa Barbara",
522
+ date: "Dec 3, 2023",
523
+ description: "Join the ultimate beach volleyball competition - teams and solo players welcome!",
524
+ image: "http://static.photos/outdoor/640x360/403",
525
+ price: "$10.00"
526
+ }
527
+ ];
528
+
529
+ const networkingEvents = [
530
+ {
531
+ title: "Startup Mixer",
532
+ category: "Networking",
533
+ location: "Palo Alto",
534
+ date: "Nov 23, 2023",
535
+ description: "Connect with entrepreneurs, investors, and tech professionals over drinks.",
536
+ image: "http://static.photos/office/640x360/501",
537
+ price: "$0.00"
538
+ },
539
+ {
540
+ title: "Creative Professionals Meetup",
541
+ category: "Networking",
542
+ location: "Brooklyn",
543
+ date: "Nov 30, 2023",
544
+ description: "Artists, designers, and creatives unite for collaboration and inspiration.",
545
+ image: "http://static.photos/studio/640x360/502",
546
+ price: "$5.00"
547
+ },
548
+ {
549
+ title: "Women in Tech Summit",
550
+ category: "Networking",
551
+ location: "Austin",
552
+ date: "Dec 8, 2023",
553
+ description: "Empowering women in technology through networking and knowledge sharing.",
554
+ image: "http://static.photos/technology/640x360/503",
555
+ price: "$25.00"
556
+ }
557
+ ];
558
+ function createEventCard(event) {
559
  return `
560
  <div class="event-card bg-white rounded-xl shadow-md overflow-hidden transition-all duration-300" data-category="food-culture">
561
  <div class="h-48 bg-indigo-100 relative">
 
584
  </div>
585
  `;
586
  }
 
587
  function showFoodCultureEvents() {
588
  // Update title
589
  popularEventsTitle.textContent = "Food & Culture Events";
 
600
  attachEventListeners();
601
  }
602
 
603
+ function showPartyEvents() {
604
+ // Update title
605
+ popularEventsTitle.textContent = "Party Events";
606
+
607
+ // Clear current grid
608
+ eventsGrid.innerHTML = '';
609
+
610
+ // Add party events
611
+ partyEvents.forEach(event => {
612
+ eventsGrid.innerHTML += createEventCard(event);
613
+ });
614
+
615
+ // Re-attach event listeners to new buttons
616
+ attachEventListeners();
617
+ }
618
+
619
+ function showWorkshopEvents() {
620
+ // Update title
621
+ popularEventsTitle.textContent = "Workshop Events";
622
+
623
+ // Clear current grid
624
+ eventsGrid.innerHTML = '';
625
+
626
+ // Add workshop events
627
+ workshopEvents.forEach(event => {
628
+ eventsGrid.innerHTML += createEventCard(event);
629
+ });
630
+
631
+ // Re-attach event listeners to new buttons
632
+ attachEventListeners();
633
+ }
634
+
635
+ function showSportEvents() {
636
+ // Update title
637
+ popularEventsTitle.textContent = "Sports Events";
638
+
639
+ // Clear current grid
640
+ eventsGrid.innerHTML = '';
641
+
642
+ // Add sport events
643
+ sportEvents.forEach(event => {
644
+ eventsGrid.innerHTML += createEventCard(event);
645
+ });
646
+
647
+ // Re-attach event listeners to new buttons
648
+ attachEventListeners();
649
+ }
650
+
651
+ function showNetworkingEvents() {
652
+ // Update title
653
+ popularEventsTitle.textContent = "Networking Events";
654
+
655
+ // Clear current grid
656
+ eventsGrid.innerHTML = '';
657
+
658
+ // Add networking events
659
+ networkingEvents.forEach(event => {
660
+ eventsGrid.innerHTML += createEventCard(event);
661
+ });
662
+
663
+ // Re-attach event listeners to new buttons
664
+ attachEventListeners();
665
+ }
666
+ function showAllEvents() {
667
  // Reset to original content
668
  popularEventsTitle.textContent = "Popular Events Near You";
669
  location.reload();
 
683
  filter.addEventListener('click', () => {
684
  categoryFilters.forEach(f => f.classList.remove('active'));
685
  filter.classList.add('active');
 
686
  const category = filter.dataset.category;
687
 
688
  if (category === 'food-culture') {
689
  showFoodCultureEvents();
690
+ } else if (category === 'party') {
691
+ showPartyEvents();
692
+ } else if (category === 'workshop') {
693
+ showWorkshopEvents();
694
+ } else if (category === 'sport') {
695
+ showSportEvents();
696
+ } else if (category === 'networking') {
697
+ showNetworkingEvents();
698
  } else if (category === 'all') {
699
  showAllEvents();
700
  }
 
701
  });
702
  });
703
  // Event details modal