Compare commits
No commits in common. "2f495878c37842025018f159daba33bd32aa7b76" and "0e733e5988f91e2f6d55747a96520ab15382ce51" have entirely different histories.
2f495878c3
...
0e733e5988
|
|
@ -4,8 +4,6 @@
|
||||||
@apply container mx-auto grid grid-cols-12 gap-12 py-12 items-start;
|
@apply container mx-auto grid grid-cols-12 gap-12 py-12 items-start;
|
||||||
grid-template-columns: 1fr 2fr;
|
grid-template-columns: 1fr 2fr;
|
||||||
&[data-active-tab='article'] {
|
&[data-active-tab='article'] {
|
||||||
#article-authors,
|
|
||||||
.article-informations,
|
|
||||||
.sidebar .search-field,
|
.sidebar .search-field,
|
||||||
.table-matieres {
|
.table-matieres {
|
||||||
@apply hidden;
|
@apply hidden;
|
||||||
|
|
@ -20,7 +18,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&[data-active-tab='references'] {
|
&[data-active-tab='references'] {
|
||||||
#article-authors,
|
|
||||||
.article-informations,
|
.article-informations,
|
||||||
.article-content,
|
.article-content,
|
||||||
.sidebar .index-panel,
|
.sidebar .index-panel,
|
||||||
|
|
@ -29,7 +26,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&[data-active-tab='table-of-contents'] {
|
&[data-active-tab='table-of-contents'] {
|
||||||
#article-authors,
|
|
||||||
.article-informations,
|
.article-informations,
|
||||||
.article-content,
|
.article-content,
|
||||||
.sidebar .index-panel {
|
.sidebar .index-panel {
|
||||||
|
|
@ -37,7 +33,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&[data-active-tab='informations'] {
|
&[data-active-tab='informations'] {
|
||||||
#article-authors,
|
|
||||||
.article-content,
|
.article-content,
|
||||||
.table-matieres,
|
.table-matieres,
|
||||||
.sidebar .index-panel {
|
.sidebar .index-panel {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
get_header();
|
get_header();
|
||||||
$revueID = get_field('related_revue', get_the_ID());
|
$revueID = get_field('related_revue', get_the_ID());
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
<div class="page--single-articles" data-revue-id="<?php echo get_the_ID(); ?>">
|
<div class="page--single-articles" data-revue-id="<?php echo get_the_ID(); ?>">
|
||||||
<?php if (have_posts()) : ?>
|
<?php if (have_posts()) : ?>
|
||||||
<?php while (have_posts()) : the_post(); ?>
|
<?php while (have_posts()) : the_post(); ?>
|
||||||
<?php get_template_part('template-parts/post-header'); ?>
|
<?php get_template_part('template-parts/post-header'); ?>
|
||||||
|
|
||||||
<?php get_template_part('template-parts/articles/article-toolbar'); ?>
|
<?php get_template_part('template-parts/articles/article-toolbar'); ?>
|
||||||
|
|
||||||
<div class="content-wrapper" data-active-tab="article">
|
<div class="content-wrapper" data-active-tab="article">
|
||||||
<aside class="sidebar">
|
<aside class="sidebar">
|
||||||
<div class="search-field">
|
<div class="search-field">
|
||||||
|
|
@ -20,10 +20,6 @@ $revueID = get_field('related_revue', get_the_ID());
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<div class="content-area">
|
<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(
|
<?php get_template_part('template-parts/articles/article-informations', null, array(
|
||||||
'revueID' => $revueID
|
'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(
|
<?php get_template_part('template-parts/revues/table-matiere-revue', null, array(
|
||||||
'revueID' => $revueID
|
'revueID' => $revueID
|
||||||
)); ?>
|
)); ?>
|
||||||
|
|
||||||
<?php get_template_part('template-parts/articles/article-content', null, array(
|
<?php get_template_part('template-parts/articles/article-content', null, array(
|
||||||
'ID' => get_the_ID()
|
'ID' => get_the_ID()
|
||||||
)); ?>
|
)); ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
|
||||||
|
|
@ -4,22 +4,17 @@ $articleContent = get_the_content($articleID);
|
||||||
$articleTitle = get_the_title($articleID);
|
$articleTitle = get_the_title($articleID);
|
||||||
$citeReference = get_field('cite_reference', $articleID);
|
$citeReference = get_field('cite_reference', $articleID);
|
||||||
$tags = get_the_terms($articleID, 'etiquettes');
|
$tags = get_the_terms($articleID, 'etiquettes');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<article class="article-content">
|
<article class="article-content">
|
||||||
<?php if ($tags) : ?>
|
<ul class="article-tags-list">
|
||||||
<ul class="article-tags-list">
|
<?php foreach ($tags as $tag) : ?>
|
||||||
<?php foreach ($tags as $tag) : ?>
|
<li class="article-tag">
|
||||||
<li class="article-tag">
|
<?php echo $tag->name; ?>
|
||||||
<?php echo $tag->name; ?>
|
</li>
|
||||||
</li>
|
<?php endforeach; ?>
|
||||||
<?php endforeach; ?>
|
</ul>
|
||||||
</ul>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php the_content(); ?>
|
<?php the_content(); ?>
|
||||||
|
|
||||||
<?php if ($citeReference) : ?>
|
<?php if ($citeReference) : ?>
|
||||||
<p id="cite-reference">
|
<p id="cite-reference">
|
||||||
<?php echo $citeReference; ?>
|
<?php echo $citeReference; ?>
|
||||||
|
|
|
||||||
|
|
@ -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(); ?>
|
|
||||||
|
|
@ -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>
|
|
||||||
19
template-parts/authors/revue-authors-list.php
Normal file
19
template-parts/authors/revue-authors-list.php
Normal 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>
|
||||||
Loading…
Reference in New Issue
Block a user