FEATURE Introducing sidebar markup and components
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nonimart 2025-06-23 16:10:17 +02:00
parent 7cb06d46d8
commit b62122eb59

View File

@ -1,10 +1,10 @@
<?php get_header(); ?> <?php get_header(); ?>
<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'); ?>
<div class="content-wrapper"> <div class="content-wrapper">
<!-- <div class="top-toolbar"> <!-- <div class="top-toolbar">
<div role="tablist" aria-labelledby="tablist-1" class="tablist"> <div role="tablist" aria-labelledby="tablist-1" class="tablist">
<button id="tab-1" type="button" role="tab" aria-selected="true" aria-controls="tabpanel-1"> <button id="tab-1" type="button" role="tab" aria-selected="true" aria-controls="tabpanel-1">
@ -24,59 +24,65 @@
</button> </button>
</div> </div>
</div> --> </div> -->
<aside class="sidebar"> <aside class="sidebar">
<div class="search-field"> <div class="search-field">
<input type="text" placeholder="Rechercher"> <input type="text" placeholder="Rechercher">
</div> </div>
<?php
$tags = get_terms(array( <div class="index-panel">
'taxonomy' => 'etiquettes', <div class="index-panel__header">
)); <button class="focus" data-index="sommaire" aria-selected="true" aria-controls="sommaire-index">
?> Résumé
<?php if ($tags) : ?> </button>
<div class="tags"> <button class="focus" data-index="footnotes" aria-selected="false" aria-controls="footnotes-index">
<h3 class="tags__title">Tags</h3> Notes de bas de page
<ul class="tags-list"> </button>
<?php foreach ($tags as $tag) : ?> </div>
<li>
<a class="article-tag" href="<?php echo get_term_link($tag); ?>"><?php echo $tag->name; ?></a> <div class="index-panel__content">
</li> <ul data-index="sommaire" class="sommaire-index" aria-hidden="false">
<?php endforeach; ?> <?php
<?php endif; ?> $sommaire = build_sommaire_from_content(get_the_ID());
</ul>
</div> foreach ($sommaire as $chapter) {
echo '<li><a href="#' . $chapter['anchor'] . '">' . $chapter['title'] . '</a></li>';
</div> }
?>
<div class="content-area"> </ul>
<ul data-index="footnotes" class="footnotes-index" aria-hidden="true">
<?php get_template_part('template-parts/articles/article-content', null, array( <?php
'ID' => get_the_ID() $footnotes = build_footnotes_index_from_content(get_the_content());
)); ?> ?>
<?php foreach ($footnotes as $footnote) : ?>
<li><a href="#footnote-<?php echo $footnote['anchorID']; ?>" class="footnote-reference-item"><?php echo $footnote['content']; ?></a></li>
<?php endforeach; ?>
</div>
</div>
</div>
</div> </aside>
<!-- #### EXPLORE TAGS #### --> <div class="content-area">
<?php get_template_part('template-parts/components/explore-tags'); ?> <?php get_template_part('template-parts/articles/article-content', null, array(
'ID' => get_the_ID()
<!-- #### INFOLETTRE #### --> )); ?>
<?php get_template_part('template-parts/components/subscribe-infolettre'); ?> </div>
</div> </div>
</div> <!-- #### EXPLORE TAGS #### -->
<?php get_template_part('template-parts/components/explore-tags'); ?>
</article>
<!-- #### INFOLETTRE #### -->
<?php get_template_part('template-parts/components/subscribe-infolettre'); ?>
<?php endwhile; ?>
<?php endif; ?> <?php endwhile; ?>
</div> <?php endif; ?>
<?php </div>
get_footer();
</article>
</div>
<?php
get_footer();