refactoring heading box

This commit is contained in:
Antoine M 2023-11-09 14:28:22 +01:00
parent 8077f524a3
commit 83c131d7c1
2 changed files with 0 additions and 74 deletions

View File

@ -1,42 +0,0 @@
.news-heading-box {
@apply container
bg-primary
text-white
mx-auto
py-12
px-8
rounded-3xl
mt-8
relative
flex
flex-nowrap
justify-between;
.post-infos-capsule {
@apply mt-8;
}
&__type {
@apply uppercase font-medium text-xl tracking-widest;
}
&__title {
@apply font-bold text-4xl pt-4 max-w-xl;
line-height: 1.2;
}
&__page-icon {
@apply mx-auto w-28 absolute top-0 left-1/2;
transform: translate(-50%, -50%);
}
&__content {
flex-shrink: 1;
flex-grow: 2;
}
&__thumbnail {
@apply w-80 h-56 object-cover
rounded-3xl
hidden
lg:block;
flex-shrink: 2;
}
}

View File

@ -1,32 +0,0 @@
<?php
$title = $args['title'];
$description = $args['description'];
$news_type = $args['news_type'] ?? null;
$thumbnail = $args['thumbnail'] ?? null;
$published = $args['published'] ?? null;
?>
<div class="news-heading-box ">
<div class="news-heading-box__content">
<?php if ($news_type) : ?>
<h2 class="news-heading-box__type"><?php echo $news_type[0]->name ?></h2>
<?php endif; ?>
<h1 class="news-heading-box__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 ($thumbnail) echo $thumbnail ?>
<!-- <img class="news-heading-box__thumbnail" src="<?php echo $thumbnail ?>" alt=""> -->
</div>