feat: social media aggregator (YouTube, Instagram, TikTok, WordPress)
This commit is contained in:
+46
-76
@@ -1,92 +1,62 @@
|
||||
<!-- Menu mobile (masqué par défaut) -->
|
||||
<div class="mobile-menu">
|
||||
<button class="mobile-menu-close">
|
||||
<i class="fas fa-times"></i>
|
||||
<?php
|
||||
$currentPage = basename($_SERVER['PHP_SELF']);
|
||||
$isHome = ($currentPage === 'index.php' || $currentPage === '/');
|
||||
?>
|
||||
<!-- Menu mobile -->
|
||||
<div class="mobile-menu" id="mobile-menu" role="dialog" aria-label="Menu de navigation" aria-modal="true">
|
||||
<button class="mobile-menu-close" aria-label="Fermer le menu">
|
||||
<i class="fas fa-times" aria-hidden="true"></i>
|
||||
</button>
|
||||
|
||||
<div class="search-container">
|
||||
<form action="recherche.php" method="get">
|
||||
<input type="text" name="q" placeholder="Rechercher...">
|
||||
<button type="submit"><i class="fas fa-search"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="index.php" class="nav-item <?php echo ($currentPage === 'index.php') ? 'active' : ''; ?>">
|
||||
<i class="fas fa-home"></i> Accueil
|
||||
</a>
|
||||
<a href="direct.php" class="nav-item <?php echo ($currentPage === 'direct.php') ? 'active' : ''; ?>">
|
||||
<i class="fas fa-broadcast-tower"></i> Direct
|
||||
<nav>
|
||||
<a href="/"
|
||||
class="nav-item <?php echo $isHome ? 'active' : ''; ?>">
|
||||
<i class="fas fa-home" aria-hidden="true"></i> Accueil
|
||||
</a>
|
||||
|
||||
<hr class="nav-divider">
|
||||
|
||||
<?php
|
||||
// Afficher les catégories prioritaires
|
||||
if (defined('PRIORITY_CATEGORIES') && !empty(PRIORITY_CATEGORIES)) {
|
||||
// Tableau associatif des icônes pour les catégories
|
||||
$categoryIcons = [
|
||||
1 => 'fas fa-music', // Musique
|
||||
2 => 'fas fa-film', // Films
|
||||
3 => 'fas fa-car', // Véhicules
|
||||
4 => 'fas fa-palette', // Jeux
|
||||
5 => 'fas fa-running', // Sport
|
||||
6 => 'fas fa-laugh', // Humour
|
||||
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
|
||||
13 => 'fas fa-graduation-cap', // Education
|
||||
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
|
||||
];
|
||||
<p class="mobile-section-title">Nos réseaux</p>
|
||||
|
||||
foreach (PRIORITY_CATEGORIES as $id => $name) {
|
||||
$isActive = ($currentPage === 'categories.php' && $currentCategoryId === $id);
|
||||
$icon = isset($categoryIcons[$id]) ? $categoryIcons[$id] : 'fas fa-folder';
|
||||
echo '<a href="categories.php?id=' . $id . '" class="nav-item ' . ($isActive ? 'active' : '') . '">';
|
||||
echo '<i class="' . $icon . '"></i> ' . htmlspecialchars($name);
|
||||
echo '</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<hr class="nav-divider">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3 class="mobile-section-title">Hashtags populaires</h3>
|
||||
<?php
|
||||
if (defined('IMPORTANT_TAGS') && !empty(IMPORTANT_TAGS)):
|
||||
foreach (IMPORTANT_TAGS as $tag):
|
||||
$encodedTag = urlencode('#' . $tag);
|
||||
$isActive = ($isTagSearch && strtolower($currentTag) === strtolower($tag));
|
||||
?>
|
||||
<a href="recherche.php?q=<?php echo $encodedTag; ?>" class="nav-item <?php echo $isActive ? 'active' : ''; ?>">
|
||||
<i class="fas fa-hashtag"></i> <?php echo htmlspecialchars($tag); ?>
|
||||
<a href="<?php echo $isHome ? '#youtube' : 'index.php#youtube'; ?>"
|
||||
class="nav-item">
|
||||
<i class="fab fa-youtube icon-youtube" aria-hidden="true"></i> YouTube
|
||||
</a>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<a href="<?php echo $isHome ? '#instagram' : 'index.php#instagram'; ?>"
|
||||
class="nav-item">
|
||||
<i class="fab fa-instagram icon-instagram" aria-hidden="true"></i> Instagram
|
||||
</a>
|
||||
<a href="<?php echo $isHome ? '#tiktok' : 'index.php#tiktok'; ?>"
|
||||
class="nav-item">
|
||||
<i class="fab fa-tiktok icon-tiktok" aria-hidden="true"></i> TikTok
|
||||
</a>
|
||||
<a href="<?php echo $isHome ? '#actualites' : 'index.php#actualites'; ?>"
|
||||
class="nav-item">
|
||||
<i class="fas fa-newspaper" aria-hidden="true"></i> Actualités
|
||||
</a>
|
||||
|
||||
<?php if (defined('DONATIONS_ENABLED') && DONATIONS_ENABLED && !empty(PAYPAL_ME_URL)): ?>
|
||||
<hr class="nav-divider">
|
||||
<a href="dons.php" class="nav-item donation-nav-link <?php echo ($currentPage === 'dons.php') ? 'active' : ''; ?>">
|
||||
<i class="fas fa-heart" aria-hidden="true"></i> Soutenir
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
|
||||
<hr class="nav-divider">
|
||||
|
||||
<div>
|
||||
<h3 class="mobile-section-title">Suivez-nous</h3>
|
||||
<p class="mobile-section-title">Suivez-nous</p>
|
||||
<div class="mobile-social-icons">
|
||||
<a target="_blank" rel="me noreferrer" href="<?php echo MASTODON_URL; ?>"><i class="fab fa-mastodon icon-mastodon"></i></a>
|
||||
<a target="_blank" rel="noreferrer" href="<?php echo FACEBOOK_URL; ?>"><i class="fab fa-facebook icon-facebook"></i></a>
|
||||
<a target="_blank" rel="noreferrer" href="<?php echo INSTAGRAM_URL; ?>"><i class="fab fa-instagram icon-instagram"></i></a>
|
||||
<a target="_blank" rel="noreferrer" href="<?php echo TIKTOK_URL; ?>"><i class="fab fa-tiktok icon-tiktok"></i></a>
|
||||
<a target="_blank" rel="noreferrer" href="<?php echo YOUTUBE_URL; ?>"><i class="fab fa-youtube icon-youtube"></i></a>
|
||||
<a target="_blank" rel="noreferrer" href="<?php echo X_URL; ?>"><i class="fab fa-x-twitter icon-x"></i></a>
|
||||
<a target="_blank" rel="noopener noreferrer" href="<?php echo htmlspecialchars(YOUTUBE_URL); ?>" aria-label="YouTube">
|
||||
<i class="fab fa-youtube icon-youtube" aria-hidden="true"></i>
|
||||
</a>
|
||||
<a target="_blank" rel="noopener noreferrer" href="<?php echo htmlspecialchars(INSTAGRAM_URL); ?>" aria-label="Instagram">
|
||||
<i class="fab fa-instagram icon-instagram" aria-hidden="true"></i>
|
||||
</a>
|
||||
<a target="_blank" rel="noopener noreferrer" href="<?php echo htmlspecialchars(TIKTOK_URL); ?>" aria-label="TikTok">
|
||||
<i class="fab fa-tiktok icon-tiktok" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user