Correction for Social networks label names including caps

This commit is contained in:
Antoine M 2024-01-23 17:26:44 +01:00
parent 1ce7015e69
commit 8d73ed7b84
2 changed files with 8 additions and 15 deletions

View File

@ -32,17 +32,17 @@
filter: brightness(1.4);
}
}
.share-button--facebook {
.share-button--Facebook {
&:before {
background-image: url('../resources/img/graphic-assets/icone-social-facebook.svg');
}
}
.share-button--twitter-x {
.share-button--Twitter-X {
&:before {
background-image: url('../resources/img/graphic-assets/icone-social-twitter-x.svg');
}
}
.share-button--linkedin {
.share-button--Linkedin {
&:before {
background-image: url('../resources/img/graphic-assets/icone-social-linkedin.svg');
}

View File

@ -13,29 +13,22 @@ if (!function_exists('build_share_urls')) {
$linkedInUrl = 'https://www.linkedin.com/feed/?shareActive=true&text=' . $postTitle . ' ' . $postUrl;
return array(
'facebook' => $facebookUrl,
'twitter-x' => $twitterUrl,
'linkedin' => $linkedInUrl
'Facebook' => $facebookUrl,
'Twitter-X' => $twitterUrl,
'Linkedin' => $linkedInUrl
);
}
}
$shareUrls = build_share_urls($postID);
?>
<div class="post-infos-capsule">
<div class="post-infos-capsule__share">
<?php
__('Partager sur', 'homegrade-theme__texte-fonctionnel')
?>
<?php foreach ($shareUrls as $key => $shareUrl) : ?>
<a class="share-button share-button--<?php echo $key ?>" href='<?php echo $shareUrl ?>' target="_blank" title="<?php echo __("Partager ce contenu sur", "homegrade-theme__texte-fonctionnel") . $key ?>">
<?php if ($key) : ?>
<!-- <img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icone-social-' . $key . '.svg' ?>" /> -->
<?php endif; ?>
<a class="share-button share-button--<?php echo $key ?>" href='<?php echo $shareUrl ?>' target="_blank" title="<?php echo __("Partager ce contenu sur ", "homegrade-theme__texte-fonctionnel") . $key ?>">
</a>
<?php endforeach; ?>
</div>