Compare commits

..

3 Commits

Author SHA1 Message Date
Nonimart
3a5d1814b1 STYLE Optimizing pullquote font size on responsive
All checks were successful
continuous-integration/drone/push Build is passing
2025-08-21 16:18:44 +02:00
Nonimart
23edc2b1f4 FEATURE Hiding authors and references if no values encoded 2025-08-21 16:18:18 +02:00
Nonimart
c897e2e656 FEATURE Optimizing post header thumbnail with an overlay 2025-08-21 16:17:43 +02:00
4 changed files with 50 additions and 12 deletions

View File

@ -1,3 +1,3 @@
.wp-block-pullquote {
@apply text-carhop-purple-500 py-6 fjalla font-bold text-4xl my-6 border-primary pl-4 border-t border-b;
@apply text-carhop-purple-500 py-6 fjalla font-bold text-2xl 2xl:text-4xl my-6 border-primary pl-4 border-t border-b;
}

View File

@ -19,10 +19,37 @@
@apply bg-white text-primary;
}
.thumbnail-wrapper {
@apply bg-red-200;
@apply relative z-20;
aspect-ratio: 4/5;
padding: 1.2rem;
&:before {
content: '';
@apply bg-white block absolute top-0 left-0 border border-carhop-green-700 w-full h-full z-10;
}
img {
/* max-height: 200px; */
@apply object-contain;
@apply w-full h-full relative z-10;
@apply object-cover;
/* width: calc(100% - 2rem);
height: calc(100% - 2rem);
margin: 0 auto; */
}
.thumbnail-overlay {
@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(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;
&:after {
content: '';
@apply bg-carhop-purple-200;
width: calc(100% - 2rem);
height: calc(100% - 2rem);
}
}
}

View File

@ -1,4 +1,11 @@
<?php
$id = get_the_ID();
$reference = get_field('references', $id);
$hasReferences = isset($reference) && is_array($reference) && count($reference) > 0;
$authors = get_field('authors', $id);
$hasAuthors = isset($authors) && is_array($authors) && count($authors) > 0;
?>
@ -8,15 +15,18 @@
<img class="icon" src="<?php echo get_stylesheet_directory_uri(); ?>/resources/img/icons/carhop-document.svg" alt="">
Article
</button>
<?php if ($hasAuthors) : ?>
<button id="tab-2" type="button" role="tab" aria-selected="false" aria-controls="tabpanel-2" tabindex="-1" data-tab="authors">
<img class="icon" src="<?php echo get_stylesheet_directory_uri(); ?>/resources/img/icons/carhop-plume.svg" alt="">
Auteur·e·s
</button>
<?php endif; ?>
<?php if ($hasReferences) : ?>
<button id="tab-3" type="button" role="tab" aria-selected="false" aria-controls="tabpanel-3" tabindex="-1" data-tab="references">
<img class="icon" src="<?php echo get_stylesheet_directory_uri(); ?>/resources/img/icons/carhop-lien.svg" alt="">
Références
</button>
<?php endif; ?>
<button id="tab-4" type="button" role="tab" aria-selected="false" aria-controls="tabpanel-4" tabindex="-1" data-tab="table-of-contents">
<img class="icon" src="<?php echo get_stylesheet_directory_uri(); ?>/resources/img/icons/carhop-plan.svg" alt="">
Table des matières

View File

@ -24,6 +24,7 @@ $citeReference = get_field('cite_reference', get_the_ID());
<?php if ($hasThumbnail) : ?>
<div class="thumbnail-wrapper">
<?php the_post_thumbnail('full', ['class' => 'thumbnail']); ?>
<div class="thumbnail-overlay"></div>
</div>
<?php endif; ?>