Compare commits

..

No commits in common. "2f495878c37842025018f159daba33bd32aa7b76" and "0e733e5988f91e2f6d55747a96520ab15382ce51" have entirely different histories.

7 changed files with 28 additions and 106 deletions

View File

@ -4,8 +4,6 @@
@apply container mx-auto grid grid-cols-12 gap-12 py-12 items-start;
grid-template-columns: 1fr 2fr;
&[data-active-tab='article'] {
#article-authors,
.article-informations,
.sidebar .search-field,
.table-matieres {
@apply hidden;
@ -20,7 +18,6 @@
}
}
&[data-active-tab='references'] {
#article-authors,
.article-informations,
.article-content,
.sidebar .index-panel,
@ -29,7 +26,6 @@
}
}
&[data-active-tab='table-of-contents'] {
#article-authors,
.article-informations,
.article-content,
.sidebar .index-panel {
@ -37,7 +33,6 @@
}
}
&[data-active-tab='informations'] {
#article-authors,
.article-content,
.table-matieres,
.sidebar .index-panel {

View File

@ -1,15 +1,15 @@
<?php
get_header();
$revueID = get_field('related_revue', get_the_ID());
?>
?>
<div class="page--single-articles" data-revue-id="<?php echo get_the_ID(); ?>">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('template-parts/post-header'); ?>
<?php get_template_part('template-parts/articles/article-toolbar'); ?>
<div class="content-wrapper" data-active-tab="article">
<aside class="sidebar">
<div class="search-field">
@ -20,10 +20,6 @@ $revueID = get_field('related_revue', get_the_ID());
</aside>
<div class="content-area">
<?php get_template_part('template-parts/articles/article-authors', null, array(
'postId' => get_the_ID()
)); ?>
<?php get_template_part('template-parts/articles/article-informations', null, array(
'revueID' => $revueID
)); ?>
@ -31,14 +27,12 @@ $revueID = get_field('related_revue', get_the_ID());
<?php get_template_part('template-parts/revues/table-matiere-revue', null, array(
'revueID' => $revueID
)); ?>
<?php get_template_part('template-parts/articles/article-content', null, array(
'ID' => get_the_ID()
)); ?>
</div>
</div>

View File

@ -1,16 +0,0 @@
<?php
?>
<div id="article-authors" class="article-authors">
<?php get_template_part('template-parts/authors/authors-list', null, array(
'postId' => get_the_ID()
)); ?>
<?php get_template_part('template-parts/authors/authors-last-publications', null, array(
'postId' => get_the_ID()
)); ?>
</div>

View File

@ -4,22 +4,17 @@ $articleContent = get_the_content($articleID);
$articleTitle = get_the_title($articleID);
$citeReference = get_field('cite_reference', $articleID);
$tags = get_the_terms($articleID, 'etiquettes');
?>
<article class="article-content">
<?php if ($tags) : ?>
<ul class="article-tags-list">
<?php foreach ($tags as $tag) : ?>
<li class="article-tag">
<?php echo $tag->name; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<ul class="article-tags-list">
<?php foreach ($tags as $tag) : ?>
<li class="article-tag">
<?php echo $tag->name; ?>
</li>
<?php endforeach; ?>
</ul>
<?php the_content(); ?>
<?php if ($citeReference) : ?>
<p id="cite-reference">
<?php echo $citeReference; ?>

View File

@ -1,33 +0,0 @@
<?php
$postId = $args['postId'];
$authors = [];
$isArticle = is_singular('articles');
if ($isArticle) {
$authors = get_field('authors', $postId);
} else {
$authors = getRevueAuthors($postId);
}
if (empty($authors)) return;
$authorsLastPosts = get_posts(array(
'post_type' => $isArticle ? 'articles' : 'revues',
'author' => $authors,
'posts_per_page' => 6,
'orderby' => 'date',
'order' => 'DESC',
));
?>
<?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

@ -1,32 +0,0 @@
<?php
$postId = $args['postId'];
$isArticle = is_singular('articles');
$componentTitle = $isArticle ? 'Auteur·e·s de l\'article' : 'Auteur·e·s de la revue';
$articleTitle = get_the_title($postId);
$authors = [];
if ($isArticle) {
$authors = get_field('authors', $postId);
} else {
$authors = getRevueAuthors($postId);
}
if (empty($authors)) return;
?>
<section class="revue-authors-list">
<h3 class="revue-authors-list__title"><?php echo $componentTitle; ?></h3>
<?php if ($articleTitle) : ?>
<p class="revue-authors-list__article-title"><?php echo $articleTitle; ?></p>
<?php endif; ?>
<?php foreach ($authors as $authorID) : ?>
<?php get_template_part(
'template-parts/authors/card-author',
null,
array(
'ID' => $authorID,
)
); ?>
<?php endforeach; ?>
</section>

View File

@ -0,0 +1,19 @@
<?php
$revueID = $args['revueID'];
$authors = getRevueAuthors($revueID);
?>
<section class="revue-authors-list">
<h3 class="revue-authors-list__title">Auteur·e·s de la revue</h3>
<?php foreach ($authors as $authorID) : ?>
<?php get_template_part(
'template-parts/authors/card-author',
null,
array(
'ID' => $authorID,
)
); ?>
<?php endforeach; ?>
</section>