feat: ajoute h-entry aux articles

This commit is contained in:
Kazhnuz 2024-11-19 20:03:40 +01:00
parent 0120f99f11
commit 0a40e487cb

View file

@ -1,36 +1,37 @@
<main id="skip"> <main id="skip">
<?php Theme::plugins('pageBegin'); ?> <?php Theme::plugins('pageBegin'); ?>
<article class="article container-article mb-1"> <article class="article container-article mb-1 h-entry">
<h1 class="page-title"><?php echo $page->title(); ?></h1> <h1 class="page-title p-name"><?php echo $page->title(); ?></h1>
<?php if ($page->coverImage()): ?>
<div class="thumbnail mb-half" aria-hidden="true">
<img alt="" src="<?php echo $page->coverImage(); ?>"/>
</div>
<?php endif ?>
<?php if (!$page->isStatic() && !$url->notFound()): ?> <?php if (!$page->isStatic() && !$url->notFound()): ?>
<div class="thumbnail mb-half" aria-hidden="true">
<?php if ($page->coverImage()) : ?>
<img alt="" src="<?php echo $page->coverImage(); ?>" class="u-photo" />
<?php else : ?>
<img alt="" src="<?php echo HTML_PATH_THEME_IMG; ?>/default-preview.png" class="u-photo" />
<?php endif ?>
</div>
<div class="flex-that mb-1"> <div class="flex-that mb-1">
<time class="author-date"><i>Le <?php echo $page->date('l j F Y à H:i') ?></i></time> <time class="author-date dt-published" datetime="<?php echo $page->date(DATE_ATOM) ?>"><i>Le <?php echo $page->date('l j F Y à H:i') ?></i></time>
<p class="align-right pr-half"><span class="btn btn-small c-secondary"> <?php echo $page->readingTime() ?> </span></p> <p class="align-right pr-half"><span class="btn btn-small c-secondary"> <?php echo $page->readingTime() ?> </span></p>
</div> </div>
<div class="description"> <div class="description p-summary">
<?php echo $page->description(); ?> <?php echo $page->description(); ?>
</div> </div>
<hr class="mb-1" /> <hr class="mb-1" />
<?php endif ?> <?php endif ?>
<div class="article-entry mb-1"> <div class="article-entry mb-1 e-content">
<?php echo $page->content(); ?> <?php echo $page->content(); ?>
</div> </div>
<?php if (!$page->isStatic() && !$url->notFound()): ?> <?php if (!$page->isStatic() && !$url->notFound()): ?>
<aside class="card card-noheader article-meta"> <aside class="card card-noheader article-meta">
<h2 class="sr-only">Métadonnées de l'article</h2>
<div class="card-body"> <div class="card-body">
<div class="author-area"> <div class="author-area p-author h-card">
<img alt="" src="<?php echo $page->user('profilePicture');?>" srcset="https://secure.gravatar.com/avatar/8a4aed71aeec9f65c9e098d81ff12638?s=240&amp;d=mm&amp;r=g 2x" class="avatar avatar-120 photo" height="120" width="120" decoding="async"> <div class="author-metadata"> <img alt="" src="<?php echo $page->user('profilePicture');?>" srcset="https://secure.gravatar.com/avatar/8a4aed71aeec9f65c9e098d81ff12638?s=240&amp;d=mm&amp;r=g 2x" class="avatar avatar-120 photo" height="120" width="120" decoding="async"> <div class="author-metadata">
<div class="author-pseudo">Écrit par <a href="https://kazhnuz.space"><?php echo $page->user('nickname'); ?></a></div> <div class="author-pseudo">Écrit par <a href="https://kazhnuz.space" class="u-url p-name"><?php echo $page->user('nickname'); ?></a></div>
<small class=""><?php echo print_r($page->user('firstName'), TRUE); ?></small> <small class="p-note"><?php echo print_r($page->user('firstName'), TRUE); ?></small>
</div> </div>
</div> </div>
@ -42,7 +43,7 @@
<h4 class="sr-only" id="title-article-taxo-categories">Catégories</h4> <h4 class="sr-only" id="title-article-taxo-categories">Catégories</h4>
<li> <li>
<a href="<?php echo $page->categoryPermalink(); ?>" class="btn btn-small c-primary"> <a href="<?php echo $page->categoryPermalink(); ?>" class="btn btn-small c-primary p-category mr-1">
<svg class="icon" alt=""><use xlink:href="#icon-folder"></use></svg> <svg class="icon" alt=""><use xlink:href="#icon-folder"></use></svg>
&nbsp;<?php echo $page->category(); ?> &nbsp;<?php echo $page->category(); ?>
</a> </a>
@ -54,7 +55,7 @@
<a href="<?php <a href="<?php
$tagObject = new Tag($x); $tagObject = new Tag($x);
echo print_r($tagObject->permalink()); echo print_r($tagObject->permalink());
?>" class="btn btn-small c-secondary"> ?>" class="btn btn-small c-secondary p-category mr-1">
<svg class="icon" alt=""><use xlink:href="#icon-tags"></use></svg> <svg class="icon" alt=""><use xlink:href="#icon-tags"></use></svg>
&nbsp;<?php echo $y; ?> &nbsp;<?php echo $y; ?>
</a> </a>