refactor: change home links
This commit is contained in:
+11
-11
@@ -1,9 +1,9 @@
|
||||
<!-- Sidebar de navigation -->
|
||||
<div class="sidebar">
|
||||
<a href="index.php" class="logo">
|
||||
<a href="/" class="logo">
|
||||
<img src="img/logo.png" alt="kaubuntu.re">
|
||||
</a>
|
||||
|
||||
|
||||
<?php
|
||||
// Détecter la page courante et ses paramètres
|
||||
$currentPage = basename($_SERVER['PHP_SELF']);
|
||||
@@ -12,15 +12,15 @@
|
||||
$isTagSearch = !empty($currentQuery) && substr($currentQuery, 0, 1) === '#';
|
||||
$currentTag = $isTagSearch ? substr($currentQuery, 1) : '';
|
||||
?>
|
||||
|
||||
|
||||
<nav class="sidebar-nav">
|
||||
<a href="index.php" class="nav-item <?php echo ($currentPage === 'index.php') ? 'active' : ''; ?>" data-title="Accueil">
|
||||
<a href="/" class="nav-item <?php echo ($currentPage === 'index.php') ? 'active' : ''; ?>" data-title="Accueil">
|
||||
<i class="fas fa-home"></i> <span>Accueil</span>
|
||||
</a>
|
||||
<a href="direct.php" class="nav-item <?php echo ($currentPage === 'direct.php') ? 'active' : ''; ?>" data-title="Direct">
|
||||
<i class="fas fa-broadcast-tower"></i> <span>Direct</span>
|
||||
</a>
|
||||
|
||||
|
||||
<div class="nav-divider"></div>
|
||||
|
||||
<?php
|
||||
@@ -47,7 +47,7 @@
|
||||
17 => 'fas fa-child', // Enfants
|
||||
18 => 'fas fa-utensils' // Cuisine
|
||||
];
|
||||
|
||||
|
||||
foreach (PRIORITY_CATEGORIES as $id => $name) {
|
||||
$isActive = ($currentPage === 'categories.php' && $currentCategoryId === $id);
|
||||
$icon = isset($categoryIcons[$id]) ? $categoryIcons[$id] : 'fas fa-folder';
|
||||
@@ -57,14 +57,14 @@
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div class="nav-divider"></div>
|
||||
|
||||
|
||||
<div class="category-title">
|
||||
<i class="fas fa-hashtag"></i> <span>Hashtags</span>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
<?php
|
||||
if (defined('IMPORTANT_TAGS') && !empty(IMPORTANT_TAGS)):
|
||||
foreach (IMPORTANT_TAGS as $tag):
|
||||
$encodedTag = urlencode('#' . $tag);
|
||||
@@ -73,7 +73,7 @@
|
||||
<a href="recherche.php?q=<?php echo $encodedTag; ?>" class="tag-item <?php echo $isActive ? 'active' : ''; ?>" data-title="<?php echo htmlspecialchars($tag); ?>">
|
||||
<i class="fas fa-hashtag tag-icon"></i> <span><?php echo htmlspecialchars($tag); ?></span>
|
||||
</a>
|
||||
<?php
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user