2025-04-09 16:04:50 +04:00
|
|
|
<!-- Sidebar de navigation -->
|
2025-07-22 11:54:05 +04:00
|
|
|
<nav class="sidebar" role="navigation" aria-label="Navigation principale">
|
|
|
|
|
<a href="/" class="logo" aria-label="Retour à l'accueil">
|
|
|
|
|
<img src="img/logo.png" alt="Logo kaubuntu.re">
|
2025-04-09 16:04:50 +04:00
|
|
|
</a>
|
2025-07-20 16:29:16 +04:00
|
|
|
|
2025-04-11 07:22:18 +04:00
|
|
|
<?php
|
|
|
|
|
// Détecter la page courante et ses paramètres
|
|
|
|
|
$currentPage = basename($_SERVER['PHP_SELF']);
|
|
|
|
|
$currentCategoryId = isset($_GET['id']) ? intval($_GET['id']) : null;
|
|
|
|
|
$currentQuery = isset($_GET['q']) ? trim($_GET['q']) : '';
|
|
|
|
|
$isTagSearch = !empty($currentQuery) && substr($currentQuery, 0, 1) === '#';
|
|
|
|
|
$currentTag = $isTagSearch ? substr($currentQuery, 1) : '';
|
|
|
|
|
?>
|
2025-07-20 16:29:16 +04:00
|
|
|
|
2025-07-22 11:54:05 +04:00
|
|
|
<div class="sidebar-nav">
|
|
|
|
|
<a href="/" class="nav-item <?php echo ($currentPage === 'index.php') ? 'active' : ''; ?>" data-title="Accueil" aria-current="<?php echo ($currentPage === 'index.php') ? 'page' : 'false'; ?>">
|
|
|
|
|
<i class="fas fa-home" aria-hidden="true"></i> <span>Accueil</span>
|
2025-04-09 16:04:50 +04:00
|
|
|
</a>
|
2025-07-22 11:54:05 +04:00
|
|
|
<a href="direct.php" class="nav-item <?php echo ($currentPage === 'direct.php') ? 'active' : ''; ?>" data-title="Direct" aria-current="<?php echo ($currentPage === 'direct.php') ? 'page' : 'false'; ?>">
|
|
|
|
|
<i class="fas fa-broadcast-tower" aria-hidden="true"></i> <span>Direct</span>
|
2025-04-09 16:04:50 +04:00
|
|
|
</a>
|
2025-07-20 16:29:16 +04:00
|
|
|
|
2025-09-28 20:39:47 +04:00
|
|
|
<?php if (defined('DONATIONS_ENABLED') && DONATIONS_ENABLED && !empty(PAYPAL_ME_URL)): ?>
|
|
|
|
|
<a href="dons.php" class="nav-item donation-nav-link <?php echo ($currentPage === 'dons.php') ? 'active' : ''; ?>" data-title="Soutenir" aria-current="<?php echo ($currentPage === 'dons.php') ? 'page' : 'false'; ?>">
|
|
|
|
|
<i class="fas fa-heart" aria-hidden="true"></i> <span>Soutenir</span>
|
|
|
|
|
</a>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
2025-04-09 16:04:50 +04:00
|
|
|
<div class="nav-divider"></div>
|
2025-04-10 09:43:10 +04:00
|
|
|
|
2025-04-10 09:34:44 +04:00
|
|
|
<?php
|
|
|
|
|
// Afficher les catégories prioritaires
|
|
|
|
|
if (defined('PRIORITY_CATEGORIES') && !empty(PRIORITY_CATEGORIES)) {
|
|
|
|
|
// Tableau associatif des icônes pour les catégories
|
|
|
|
|
$categoryIcons = [
|
2025-04-11 06:47:45 +04:00
|
|
|
1 => 'fas fa-music', // Musique
|
2025-04-10 09:34:44 +04:00
|
|
|
2 => 'fas fa-film', // Films
|
2025-04-11 06:47:45 +04:00
|
|
|
3 => 'fas fa-car', // Véhicules
|
|
|
|
|
4 => 'fas fa-palette', // Jeux
|
|
|
|
|
5 => 'fas fa-running', // Sport
|
2025-04-10 09:34:44 +04:00
|
|
|
6 => 'fas fa-laugh', // Humour
|
2025-04-11 06:47:45 +04:00
|
|
|
7 => 'fas fa-gamepad', // Art
|
|
|
|
|
8 => 'fas fa-person', // Personnalités
|
|
|
|
|
9 => 'fas fa-face-grin-tears', // Comédie
|
|
|
|
|
10 => 'fas fa-tv', // Divertissement
|
|
|
|
|
11 => 'fas fa-globe', // Actualité & Politique
|
|
|
|
|
12 => 'fas fa-chalkboard-user', // Tutoriel
|
2025-04-10 09:34:44 +04:00
|
|
|
13 => 'fas fa-graduation-cap', // Education
|
2025-04-11 06:47:45 +04:00
|
|
|
14 => 'fas fa-fist-raised', // Activisme
|
|
|
|
|
15 => 'fas fa-microscope', // Science & Technologie
|
|
|
|
|
16 => 'fas fa-paw', // Animaux
|
|
|
|
|
17 => 'fas fa-child', // Enfants
|
|
|
|
|
18 => 'fas fa-utensils' // Cuisine
|
2025-04-10 09:34:44 +04:00
|
|
|
];
|
2025-07-20 16:29:16 +04:00
|
|
|
|
2025-04-10 09:34:44 +04:00
|
|
|
foreach (PRIORITY_CATEGORIES as $id => $name) {
|
2025-04-11 07:22:18 +04:00
|
|
|
$isActive = ($currentPage === 'categories.php' && $currentCategoryId === $id);
|
2025-04-10 09:34:44 +04:00
|
|
|
$icon = isset($categoryIcons[$id]) ? $categoryIcons[$id] : 'fas fa-folder';
|
2025-07-22 11:54:05 +04:00
|
|
|
echo '<a href="categories.php?id=' . $id . '" class="nav-item ' . ($isActive ? 'active' : '') . '" data-title="' . htmlspecialchars($name) . '" aria-current="' . ($isActive ? 'page' : 'false') . '">';
|
|
|
|
|
echo '<i class="' . $icon . '" aria-hidden="true"></i> <span>' . htmlspecialchars($name) . '</span>';
|
2025-04-10 09:34:44 +04:00
|
|
|
echo '</a>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|
2025-07-20 16:29:16 +04:00
|
|
|
|
2025-04-09 16:04:50 +04:00
|
|
|
<div class="nav-divider"></div>
|
2025-07-20 16:29:16 +04:00
|
|
|
|
2025-07-22 11:54:05 +04:00
|
|
|
<div class="category-title" role="heading" aria-level="2">
|
|
|
|
|
<i class="fas fa-hashtag" aria-hidden="true"></i> <span>Hashtags</span>
|
2025-04-09 16:04:50 +04:00
|
|
|
</div>
|
2025-07-20 16:29:16 +04:00
|
|
|
|
|
|
|
|
<?php
|
2025-04-10 13:40:25 +04:00
|
|
|
if (defined('IMPORTANT_TAGS') && !empty(IMPORTANT_TAGS)):
|
|
|
|
|
foreach (IMPORTANT_TAGS as $tag):
|
2025-04-10 13:30:15 +04:00
|
|
|
$encodedTag = urlencode('#' . $tag);
|
2025-04-11 07:22:18 +04:00
|
|
|
$isActive = ($isTagSearch && strtolower($currentTag) === strtolower($tag));
|
2025-04-10 13:30:15 +04:00
|
|
|
?>
|
2025-07-22 11:54:05 +04:00
|
|
|
<a href="recherche.php?q=<?php echo $encodedTag; ?>" class="tag-item <?php echo $isActive ? 'active' : ''; ?>" data-title="<?php echo htmlspecialchars($tag); ?>" aria-current="<?php echo $isActive ? 'page' : 'false'; ?>">
|
|
|
|
|
<i class="fas fa-hashtag tag-icon" aria-hidden="true"></i> <span><?php echo htmlspecialchars($tag); ?></span>
|
2025-04-10 09:43:10 +04:00
|
|
|
</a>
|
2025-07-20 16:29:16 +04:00
|
|
|
<?php
|
2025-04-10 13:30:15 +04:00
|
|
|
endforeach;
|
|
|
|
|
endif;
|
|
|
|
|
?>
|
2025-07-22 11:54:05 +04:00
|
|
|
</div>
|
2025-09-17 22:30:09 +04:00
|
|
|
|
2025-07-22 11:54:05 +04:00
|
|
|
</nav>
|