introducing component

This commit is contained in:
Antoine M 2024-04-22 12:23:35 +02:00
parent db01517f67
commit d36d6ffa98
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,21 @@
.heading-box--parcours {
@apply heading-box;
@apply text-center;
&__title {
@apply text-3xl;
@apply text-6xl;
}
&__description {
@apply font-bold text-4xl mx-auto pt-4 max-w-lg mx-auto;
line-height: 1.2;
}
&__page-icon {
@apply mx-auto w-28 absolute top-0 left-1/2;
transform: translate(-50%, -50%);
}
.cta--secondary {
@apply mt-8;
}
}

View File

@ -0,0 +1,18 @@
<?php
$title = $args['title'];
$subtitle = $args['subtitle'];
$pageIcon = $args['pageIcon'] ?? null;
$ctaSecondary = $args['ctaSecondary'] ?? false;
?>
<div class="heading-box heading-box--parcours">
<?php if ($pageIcon) : ?>
<img class="heading-box--parcours__page-icon" src="<?php echo $pageIcon['url'] ?>" alt="" />
<?php endif; ?>
<p class="heading-box__subtitle heading-box--parcours__subtitle"><?php echo $subtitle ?></p>
<h1 class="heading-box__description heading-box--parcours__title"> <?php echo $title ?></h1>
<?php if ($ctaSecondary) : ?>
<a class="cta cta--secondary cta--button cta--centered <?php echo $ctaSecondary['custom-class'] ?>" href="<?php echo $ctaSecondary['url'] ?>" target="<?php echo $ctaSecondary['target'] ?>"><?php echo $ctaSecondary['title'] ?></a>
<?php endif; ?>
</div>