add current page highlight on footer
This commit is contained in:
@@ -1103,6 +1103,35 @@ img {
|
||||
transform: translateX(5px);
|
||||
}
|
||||
|
||||
/* Style pour le lien actif dans le footer */
|
||||
.footer-links a.active {
|
||||
color: var(--primary-red);
|
||||
font-weight: 600;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.footer-links a.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -3px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: linear-gradient(90deg,
|
||||
transparent 0%,
|
||||
var(--primary-red) 20%,
|
||||
var(--primary-red) 80%,
|
||||
transparent 100%);
|
||||
opacity: 0.8;
|
||||
transform-origin: center;
|
||||
transition: transform 0.3s, opacity 0.3s;
|
||||
}
|
||||
|
||||
.footer-links a.active:hover::after {
|
||||
opacity: 1;
|
||||
transform: scaleX(1.1);
|
||||
}
|
||||
|
||||
.footer-links a i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
+17
-7
@@ -14,46 +14,56 @@
|
||||
<div class="footer-columns">
|
||||
<div class="footer-column">
|
||||
<h3 class="footer-title">Catégories</h3>
|
||||
<div>
|
||||
<ul class="footer-links">
|
||||
<li><a href="index.php">Accueil</a></li>
|
||||
<li><a href="direct.php">Direct</a></li>
|
||||
<li><a href="index.php" <?php echo ($currentPage === 'index.php') ? 'class="active"' : ''; ?>>Accueil</a></li>
|
||||
<li><a href="direct.php" <?php echo ($currentPage === 'direct.php') ? 'class="active"' : ''; ?>>Direct</a></li>
|
||||
|
||||
<?php
|
||||
if (defined('PRIORITY_CATEGORIES') && !empty(PRIORITY_CATEGORIES)) {
|
||||
foreach (PRIORITY_CATEGORIES as $id => $name) {
|
||||
echo '<li><a href="categories.php?id=' . $id . '">' . htmlspecialchars($name) . '</a></li>';
|
||||
$isActive = ($currentPage === 'categories.php' && $currentCategoryId === $id);
|
||||
echo '<li><a href="categories.php?id=' . $id . '"' . ($isActive ? ' class="active"' : '') . '>' . htmlspecialchars($name) . '</a></li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-column">
|
||||
<h3 class="footer-title">Hashtags</h3>
|
||||
<div>
|
||||
<ul class="footer-links">
|
||||
<?php
|
||||
if (defined('IMPORTANT_TAGS') && !empty(IMPORTANT_TAGS)):
|
||||
foreach (IMPORTANT_TAGS as $tag):
|
||||
$encodedTag = urlencode('#' . $tag);
|
||||
$isActive = ($isTagSearch && strtolower($currentTag) === strtolower($tag));
|
||||
?>
|
||||
<li><a href="recherche.php?q=<?php echo $encodedTag; ?>"><?php echo htmlspecialchars($tag); ?></a></li>
|
||||
<li><a href="recherche.php?q=<?php echo $encodedTag; ?>" <?php echo $isActive ? 'class="active"' : ''; ?>><?php echo htmlspecialchars($tag); ?></a></li>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-column">
|
||||
<h3 class="footer-title">Informations légales</h3>
|
||||
<div>
|
||||
<ul class="footer-links">
|
||||
<li><a href="mentions-legales.php">Mentions légales</a></li>
|
||||
<li><a href="<?php echo LEGAL_SOURCE_CODE_URL; ?>" target="_blank" rel="noopener noreferrer">
|
||||
<li><a href="mentions-legales.php" <?php echo ($currentPage === 'mentions-legales.php') ? 'class="active"' : ''; ?>>Mentions légales</a></li>
|
||||
<li>
|
||||
<a href="<?php echo LEGAL_SOURCE_CODE_URL; ?>" target="_blank" rel="noopener noreferrer">
|
||||
<i class="fab fa-git-alt"></i> Code source
|
||||
</a></li>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer-social">
|
||||
<a target="_blank" rel="noreferrer" href="<?php echo FACEBOOK_URL; ?>"><i class="fab fa-facebook icon-facebook"></i></a>
|
||||
|
||||
Reference in New Issue
Block a user