feat: replace direct element

This commit is contained in:
2025-10-17 12:26:49 +04:00
parent 444fb4bc26
commit 184b3d4893
5 changed files with 340 additions and 4 deletions
+28 -2
View File
@@ -12,36 +12,62 @@
</div>
<nav class="social-icons" aria-label="Réseaux sociaux">
<?php if (!empty(MASTODON_URL) && MASTODON_URL !== '#'): ?>
<a target="_blank" rel="me noreferrer" href="<?php echo MASTODON_URL; ?>" class="icon-button" aria-label="Suivre sur Mastodon">
<i class="fab fa-mastodon icon-mastodon" aria-hidden="true"></i>
</a>
<?php endif; ?>
<?php if (!empty(INSTAGRAM_URL) && INSTAGRAM_URL !== '#'): ?>
<a target="_blank" rel="noreferrer" href="<?php echo INSTAGRAM_URL; ?>" class="icon-button" aria-label="Suivre sur Instagram">
<i class="fab fa-instagram icon-instagram" aria-hidden="true"></i>
</a>
<?php endif; ?>
<?php if (!empty(TIKTOK_URL) && TIKTOK_URL !== '#'): ?>
<a target="_blank" rel="noreferrer" href="<?php echo TIKTOK_URL; ?>" class="icon-button" aria-label="Suivre sur TikTok">
<i class="fab fa-tiktok icon-tiktok" aria-hidden="true"></i>
</a>
<?php endif; ?>
<?php
// Vérifier s'il y a au moins un réseau social dans le menu déroulant
$hasDropdownSocial = (!empty(FACEBOOK_URL) && FACEBOOK_URL !== '#') ||
(!empty(YOUTUBE_URL) && YOUTUBE_URL !== '#') ||
(!empty(X_URL) && X_URL !== '#');
if ($hasDropdownSocial):
?>
<div class="more-social-container">
<button type="button" class="icon-button more-social-toggle" aria-expanded="false" aria-controls="social-dropdown" aria-label="Voir plus de réseaux sociaux">
<i class="fas fa-ellipsis-h" aria-hidden="true"></i>
</button>
<div id="social-dropdown" class="more-social-dropdown" role="menu">
<?php if (!empty(FACEBOOK_URL) && FACEBOOK_URL !== '#'): ?>
<a target="_blank" rel="noreferrer" href="<?php echo FACEBOOK_URL; ?>" class="more-social-item" role="menuitem">
<i class="fab fa-facebook icon-facebook" aria-hidden="true"></i> Facebook
</a>
<?php endif; ?>
<?php if (!empty(YOUTUBE_URL) && YOUTUBE_URL !== '#'): ?>
<a target="_blank" rel="noreferrer" href="<?php echo YOUTUBE_URL; ?>" class="more-social-item" role="menuitem">
<i class="fab fa-youtube icon-youtube" aria-hidden="true"></i> YouTube
</a>
<?php endif; ?>
<?php if (!empty(X_URL) && X_URL !== '#'): ?>
<a target="_blank" rel="noreferrer" href="<?php echo X_URL; ?>" class="more-social-item" role="menuitem">
<i class="fab fa-x-twitter icon-x" aria-hidden="true"></i> X
</a>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
</nav>
<div class="action-icons">
<?php if (defined('DONATIONS_ENABLED') && DONATIONS_ENABLED && !empty(PAYPAL_ME_URL)): ?>
<a href="dons.php" class="icon-button donation-link" aria-label="Soutenir KA UBUNTU" title="Faire un don">
<?php if (defined('DONATIONS_ENABLED') && DONATIONS_ENABLED): ?>
<a href="dons.php" class="icon-button donation-link" aria-label="Soutenir <?php echo SITE_NAME; ?>" title="Faire un don">
<i class="fas fa-heart" aria-hidden="true"></i>
</a>
<?php endif; ?>