Compare commits

..

7 commits

Author SHA1 Message Date
Kazhnuz
1c30bfbd5a feat: ajoute rel="tag" et rel="directory"
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-23 21:29:32 +01:00
Kazhnuz
6145556ea2 feat: ajout rel="licence" 2024-11-23 21:27:53 +01:00
Kazhnuz
0a40e487cb feat: ajoute h-entry aux articles 2024-11-19 20:03:40 +01:00
Kazhnuz
0120f99f11 fix: nouveau layout QUE pour les articles 2024-11-19 19:57:07 +01:00
Kazhnuz
64700b2cf0 feat: nouveau layout articles 2024-11-19 19:56:34 +01:00
Kazhnuz
e0eb5396d0 fix: fix hr 2024-11-19 19:50:27 +01:00
Kazhnuz
34fba16430 feat: ajout h-feed 2024-11-19 19:40:57 +01:00
10 changed files with 159 additions and 126 deletions

View file

@ -208,7 +208,7 @@ h6, .title-6 {
font-weight: 800; }
hr {
border: 0px solid rgba(1, 1, 1, 0.15);
border: 1px solid rgba(1, 1, 1, 0.15);
border-bottom: 1px;
margin: 1.5em;
box-sizing: content-box;
@ -1304,7 +1304,8 @@ footer {
font-size: 0.8rem;
text-decoration: none;
padding: 0.5333333333rem;
border-radius: 8px; }
border-radius: 8px;
display: block; }
.preview-thumbnail {
display: block;
@ -1381,6 +1382,11 @@ footer {
border-radius: 8px;
object-fit: cover; }
.description {
opacity: 0.8;
font-style: italic;
font-size: .95rem; }
.article-meta .author-area {
display: flex;
align-items: center;

View file

@ -1,39 +1,41 @@
<main>
<h1 class="page-title" id="title-featured">
<main class="h-feed">
<h1 class="page-title p-name" id="title-featured">
<svg class="icon" alt=""><use xlink:href="#icon-folder"></use></svg>
<?php
$category = new Category($url->slug());
echo $category->name();
?>
</h1>
<div class="previews-section preview-list">
<div class="previews-section preview-grid">
<?php foreach ($content as $page) : ?>
<?php if ($page->type() != "sticky") : ?>
<a href="<?php echo $page->permalink(); ?>" class="preview">
<div class="preview-thumbnail">
<?php if ($page->coverImage()) : ?>
<img alt="" src="<?php echo $page->thumbCoverImage(); ?>" />
<?php else : ?>
<img alt="" src="<?php echo HTML_PATH_THEME_IMG; ?>/default-preview.png" />
<?php endif ?>
</div>
<div class="preview-text">
<h2><?php echo $page->title(); ?></h2>
<div class="h-entry">
<a href="<?php echo $page->permalink(); ?>" class="preview u-url">
<div class="preview-thumbnail">
<?php if ($page->thumbCoverImage()) : ?>
<img alt="" src="<?php echo $page->thumbCoverImage(); ?>" 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="preview-text">
<h2 class="p-name"><?php echo $page->title(); ?></h2>
<div class="flex-that">
<div>
<span class='badge c-secondary small-text m-0'><?php echo $page->category(); ?></span>
<div class="flex-that">
<div>
<span class='badge c-secondary small-text m-0 p-category'><?php echo $page->category(); ?></span>
</div>
<div>
<time class="dt-published" datetime="<?php echo $page->date(DATE_ATOM) ?>" ><span class="badge c-secondary small-text m-0"><?php echo $page->date('d/m/Y') ?></span></time>
</div>
</div>
<div class="preview-excerpt p-summary"><?php echo $page->description(); ?></div>
</div>
<div>
<time><span class="badge c-secondary small-text m-0"><?php echo $page->date('d/m/Y') ?></span></time>
</div>
</div>
<div class="preview-excerpt"><?php echo $page->description(); ?></div>
</a>
</div>
</a>
<?php endif ?>
<?php endforeach ?>
</div>
<?php endif ?>
<?php endforeach ?>
</div>
<?php if (Paginator::numberOfPages() > 1) : ?>
<nav class="paginator mb-2 mt-1">

View file

@ -22,7 +22,7 @@
</nav>
<div class="container columns">
<section class="col-12 col-md-4">
<p>Les contenus sont diffusé sous licence Creative Common Attribution - Partage à l'Identique 4.0 - hors mention contraire.</p>
<p>Les contenus sont diffusé sous licence <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr" rel="licence">Creative Common Attribution - Partage à l'Identique 4.0</a> hors mention contraire.</p>
<p>Ces licences vous autorise à partager et copier mes travaux, tant que vous me citiez en source, et que vous autorisez la même chose pour les travaux qui en seraient dérivés. N'hésitez pas à partager ! ❤️</p>
</section>

View file

@ -1,22 +1,23 @@
<main id="skip" class="fullwidth">
<?php Theme::plugins('pageBegin'); ?>
<?php if (Paginator::currentPage() == 1) : ?>
<section aria-labelledby="title-featured">
<section aria-labelledby="title-featured" class="h-feed">
<h1 class="page-title" id="title-featured">
<svg class="icon icon-star" viewBox="0 0 30 32"><path d="M29.714 11.554c0 0.321-0.232 0.625-0.464 0.857l-6.482 6.321 1.536 8.929c0.018 0.125 0.018 0.232 0.018 0.357 0 0.464-0.214 0.893-0.732 0.893-0.25 0-0.5-0.089-0.714-0.214l-8.018-4.214-8.018 4.214c-0.232 0.125-0.464 0.214-0.714 0.214-0.518 0-0.75-0.429-0.75-0.893 0-0.125 0.018-0.232 0.036-0.357l1.536-8.929-6.5-6.321c-0.214-0.232-0.446-0.536-0.446-0.857 0-0.536 0.554-0.75 1-0.821l8.964-1.304 4.018-8.125c0.161-0.339 0.464-0.732 0.875-0.732s0.714 0.393 0.875 0.732l4.018 8.125 8.964 1.304c0.429 0.071 1 0.286 1 0.821z"></path></svg>
À la une
<span class="p-name">À la une</span>
</h1>
<div id="featured-articles">
<?php foreach ($content as $page) : ?>
<?php if ($page->type() == "sticky") : ?>
<article class="preview-featured">
<a href="<?php echo $page->permalink(); ?>" class="preview-link">
<article class="preview-featured h-entry">
<a href="<?php echo $page->permalink(); ?>" class="preview-link u-url">
<img src='<?php echo ($page->thumbCoverImage() ? $page->thumbCoverImage() : HTML_PATH_THEME_IMG . "/default-preview.png") ?>' class="d-none u-photo">
<div class="preview-item" style="background-image:url('<?php echo ($page->thumbCoverImage() ? $page->thumbCoverImage() : HTML_PATH_THEME_IMG . "/default-preview.png") ?>');">
<div class="preview-overlay">
<div class="preview-categories">
<span class='badge c-secondary'><?php echo $page->category(); ?></span>
<span class='badge c-secondary p-category'><?php echo $page->category(); ?></span>
</div>
<h2 class="preview-title"><?php echo $page->title(); ?></h2>
<h2 class="preview-title p-name"><?php echo $page->title(); ?></h2>
</div>
</div>
</a>
@ -26,37 +27,39 @@
</div>
</section>
<?php endif ?>
<section aria-labelledby="title-publications">
<h1 class="page-title" id="title-publications"><svg class="icon icon-newspaper-o" alt="" viewBox="0 0 37 30"><path d="M18.286 9.143h-6.857v6.857h6.857v-6.857zM20.571 20.571v2.286h-11.429v-2.286h11.429zM20.571 6.857v11.429h-11.429v-11.429h11.429zM32 20.571v2.286h-9.143v-2.286h9.143zM32 16v2.286h-9.143v-2.286h9.143zM32 11.429v2.286h-9.143v-2.286h9.143zM32 6.857v2.286h-9.143v-2.286h9.143zM4.571 24v-17.143h-2.286v17.143c0 0.625 0.518 1.143 1.143 1.143s1.143-0.518 1.143-1.143zM34.286 24v-19.429h-27.429v19.429c0 0.393-0.071 0.786-0.196 1.143h26.482c0.625 0 1.143-0.518 1.143-1.143zM36.571 2.286v21.714c0 1.893-1.536 3.429-3.429 3.429h-29.714c-1.893 0-3.429-1.536-3.429-3.429v-19.429h4.571v-2.286h32z"></path></svg> Publications</h1>
<section aria-labelledby="title-publications" class="h-feed">
<h1 class="page-title" id="title-publications"><svg class="icon icon-newspaper-o" alt="" viewBox="0 0 37 30"><path d="M18.286 9.143h-6.857v6.857h6.857v-6.857zM20.571 20.571v2.286h-11.429v-2.286h11.429zM20.571 6.857v11.429h-11.429v-11.429h11.429zM32 20.571v2.286h-9.143v-2.286h9.143zM32 16v2.286h-9.143v-2.286h9.143zM32 11.429v2.286h-9.143v-2.286h9.143zM32 6.857v2.286h-9.143v-2.286h9.143zM4.571 24v-17.143h-2.286v17.143c0 0.625 0.518 1.143 1.143 1.143s1.143-0.518 1.143-1.143zM34.286 24v-19.429h-27.429v19.429c0 0.393-0.071 0.786-0.196 1.143h26.482c0.625 0 1.143-0.518 1.143-1.143zM36.571 2.286v21.714c0 1.893-1.536 3.429-3.429 3.429h-29.714c-1.893 0-3.429-1.536-3.429-3.429v-19.429h4.571v-2.286h32z"></path></svg> <span class="p-name">Derniers articles</span></h1>
<div class="previews-section preview-grid">
<?php foreach ($content as $page) : ?>
<?php if ($page->type() != "sticky") : ?>
<a href="<?php echo $page->permalink(); ?>" class="preview">
<div class="preview-thumbnail">
<?php if ($page->thumbCoverImage()) : ?>
<img alt="" src="<?php echo $page->thumbCoverImage(); ?>" />
<?php else : ?>
<img alt="" src="<?php echo HTML_PATH_THEME_IMG; ?>/default-preview.png" />
<?php endif ?>
</div>
<div class="preview-text">
<h2><?php echo $page->title(); ?></h2>
<div class="h-entry">
<a href="<?php echo $page->permalink(); ?>" class="preview u-url">
<div class="preview-thumbnail">
<?php if ($page->thumbCoverImage()) : ?>
<img alt="" src="<?php echo $page->thumbCoverImage(); ?>" 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="preview-text">
<h2 class="p-name"><?php echo $page->title(); ?></h2>
<div class="flex-that">
<div>
<span class='badge c-secondary small-text m-0'><?php echo $page->category(); ?></span>
<div class="flex-that">
<div>
<span class='badge c-secondary small-text m-0 p-category'><?php echo $page->category(); ?></span>
</div>
<div>
<time class="dt-published" datetime="<?php echo $page->date(DATE_ATOM) ?>" ><span class="badge c-secondary small-text m-0"><?php echo $page->date('d/m/Y') ?></span></time>
</div>
</div>
<div class="preview-excerpt p-summary"><?php echo $page->description(); ?></div>
</div>
<div>
<time><span class="badge c-secondary small-text m-0"><?php echo $page->date('d/m/Y') ?></span></time>
</div>
</div>
<div class="preview-excerpt"><?php echo $page->description(); ?></div>
</a>
</div>
</a>
<?php endif ?>
<?php endforeach ?>
</div>
<?php endif ?>
<?php endforeach ?>
</div>
<!-- Pagination -->
<?php if (Paginator::numberOfPages() > 1) : ?>

View file

@ -1,27 +1,37 @@
<main id="skip">
<?php Theme::plugins('pageBegin'); ?>
<article class="article container-article mb-1">
<h1 class="page-title"><?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 ?>
<article class="article container-article mb-1 h-entry">
<h1 class="page-title p-name"><?php echo $page->title(); ?></h1>
<?php if (!$page->isStatic() && !$url->notFound()): ?>
<p class="align-right pr-half"><span class="btn btn-small c-secondary"> <?php echo $page->readingTime() ?> </span></p>
<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">
<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>
</div>
<div class="description p-summary">
<?php echo $page->description(); ?>
</div>
<hr class="mb-1" />
<?php endif ?>
<div class="article-entry mb-1">
<div class="article-entry mb-1 e-content">
<?php echo $page->content(); ?>
</div>
<?php if (!$page->isStatic() && !$url->notFound()): ?>
<aside class="card card-noheader article-meta">
<h2 class="sr-only">Métadonnées de l'article</h2>
<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">
<div class="author-pseudo">Écrit par <a href="https://kazhnuz.space"><?php echo $page->user('nickname'); ?></a></div>
<small class="author-date">Le <?php echo $page->date('l j F Y à H:i') ?></small>
<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="p-note"><?php echo print_r($page->user('firstName'), TRUE); ?></small>
</div>
</div>
@ -31,9 +41,9 @@
<h3 class="sr-only">Tags et catégories</h3>
<ul class="nolist" aria-labelledby="title-article-taxo-categories">
<h4 class="sr-only" id="title-article-taxo-categories">Catégories</h4>
<p class="mb-0 pb-half"><?php echo print_r($page->user('firstName'), TRUE); ?></p>
<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" rel="directory">
<svg class="icon" alt=""><use xlink:href="#icon-folder"></use></svg>
&nbsp;<?php echo $page->category(); ?>
</a>
@ -45,7 +55,8 @@
<a href="<?php
$tagObject = new Tag($x);
echo print_r($tagObject->permalink());
?>" class="btn btn-small c-secondary">
?>" class="btn btn-small c-secondary p-category mr-1"
rel="tag directory">
<svg class="icon" alt=""><use xlink:href="#icon-tags"></use></svg>
&nbsp;<?php echo $y; ?>
</a>

View file

@ -1,38 +1,40 @@
<main>
<h1 class="page-title" id="title-featured">
<main class="h-feed">
<h1 class="page-title p-name" id="title-featured">
<?php
$title = explode("/", $url->slug());
echo "Recherche pour « " . $title[1] . " »";
?>
</h1>
<div class="previews-section preview-list">
<div class="previews-section preview-grid">
<?php foreach ($content as $page) : ?>
<?php if ($page->type() != "sticky") : ?>
<a href="<?php echo $page->permalink(); ?>" class="preview">
<div class="preview-thumbnail">
<?php if ($page->coverImage()) : ?>
<img alt="" src="<?php echo $page->thumbCoverImage(); ?>" />
<?php else : ?>
<img alt="" src="<?php echo HTML_PATH_THEME_IMG; ?>/default-preview.png" />
<?php endif ?>
</div>
<div class="preview-text">
<h2><?php echo $page->title(); ?></h2>
<div class="h-entry">
<a href="<?php echo $page->permalink(); ?>" class="preview u-url">
<div class="preview-thumbnail">
<?php if ($page->thumbCoverImage()) : ?>
<img alt="" src="<?php echo $page->thumbCoverImage(); ?>" 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="preview-text">
<h2 class="p-name"><?php echo $page->title(); ?></h2>
<div class="flex-that">
<div>
<span class='badge c-secondary small-text m-0'><?php echo $page->category(); ?></span>
<div class="flex-that">
<div>
<span class='badge c-secondary small-text m-0 p-category'><?php echo $page->category(); ?></span>
</div>
<div>
<time class="dt-published" datetime="<?php echo $page->date(DATE_ATOM) ?>" ><span class="badge c-secondary small-text m-0"><?php echo $page->date('d/m/Y') ?></span></time>
</div>
</div>
<div class="preview-excerpt p-summary"><?php echo $page->description(); ?></div>
</div>
<div>
<time><span class="badge c-secondary small-text m-0"><?php echo $page->date('d/m/Y') ?></span></time>
</div>
</div>
<div class="preview-excerpt"><?php echo $page->description(); ?></div>
</a>
</div>
</a>
<?php endif ?>
<?php endforeach ?>
</div>
<?php endif ?>
<?php endforeach ?>
</div>
<?php if (Paginator::numberOfPages() > 1) : ?>
<nav class="paginator mb-2 mt-1">

View file

@ -1,39 +1,41 @@
<main>
<h1 class="page-title" id="title-featured">
<main class="h-feed">
<h1 class="page-title p-name" id="title-featured">
<svg class="icon" alt=""><use xlink:href="#icon-tags"></use></svg>
<?php
$tag = new Tag($url->slug());
echo $tag->name();
echo "Article avec le tag « " . $tag->name() . " »";
?>
</h1>
<div class="previews-section preview-list">
<div class="previews-section preview-grid">
<?php foreach ($content as $page) : ?>
<?php if ($page->type() != "sticky") : ?>
<a href="<?php echo $page->permalink(); ?>" class="preview">
<div class="preview-thumbnail">
<?php if ($page->coverImage()) : ?>
<img alt="" src="<?php echo $page->thumbCoverImage(); ?>" />
<?php else : ?>
<img alt="" src="<?php echo HTML_PATH_THEME_IMG; ?>/default-preview.png" />
<?php endif ?>
</div>
<div class="preview-text">
<h2><?php echo $page->title(); ?></h2>
<div class="h-entry">
<a href="<?php echo $page->permalink(); ?>" class="preview u-url">
<div class="preview-thumbnail">
<?php if ($page->thumbCoverImage()) : ?>
<img alt="" src="<?php echo $page->thumbCoverImage(); ?>" 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="preview-text">
<h2 class="p-name"><?php echo $page->title(); ?></h2>
<div class="flex-that">
<div>
<span class='badge c-secondary small-text m-0'><?php echo $page->category(); ?></span>
<div class="flex-that">
<div>
<span class='badge c-secondary small-text m-0 p-category'><?php echo $page->category(); ?></span>
</div>
<div>
<time class="dt-published" datetime="<?php echo $page->date(DATE_ATOM) ?>" ><span class="badge c-secondary small-text m-0"><?php echo $page->date('d/m/Y') ?></span></time>
</div>
</div>
<div class="preview-excerpt p-summary"><?php echo $page->description(); ?></div>
</div>
<div>
<time><span class="badge c-secondary small-text m-0"><?php echo $page->date('d/m/Y') ?></span></time>
</div>
</div>
<div class="preview-excerpt"><?php echo $page->description(); ?></div>
</a>
</div>
</a>
<?php endif ?>
<?php endforeach ?>
</div>
<?php endif ?>
<?php endforeach ?>
</div>
<?php if (Paginator::numberOfPages() > 1) : ?>
<nav class="paginator mb-2 mt-1">

View file

@ -153,7 +153,7 @@ h6, .title-6 {
}
hr {
border: 0px solid rgba(1, 1, 1, 0.15);
border: 1px solid rgba(1, 1, 1, 0.15);
border-bottom: 1px;
margin: 1.5em;
box-sizing: content-box;

View file

@ -13,6 +13,12 @@
}
}
.description {
opacity: 0.8;
font-style: italic;
font-size: .95rem;
}
.article-meta {
.author-area {
display: flex;

View file

@ -56,6 +56,7 @@
text-decoration: none;
padding: $lineheight / 3;
border-radius: $card-radius;
display: block;
}
.preview-thumbnail {