fix: add a link to show all articles

pull/13/head
Nicolas Doby 2023-10-09 16:59:49 +02:00
parent a6ccfaaea9
commit 11f7a7e20a
3 changed files with 10 additions and 5 deletions

View File

@ -23,4 +23,9 @@
</footer> </footer>
</article> </article>
{% endfor %} {% endfor %}
{% if showMore %}
<div>
<a href="/blog/all_articles">Voir l'ensemble des articles</a>
</div>
{% endif %}
</div> </div>

View File

@ -10,7 +10,8 @@ eleventyNavigation:
<nav> <nav>
{% include "tagslist.njk" %} {% include "tagslist.njk" %}
</nav> </nav>
{% set articlesList = collections.articles | filterDraft | head(-5) %} {% set articlesList = collections.articles | filterDraft | head(-6) %}
{% set showMore = true %}
{% include "articlesList.njk" %} {% include "articlesList.njk" %}
</div> </div>
<aside class="right-side"> <aside class="right-side">

View File

@ -308,12 +308,11 @@ figure figcaption {
/*!* Posts list *!*/ /*!* Posts list *!*/
.post-list { .post-list {
display: flex; display: grid;
flex-wrap: wrap; grid-template-columns: 1fr 1fr;
gap: 3rem; grid-gap: 2rem;
} }
.post-list-item { .post-list-item {
max-width: 410px;
padding: 2rem; padding: 2rem;
border-radius: 5px; border-radius: 5px;
box-shadow: 0 5px 10px rgba(0,0,0,0.3); box-shadow: 0 5px 10px rgba(0,0,0,0.3);