Joykoeur75 commited on
Commit
edf0f5b
·
verified ·
1 Parent(s): 4a311a2

dans resultat recent on doit pouvoir avoir tout d'afficher a l'ecran ou de pouvoir faire bouger la ligne de droite a gauche - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +46 -2
index.html CHANGED
@@ -86,7 +86,11 @@
86
  <a href="#" class="block px-4 py-2 text-sm hover:bg-gray-700">Settings</a>
87
  <a href="#" class="block px-4 py-2 text-sm hover:bg-gray-700">Logout</a>
88
  </div>
 
89
  </div>
 
 
 
90
  </div>
91
  </div>
92
  </header>
@@ -471,8 +475,12 @@
471
  <section class="mb-8">
472
  <h2 class="text-xl font-bold mb-4">RECENT RESULTS</h2>
473
 
474
- <div class="overflow-x-auto scrollbar-hide">
475
- <div class="flex space-x-4" style="min-width: max-content;">
 
 
 
 
476
  <!-- Match 1 -->
477
  <div class="bg-gray-800 rounded-xl p-4 min-w-64">
478
  <div class="flex justify-between items-center mb-3">
@@ -941,6 +949,42 @@
941
  reputationElement.textContent = currentRep;
942
  }, 5000);
943
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
944
  // Animate match simulation progress bars
945
  const progressBars = document.querySelectorAll('.w-full.bg-gray-700.h-2.rounded-full div');
946
  progressBars.forEach(bar => {
 
86
  <a href="#" class="block px-4 py-2 text-sm hover:bg-gray-700">Settings</a>
87
  <a href="#" class="block px-4 py-2 text-sm hover:bg-gray-700">Logout</a>
88
  </div>
89
+ </div>
90
  </div>
91
+ <button class="absolute right-0 top-1/2 -translate-y-1/2 z-10 bg-gray-800 hover:bg-gray-700 w-8 h-8 rounded-full flex items-center justify-center text-xl">
92
+ <i class="fas fa-chevron-right"></i>
93
+ </button>
94
  </div>
95
  </div>
96
  </header>
 
475
  <section class="mb-8">
476
  <h2 class="text-xl font-bold mb-4">RECENT RESULTS</h2>
477
 
478
+ <div class="relative">
479
+ <button class="absolute left-0 top-1/2 -translate-y-1/2 z-10 bg-gray-800 hover:bg-gray-700 w-8 h-8 rounded-full flex items-center justify-center text-xl">
480
+ <i class="fas fa-chevron-left"></i>
481
+ </button>
482
+ <div class="overflow-x-auto scrollbar-hide scroll-smooth" id="resultsContainer">
483
+ <div class="flex space-x-4" style="min-width: max-content;">
484
  <!-- Match 1 -->
485
  <div class="bg-gray-800 rounded-xl p-4 min-w-64">
486
  <div class="flex justify-between items-center mb-3">
 
949
  reputationElement.textContent = currentRep;
950
  }, 5000);
951
 
952
+ // Recent results navigation
953
+ const resultsContainer = document.getElementById('resultsContainer');
954
+ const scrollAmount = 300; // Adjust this value as needed
955
+
956
+ document.querySelectorAll('[class*="fa-chevron"]').forEach(button => {
957
+ button.addEventListener('click', () => {
958
+ if (button.classList.contains('fa-chevron-left')) {
959
+ resultsContainer.scrollBy({ left: -scrollAmount, behavior: 'smooth' });
960
+ } else {
961
+ resultsContainer.scrollBy({ left: scrollAmount, behavior: 'smooth' });
962
+ }
963
+ });
964
+ });
965
+
966
+ // Touch support for mobile
967
+ let touchStartX = 0;
968
+ let touchEndX = 0;
969
+
970
+ resultsContainer.addEventListener('touchstart', e => {
971
+ touchStartX = e.changedTouches[0].screenX;
972
+ }, {passive: true});
973
+
974
+ resultsContainer.addEventListener('touchend', e => {
975
+ touchEndX = e.changedTouches[0].screenX;
976
+ handleSwipe();
977
+ }, {passive: true});
978
+
979
+ function handleSwipe() {
980
+ if (touchEndX < touchStartX) {
981
+ resultsContainer.scrollBy({ left: scrollAmount, behavior: 'smooth' });
982
+ }
983
+ if (touchEndX > touchStartX) {
984
+ resultsContainer.scrollBy({ left: -scrollAmount, behavior: 'smooth' });
985
+ }
986
+ }
987
+
988
  // Animate match simulation progress bars
989
  const progressBars = document.querySelectorAll('.w-full.bg-gray-700.h-2.rounded-full div');
990
  progressBars.forEach(bar => {