introducing component
This commit is contained in:
parent
db01517f67
commit
d36d6ffa98
21
template-components/heading-box--parcours.css
Normal file
21
template-components/heading-box--parcours.css
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
18
template-components/heading-box--parcours.php
Normal file
18
template-components/heading-box--parcours.php
Normal 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>
|
||||||
Loading…
Reference in New Issue
Block a user