FEATURE Showing commity if personn is part of a commity
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nonimart 2025-09-16 16:11:11 +02:00
parent d94fcf4b90
commit baa799458b
2 changed files with 39 additions and 2 deletions

View File

@ -6,8 +6,21 @@
} }
&__header { &__header {
@apply grid grid-cols-2 gap-2 items-center justify-center py-12; @apply grid grid-cols-2 gap-2 gap-x-8 items-center justify-center py-12;
grid-template-columns: auto 1fr; grid-template-columns: auto 1fr;
} }
&__comities-list {
@apply flex flex-wrap gap-2 items-center col-span-2 text-primary font-normal pt-4;
}
&__comity {
@apply text-lg fjalla uppercase;
+ .page--single-auteurs__comity {
@apply before:content-['|'] before:mx-2 before:text-primary;
}
}
&__comities-list-title {
@apply text-base font-normal text-neutral-400;
}
} }

View File

@ -6,6 +6,8 @@ $description = get_field('description', $author_id);
$profilePicture = get_field('profile_thumbnail', $author_id); $profilePicture = get_field('profile_thumbnail', $author_id);
$profilePictureUrl = $profilePicture['url'] ?? ''; $profilePictureUrl = $profilePicture['url'] ?? '';
$profilePictureAlt = $profilePicture['alt'] ?? ''; $profilePictureAlt = $profilePicture['alt'] ?? '';
$comity = get_field('comity', $author_id);
?> ?>
@ -19,6 +21,7 @@ $profilePictureAlt = $profilePicture['alt'] ?? '';
<h1 class="page--single-auteurs__title"><?php the_title(); ?></h1> <h1 class="page--single-auteurs__title"><?php the_title(); ?></h1>
<div class="author-card__profile-picture"> <div class="author-card__profile-picture">
<?php if ($profilePictureUrl) : ?> <?php if ($profilePictureUrl) : ?>
<img src="<?php echo $profilePictureUrl; ?>" alt="<?php echo $profilePictureAlt; ?>"> <img src="<?php echo $profilePictureUrl; ?>" alt="<?php echo $profilePictureAlt; ?>">
@ -28,7 +31,28 @@ $profilePictureAlt = $profilePicture['alt'] ?? '';
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
<div class="infos">
<p><?php echo $description; ?></p> <p><?php echo $description; ?></p>
<?php if ($comity) : ?>
<p class="page--single-auteurs__comities-list">
<span class="page--single-auteurs__comities-list-title">
membre de :
</span>
<?php foreach ($comity as $comity_value) : ?>
<?php
$comities = get_field_object('comity');
$comity_label = $comities['choices'][$comity_value] ?? null;
?>
<?php if ($comity_label) : ?>
<span class="page--single-auteurs__comity"><?php echo $comity_label ?></span>
<?php endif; ?>
<?php endforeach; ?>
</p>
<?php endif; ?>
</div>
</div> </div>
<?php <?php