Compare commits
No commits in common. "961111067e2d1ded23a75feb06ca08f3a1ba318c" and "f3837404d7982628b3c95e472804811fab3e9dcd" have entirely different histories.
961111067e
...
f3837404d7
|
|
@ -407,22 +407,15 @@ function get_authors_linked_to_posts(array $post_ids)
|
|||
function get_current_post_numerotation($post_id)
|
||||
{
|
||||
$current_blog_id = get_current_blog_id();
|
||||
$current_post_type = get_post_type($post_id);
|
||||
|
||||
if ($current_blog_id === 1) {
|
||||
return get_post_meta($post_id, 'post_numerotation', true);
|
||||
}
|
||||
|
||||
if ($current_blog_id === 2 && $current_post_type === 'articles') {
|
||||
if ($current_blog_id === 2) {
|
||||
$related_revue = get_field('related_revue', $post_id);
|
||||
$related_revue_issue_number = $related_revue ? get_field('issue_number', $related_revue) : null;
|
||||
|
||||
return $related_revue_issue_number;
|
||||
}
|
||||
if ($current_blog_id === 2 && $current_post_type === 'revues') {
|
||||
return get_field('issue_number', $post_id);
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
}
|
||||
|
||||
&--has-thumbnail {
|
||||
@apply grid gap-10;
|
||||
@apply grid gap-6;
|
||||
grid-template-columns: 1fr 3fr;
|
||||
}
|
||||
&.post-card--has-numerotation.post-card--has-thumbnail {
|
||||
|
|
@ -14,34 +14,13 @@
|
|||
}
|
||||
|
||||
&__thumbnail {
|
||||
@apply h-fit relative;
|
||||
@apply bg-white border border-solid border-primary p-2 h-fit grayscale hover:grayscale-0;
|
||||
transition: all 0.3s ease-out;
|
||||
img {
|
||||
@apply grayscale;
|
||||
aspect-ratio: 108/137;
|
||||
@apply w-full object-cover relative z-10 bg-white border border-solid border-primary p-2;
|
||||
@apply w-full bg-green-400 object-cover;
|
||||
height: auto;
|
||||
}
|
||||
&:hover img {
|
||||
@apply grayscale-0;
|
||||
}
|
||||
.thumbnail-overlay {
|
||||
@apply absolute z-0 rotate-3 top-2 left-2 w-full h-full border border-primary bg-white flex items-center justify-center;
|
||||
transform: translate(2px, 2px) rotate(2deg);
|
||||
/* transform: translate(12px, 12px) rotate(3deg); */
|
||||
background-image: linear-gradient(#efe8ff, #efe8ff);
|
||||
background-size: calc(100% - 12px) calc(100% - 12px);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
/* background-blend-mode: color-burn; */
|
||||
|
||||
/* background-size: calc(100% - 12px) calc(100% - 12px); */
|
||||
/* &:after {
|
||||
content: '';
|
||||
width: calc(100% - 2rem);
|
||||
height: calc(100% - 2rem);
|
||||
} */
|
||||
}
|
||||
}
|
||||
|
||||
&:hover .post-card__thumbnail {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
.post-header {
|
||||
@apply bg-primary text-white py-8 2xl:py-16 px-2 lg:px-4 md:px-8 overflow-x-hidden;
|
||||
|
||||
&:has(.post-header__inner--has-thumbnail) {
|
||||
@apply pb-16 2xl:!pb-20;
|
||||
}
|
||||
|
||||
h1.post-header__title,
|
||||
h2.post-header__title {
|
||||
@apply uppercase font-medium text-4xl md:text-5xl lg:text-5xl text-white;
|
||||
|
|
@ -68,10 +64,8 @@
|
|||
@apply text-white;
|
||||
}
|
||||
.thumbnail-wrapper {
|
||||
@apply relative z-20 h-fit w-full;
|
||||
@screen lg {
|
||||
width: calc(100% - 40px);
|
||||
}
|
||||
@apply relative z-20 h-fit;
|
||||
width: calc(100% - 40px);
|
||||
padding: 1.2rem;
|
||||
/* max-width: calc(70% - 40px);
|
||||
@apply mx-auto; */
|
||||
|
|
@ -96,9 +90,8 @@
|
|||
margin: 0 auto; */
|
||||
}
|
||||
.thumbnail-overlay {
|
||||
/* display: none !important; */
|
||||
@apply hidden lg:flex absolute z-0 rotate-3 top-6 left-6 w-full h-full border border-primary bg-white items-center justify-center;
|
||||
transform: translate(2px, 2px) rotate(3deg);
|
||||
@apply absolute z-0 rotate-3 top-6 left-6 w-full h-full border border-primary bg-white flex items-center justify-center;
|
||||
transform: translate(2px, 2px) rotate(2deg);
|
||||
/* transform: translate(12px, 12px) rotate(3deg); */
|
||||
background-image: linear-gradient(#efe8ff, #efe8ff);
|
||||
background-size: calc(100% - 12px) calc(100% - 12px);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ $link = get_the_permalink($ID);
|
|||
|
||||
$has_post_thumbnail = has_post_thumbnail($ID);
|
||||
$thumbnail_url = get_the_post_thumbnail_url($ID) ?? null;
|
||||
$has_thumbnail_overlay = $args['has_thumbnail_overlay'] ?? false;
|
||||
|
||||
$date = get_the_date('F Y', $ID);
|
||||
|
||||
|
|
@ -27,16 +26,12 @@ $publication_directors = get_field('publication_directors', $ID);
|
|||
$numerotation = get_post_meta($ID, 'post_numerotation', true);
|
||||
$tags = get_the_terms($ID, 'etiquettes');
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<a class="post-card post-card--<?php echo $current_post_type . ' ' . ($has_post_thumbnail ? 'post-card--has-thumbnail' : ''); ?> card" href="<?php echo $link; ?> ">
|
||||
<?php if ($has_post_thumbnail) : ?>
|
||||
<div class="post-card__thumbnail">
|
||||
<img src="<?php echo $thumbnail_url; ?>" alt="<?php echo $title; ?>">
|
||||
<?php if ($has_thumbnail_overlay) : ?>
|
||||
<div class="thumbnail-overlay"></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="card__inner">
|
||||
|
|
|
|||
|
|
@ -14,9 +14,6 @@ $main_author = get_field('main_author', $ID);
|
|||
$post_date_info_label = $args['post_date_info_label'] ?? 'Parution';
|
||||
$thumbnail_position = $args['thumbnail_position'] ?? 'left';
|
||||
$has_thumbnail_overlay = $args['has_thumbnail_overlay'] ?? false;
|
||||
|
||||
$likes_count = get_post_likes_count($post_id);
|
||||
$citeReference = get_field('cite_reference', $post_id);
|
||||
?>
|
||||
|
||||
<?php if ($hasNumerotation) : ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user