diff --git a/css/styles.css b/css/styles.css index a9e2491..06c6e6a 100644 --- a/css/styles.css +++ b/css/styles.css @@ -90,12 +90,26 @@ img { font-size: 18px; font-weight: 500; transition: background-color 0.2s; + position: relative; + overflow: hidden; } .nav-item:hover { background-color: rgba(0, 0, 0, 0.05); } +/* Styles pour la page active dans la sidebar */ +.nav-item.active { + background-color: rgba(255, 0, 0, 0.08); + font-weight: 600; + color: var(--primary-red); + box-shadow: inset 3px 0 0 var(--primary-red); +} + +.nav-item.active i { + color: var(--primary-red); +} + .nav-item i, .nav-item img { margin-right: 15px; width: 24px; @@ -132,6 +146,14 @@ img { transform: translateX(5px); } +/* Style pour un tag actif */ +.tag-item.active { + background-color: rgba(255, 0, 0, 0.08); + color: var(--primary-red); + font-weight: 600; + box-shadow: inset 3px 0 0 var(--primary-red); +} + .tag-icon { color: var(--primary-red); font-size: 0.9em; @@ -139,10 +161,48 @@ img { transition: transform 0.2s ease; } -.tag-item:hover .tag-icon { +.tag-item:hover .tag-icon, +.tag-item.active .tag-icon { transform: scale(1.5); } +/* Media queries pour le style actif sur les différentes tailles d'écran */ +@media (max-width: 1200px) and (min-width: 1001px) { + .nav-item.active { + background-color: rgba(255, 0, 0, 0.15); + } + + .nav-item.active::after { + content: attr(data-title); + position: absolute; + left: 70px; + top: 50%; + transform: translateY(-50%); + background: var(--primary-red); + color: white; + padding: 5px 10px; + border-radius: 4px; + white-space: nowrap; + box-shadow: 0 1px 5px rgba(0,0,0,0.2); + z-index: 100; + } +} + +/* Style pour le menu mobile */ +.mobile-menu .nav-item.active { + background-color: rgba(255, 0, 0, 0.08); + color: var(--primary-red); + font-weight: 600; + box-shadow: inset 3px 0 0 var(--primary-red); +} + +.mobile-menu .tag-item.active { + background-color: rgba(255, 0, 0, 0.08); + color: var(--primary-red); + font-weight: 600; + box-shadow: inset 3px 0 0 var(--primary-red); +} + /* Header */ .header { display: flex; diff --git a/includes/mobile-menu.php b/includes/mobile-menu.php index c5d1d4c..543d32e 100644 --- a/includes/mobile-menu.php +++ b/includes/mobile-menu.php @@ -11,73 +11,81 @@ - - Accueil - - - Direct - - - - - 'fas fa-music', // Musique - 5 => 'fas fa-running', // Sport - 11 => 'fas fa-globe', // Actualité & Politique - 2 => 'fas fa-film', // Films - 3 => 'fas fa-video', // Émissions & Séries - 4 => 'fas fa-gamepad', // Jeux - 6 => 'fas fa-laugh', // Humour - 7 => 'fas fa-palette', // Art - 8 => 'fas fa-spa', // Bien-être - 9 => 'fas fa-tshirt', // Mode - 10 => 'fas fa-random', // Divers - 12 => 'fas fa-dollar-sign', // Finance - 13 => 'fas fa-graduation-cap', // Education - 14 => 'fas fa-fist-raised', // Activism - 15 => 'fas fa-microscope', // Science & Technology - 16 => 'fas fa-paw', // Animals - 17 => 'fas fa-child', // Kids - 18 => 'fas fa-utensils' // Food - ]; +
+ + Accueil + + + Direct + - foreach (PRIORITY_CATEGORIES as $id => $name) { - $icon = isset($categoryIcons[$id]) ? $categoryIcons[$id] : 'fas fa-folder'; - echo ''; - echo ' ' . htmlspecialchars($name); - echo ''; + + + 'fas fa-music', // Musique + 5 => 'fas fa-running', // Sport + 11 => 'fas fa-globe', // Actualité & Politique + 2 => 'fas fa-film', // Films + 3 => 'fas fa-video', // Émissions & Séries + 4 => 'fas fa-gamepad', // Jeux + 6 => 'fas fa-laugh', // Humour + 7 => 'fas fa-palette', // Art + 8 => 'fas fa-spa', // Bien-être + 9 => 'fas fa-tshirt', // Mode + 10 => 'fas fa-random', // Divers + 12 => 'fas fa-dollar-sign', // Finance + 13 => 'fas fa-graduation-cap', // Education + 14 => 'fas fa-fist-raised', // Activism + 15 => 'fas fa-microscope', // Science & Technology + 16 => 'fas fa-paw', // Animals + 17 => 'fas fa-child', // Kids + 18 => 'fas fa-utensils' // Food + ]; + + foreach (PRIORITY_CATEGORIES as $id => $name) { + $isActive = ($currentPage === 'categories.php' && $currentCategoryId === $id); + $icon = isset($categoryIcons[$id]) ? $categoryIcons[$id] : 'fas fa-folder'; + echo ''; + echo ' ' . htmlspecialchars($name); + echo ''; + } } - } - ?> + ?> + + +
- +
+

Hashtags populaires

+ + + + + +
-

Hashtags populaires

- - - - - + - - -

Suivez-nous

-
- - - - - +
+

Suivez-nous

+
diff --git a/includes/sidebar.php b/includes/sidebar.php index a85f989..de5608f 100644 --- a/includes/sidebar.php +++ b/includes/sidebar.php @@ -4,11 +4,20 @@ kaubuntu.re + +