Compare commits

..

No commits in common. "655f9721ff587b7ce0e3d378d32ac537ddc9133c" and "2f495878c37842025018f159daba33bd32aa7b76" have entirely different histories.

8 changed files with 19 additions and 68 deletions

View File

@ -23,7 +23,7 @@
@import './components/post-card.css';
@import './components/etiquettes-grid.css';
@import './components/author-card.css';
@import './components/authors-list.css';
@import './components/revue-authors-list.css';
@import './components/article-content.css';
@import './components/content-meta.css';
@import './components/post-header.css';
@ -32,7 +32,6 @@
@import './components/footnotes-index.css';
@import './components/article-toolbar.css';
@import './components/post-card--article.css';
@import './components/authors-last-publications.css';
/* ########### PAGES ############ */
@import './pages/singles.css';

View File

@ -1,5 +0,0 @@
.authors-last-publications {
.post-card {
@apply mb-6;
}
}

View File

@ -1,12 +0,0 @@
.authors-list {
@apply mb-20;
&__title {
@apply text-4xl font-medium mb-4 uppercase;
}
&__article-title {
@apply mb-8 underline underline-offset-8 decoration-1 opacity-90;
}
.author-card {
@apply mb-8;
}
}

View File

@ -2,17 +2,4 @@
.post-card__title {
@apply text-2xl;
}
.post-card__authors {
@apply flex flex-wrap gap-8 pt-6;
li {
@apply text-lg flex items-center gap-2;
&::before {
@apply w-6 h-6 block rounded-full bg-no-repeat bg-center bg-contain;
content: '';
background-image: url('../resources/img/icons/carhop-plume.svg');
@apply filter-primary;
}
}
}
}

View File

@ -0,0 +1,5 @@
.revue-authors-list {
&__title {
@apply text-4xl font-medium mb-4 uppercase;
}
}

View File

@ -8,8 +8,7 @@ $link = get_the_permalink($ID);
$related_revue = get_field('related_revue', $ID);
$related_revue_issue_number = $related_revue ? get_field('issue_number', $related_revue) : null;
$showAuthors = $args['showAuthors'] ?? false;
$authors = get_field('authors', $ID);
?>
@ -26,22 +25,6 @@ $authors = get_field('authors', $ID);
</div>
<h3 class="post-card__title"><?php echo $title; ?></h3>
<time class="post-card__date" datetime="<?php echo $date; ?>"><?php echo $date; ?></time>
<?php if ($showAuthors && $authors) : ?>
<ul class="post-card__authors">
<?php foreach ($authors as $author) : ?>
<?php
$name = get_the_title($author);
if (!$name || empty($name)) continue;
?>
<li class="post-card__author-name">
<?php echo $name ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
<div class="issue-number">

View File

@ -8,6 +8,8 @@ if ($isArticle) {
} else {
$authors = getRevueAuthors($postId);
}
if (empty($authors)) return;
$authorsLastPosts = get_posts(array(
@ -17,23 +19,15 @@ $authorsLastPosts = get_posts(array(
'orderby' => 'date',
'order' => 'DESC',
));
if (empty($authorsLastPosts)) return;
?>
<div class="authors-last-publications">
<?php if (count($authors) <= 1) : ?>
<h3 class="title-small">Ses dernières publications</h3>
<?php else : ?>
<h3 class="title-small">Leurs dernières publications</h3>
<?php endif; ?>
<?php foreach ($authorsLastPosts as $post) : ?>
<?php get_template_part('template-parts/articles/card-article', null, array(
'ID' => $post->ID,
'showAuthors' => true,
)); ?>
<?php endforeach; ?>
</div>
<?php foreach ($authorsLastPosts as $post) : ?>
<?php get_template_part('template-parts/articles/card-article', null, array(
'ID' => $post->ID,
)); ?>
<?php endforeach; ?>
<?php wp_reset_postdata(); ?>

View File

@ -15,10 +15,10 @@ if (empty($authors)) return;
?>
<section class="authors-list">
<h3 class="authors-list__title"><?php echo $componentTitle; ?></h3>
<section class="revue-authors-list">
<h3 class="revue-authors-list__title"><?php echo $componentTitle; ?></h3>
<?php if ($articleTitle) : ?>
<p class="authors-list__article-title"><?php echo $articleTitle; ?></p>
<p class="revue-authors-list__article-title"><?php echo $articleTitle; ?></p>
<?php endif; ?>
<?php foreach ($authors as $authorID) : ?>
<?php get_template_part(