FIX Cite button behaviour and style
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nonimart 2025-06-26 14:04:09 +02:00
parent 04817a1d15
commit a247670ab9
2 changed files with 6 additions and 6 deletions

View File

@ -37,20 +37,20 @@
} }
.socials-buttons { .socials-buttons {
@apply flex gap-4; @apply flex gap-4 h-fit;
&__button { &__button {
@apply bg-white text-carhop-green-700 px-4 py-2 font-normal rounded-full w-fit flex items-center gap-2; @apply bg-white text-carhop-green-700 px-8 !py-4 font-normal rounded-full w-max flex items-center gap-2;
transition: transform 0.3s ease-in-out; transition: transform 0.3s ease-in-out;
&:hover { &:hover {
transform: scale(1.05); transform: scale(1.05);
} }
&[disabled='true'] { &[disabled] {
@apply opacity-50 cursor-not-allowed; @apply opacity-50 cursor-not-allowed;
} }
img { img {
@apply w-8 h-8 filter-primary; @apply w-7 h-7 filter-primary;
} }
} }
} }

View File

@ -14,7 +14,7 @@ $issueNumber = get_field('issue_number', $currentRevueID);
$post_type = get_post_type(); $post_type = get_post_type();
$hasThumbnail = has_post_thumbnail(); $hasThumbnail = has_post_thumbnail();
$citeReference = get_field('cite_reference', $currentRevueID); $citeReference = get_field('cite_reference', get_the_ID());
?> ?>
@ -64,7 +64,7 @@ $citeReference = get_field('cite_reference', $currentRevueID);
</div> </div>
<?php endif; ?> <?php endif; ?>
<div class="socials-buttons"> <div class="socials-buttons">
<button class="socials-buttons__button socials-buttons__button--cite" disabled="<?php echo empty($citeReference) ? 'true' : 'false'; ?>" title="<?php echo empty($citeReference) ? 'Citation non disponible' : 'Copier la citation'; ?>"> <button class="socials-buttons__button socials-buttons__button--cite" <?php echo empty($citeReference) ? 'disabled' : ''; ?> title="<?php echo empty($citeReference) ? 'Citation non disponible' : 'Copier la citation'; ?>">
<img src="<?php echo get_template_directory_uri(); ?>/resources/img/icons/carhop-citer-article.svg" alt=""> <img src="<?php echo get_template_directory_uri(); ?>/resources/img/icons/carhop-citer-article.svg" alt="">
Citer Citer
</button> </button>