handling parcours heading boxes
This commit is contained in:
parent
b0ae50409d
commit
d0e31a9b8a
|
|
@ -1,4 +1,4 @@
|
|||
.heading-box--parcours {
|
||||
.heading-box--parcours-parent {
|
||||
@apply heading-box;
|
||||
@apply text-center;
|
||||
|
||||
|
|
@ -6,12 +6,12 @@ $ctaSecondary = $args['ctaSecondary'] ?? false;
|
|||
|
||||
?>
|
||||
|
||||
<div class="heading-box heading-box--parcours">
|
||||
<div class="heading-box heading-box--parcours-parent">
|
||||
<?php if ($pageIcon) : ?>
|
||||
<img class="heading-box--parcours__page-icon" src="<?php echo $pageIcon['url'] ?>" alt="" />
|
||||
<img class="heading-box--parcours-parent__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>
|
||||
<p class="heading-box__subtitle heading-box--parcours-parent__subtitle"><?php echo $subtitle ?></p>
|
||||
<h1 class="heading-box__description heading-box--parcours-parent__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; ?>
|
||||
33
template-components/heading-box--parcours-single.css
Normal file
33
template-components/heading-box--parcours-single.css
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
.heading-box--parcours-single {
|
||||
@apply mt-8
|
||||
py-8
|
||||
lg:py-16
|
||||
flex
|
||||
relative
|
||||
flex-nowrap
|
||||
items-center
|
||||
justify-between;
|
||||
.post-infos-capsule {
|
||||
@apply mt-8;
|
||||
}
|
||||
&__type {
|
||||
@apply !text-xl !my-0 !tracking-widest font-bold;
|
||||
}
|
||||
&__title {
|
||||
@apply !text-4xl font-bold max-w-3xl;
|
||||
}
|
||||
|
||||
&__page-icon {
|
||||
@apply w-32 h-32 object-contain
|
||||
rounded-xl
|
||||
hidden
|
||||
lg:block;
|
||||
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&__content {
|
||||
flex-shrink: 1;
|
||||
flex-grow: 2;
|
||||
}
|
||||
}
|
||||
28
template-components/heading-box--parcours-single.php
Normal file
28
template-components/heading-box--parcours-single.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
$title = $args['title'];
|
||||
$description = $args['description'] ?? null;
|
||||
$parent_title = $args['parent_title'] ?? null;
|
||||
$page_icon = $args['page_icon'] ?? null;
|
||||
$published = $args['published'] ?? null;
|
||||
$subtitle = $args['subtitle'] ?? null;
|
||||
?>
|
||||
|
||||
<div class="heading-box heading-box--parcours-single ">
|
||||
|
||||
<div class="heading-box--parcours-single__content">
|
||||
<?php if ($parent_title) : ?>
|
||||
<p class="heading-box__subtitle heading-box--parcours-single__type"><?php echo $parent_title ?></p>
|
||||
<?php endif; ?>
|
||||
<h1 class="heading-box__title heading-box--parcours-single__title"> <?php echo $title ?></h1>
|
||||
|
||||
<?php
|
||||
get_template_part("template-components/post-infos-capsule", null, array(
|
||||
"postID" => get_the_ID(),
|
||||
"published" => $published
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
<?php if ($page_icon) : ?>
|
||||
<img class="heading-box--parcours-single__page-icon" src="<?php echo $page_icon['url'] ?>" alt="">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user