Compare commits
7 Commits
2f495878c3
...
655f9721ff
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
655f9721ff | ||
|
|
3ef493e118 | ||
|
|
15487c8891 | ||
|
|
7b8164c088 | ||
|
|
abb619207d | ||
|
|
926e5c358e | ||
|
|
d330f9bee5 |
|
|
@ -23,7 +23,7 @@
|
|||
@import './components/post-card.css';
|
||||
@import './components/etiquettes-grid.css';
|
||||
@import './components/author-card.css';
|
||||
@import './components/revue-authors-list.css';
|
||||
@import './components/authors-list.css';
|
||||
@import './components/article-content.css';
|
||||
@import './components/content-meta.css';
|
||||
@import './components/post-header.css';
|
||||
|
|
@ -32,6 +32,7 @@
|
|||
@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';
|
||||
|
|
|
|||
5
resources/css/components/authors-last-publications.css
Normal file
5
resources/css/components/authors-last-publications.css
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.authors-last-publications {
|
||||
.post-card {
|
||||
@apply mb-6;
|
||||
}
|
||||
}
|
||||
12
resources/css/components/authors-list.css
Normal file
12
resources/css/components/authors-list.css
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
.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;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,4 +2,17 @@
|
|||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
.revue-authors-list {
|
||||
&__title {
|
||||
@apply text-4xl font-medium mb-4 uppercase;
|
||||
}
|
||||
}
|
||||
|
|
@ -8,7 +8,8 @@ $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);
|
||||
|
||||
?>
|
||||
|
||||
|
|
@ -25,6 +26,22 @@ $related_revue_issue_number = $related_revue ? get_field('issue_number', $relate
|
|||
</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">
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ if ($isArticle) {
|
|||
} else {
|
||||
$authors = getRevueAuthors($postId);
|
||||
}
|
||||
|
||||
|
||||
if (empty($authors)) return;
|
||||
|
||||
$authorsLastPosts = get_posts(array(
|
||||
|
|
@ -19,15 +17,23 @@ $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,
|
||||
)); ?>
|
||||
<?php endforeach; ?>
|
||||
<?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 wp_reset_postdata(); ?>
|
||||
|
|
@ -15,10 +15,10 @@ if (empty($authors)) return;
|
|||
|
||||
|
||||
?>
|
||||
<section class="revue-authors-list">
|
||||
<h3 class="revue-authors-list__title"><?php echo $componentTitle; ?></h3>
|
||||
<section class="authors-list">
|
||||
<h3 class="authors-list__title"><?php echo $componentTitle; ?></h3>
|
||||
<?php if ($articleTitle) : ?>
|
||||
<p class="revue-authors-list__article-title"><?php echo $articleTitle; ?></p>
|
||||
<p class="authors-list__article-title"><?php echo $articleTitle; ?></p>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($authors as $authorID) : ?>
|
||||
<?php get_template_part(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user