FEATURE Handling line return after parent tax tag
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nonimart 2025-07-11 09:19:42 +02:00
parent ad44b028a7
commit ae3c6b95b8
2 changed files with 22 additions and 3 deletions

View File

@ -1,7 +1,9 @@
.card-taxonomies {
@apply bg-white rounded-2xl p-8 border border-neutral-200 mt-6;
@apply flex flex-col gap-8 items-start;
.taxonomy-tag-parent-container {
@apply w-full;
}
&--empty {
@apply hidden;
}

View File

@ -21,7 +21,14 @@ $hasEmptyTaxos = (empty($elementsBatimentsTerms) && empty($metiersTerms)) ? 'car
</div>
<div class="taxonomy-tags card-taxonomies__taxonomy-tags">
<?php foreach ($elementsBatimentsTerms as $key => $term) : ?>
<span class="taxonomy-tag taxonomy-tag--<?php echo $term->parent === 0 ? 'parent' : 'child'; ?>"><?php echo $term->name; ?></span>
<?php if ($term->parent === 0) : ?>
<div class="taxonomy-tag-parent-container">
<span class="taxonomy-tag taxonomy-tag--parent"><?php echo $term->name; ?></span>
</div>
<?php else : ?>
<span class="taxonomy-tag taxonomy-tag--child"><?php echo $term->name; ?></span>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
@ -34,8 +41,18 @@ $hasEmptyTaxos = (empty($elementsBatimentsTerms) && empty($metiersTerms)) ? 'car
</div>
<div class="taxonomy-tags card-taxonomies__taxonomy-tags">
<?php foreach ($metiersTerms as $key => $term) : ?>
<span class="taxonomy-tag taxonomy-tag--<?php echo $term->parent === 0 ? 'parent' : 'child'; ?>"><?php echo $term->name; ?></span>
<?php if ($term->parent === 0) : ?>
<div class="taxonomy-tag-parent-container">
<span class="taxonomy-tag taxonomy-tag--parent"><?php echo $term->name; ?></span>
</div>
<?php else : ?>
<span class="taxonomy-tag taxonomy-tag--child"><?php echo $term->name; ?></span>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>