50 lines
2 KiB
PHP
50 lines
2 KiB
PHP
<?php
|
|
/* Article de blog */
|
|
get_header();
|
|
the_post();
|
|
|
|
$next = get_next_post();
|
|
if (!$next) $next = get_previous_post();
|
|
?>
|
|
|
|
<article class="case">
|
|
<?php if (has_post_thumbnail()) : ?>
|
|
<div class="case-hero">
|
|
<?php the_post_thumbnail('full', array('class' => 'case-hero-img')); ?>
|
|
<div class="case-hero-fade"></div>
|
|
<div class="case-hero-text">
|
|
<div class="kicker rise rise-1">JOURNAL TECHNIQUE · <?php echo esc_html(strtoupper(get_the_date('j M Y'))); ?></div>
|
|
<h1 class="case-title case-title--post rise rise-2"><?php the_title(); ?></h1>
|
|
</div>
|
|
</div>
|
|
<?php else : ?>
|
|
<div class="page-wrap page-wrap--tight">
|
|
<div class="kicker">JOURNAL TECHNIQUE · <?php echo esc_html(strtoupper(get_the_date('j M Y'))); ?></div>
|
|
<h1 class="page-title" data-reveal><?php the_title(); ?></h1>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="case-cols">
|
|
<aside class="case-meta article__meta">
|
|
<div><div class="case-meta-k">PUBLIÉ</div><div><?php echo esc_html(get_the_date('j F Y')); ?></div></div>
|
|
<?php $cats = get_the_category(); if ($cats) : ?>
|
|
<div><div class="case-meta-k">CATÉGORIE</div><div class="lime"><?php echo esc_html(strtoupper($cats[0]->name)); ?></div></div>
|
|
<?php endif; ?>
|
|
</aside>
|
|
<div class="case-body">
|
|
<div class="prose"><?php the_content(); ?></div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if ($next) : ?>
|
|
<a class="case-next" href="<?php echo esc_url(get_permalink($next)); ?>" data-cursor-label="LIRE ↗" data-wipe="LECTURE">
|
|
<div>
|
|
<div class="case-next-k mono">ARTICLE SUIVANT</div>
|
|
<div class="case-next-name"><?php echo esc_html(get_the_title($next)); ?></div>
|
|
</div>
|
|
<div class="case-next-arrow mono">→</div>
|
|
</a>
|
|
<?php endif; ?>
|
|
</article>
|
|
|
|
<?php get_footer(); ?>
|