Ajout de la pagination

This commit is contained in:
Rick 2021-01-31 12:09:36 +01:00
parent fe53a22f1b
commit 97b9bce638
Signed by: Rick
GPG key ID: 9570A7DB7CB2F436
5 changed files with 47 additions and 1 deletions

View file

@ -54,10 +54,28 @@ a {
color: white; color: white;
} }
a:hover {
color: #121224;
background-color: white;
}
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
font-family: 'Open Sans', sans-serif; font-family: 'Open Sans', sans-serif;
} }
#base-pagenation {
margin-left: 20%;
margin-right: 20%;
margin-bottom: 2em;
display: flex;
justify-content: space-between;
align-self: flex-end;
}
#base-next {
text-align: right;
}
/* Parametres pour macro de prévisualisation d’articles */ /* Parametres pour macro de prévisualisation d’articles */
.pre-art * { .pre-art * {
@ -89,11 +107,21 @@ h1, h2, h3, h4, h5, h6 {
text-decoration: none; text-decoration: none;
} }
.author:hover {
color: #121224;
background-color: #6A89CC;
}
.category:link { .category:link {
color: #2DCF29; color: #2DCF29;
text-decoration: none; text-decoration: none;
} }
.category:hover {
color: #121224;
background-color: #2DCF29;
}
.continue:link { .continue:link {
background-color: #3C5DA4; background-color: #3C5DA4;
border-radius: 50px; border-radius: 50px;
@ -208,6 +236,10 @@ pre * {
margin-right: 20px; margin-right: 20px;
} }
[class^="icone-"]:hover {
color:grey;
}
.icone-mastodon:before { .icone-mastodon:before {
content: "\e900"; content: "\e900";
} }

View file

@ -17,5 +17,6 @@
</div> </div>
{{ macro.listArticles(articles_page.object_list) }} {{ macro.listArticles(articles_page.object_list) }}
{{ macro.paginationArt(articles_previous_page, articles_next_page) }}
{% endblock content %} {% endblock content %}

View file

@ -7,5 +7,5 @@
</div> </div>
{{ macro.listArticles(articles_page.object_list) }} {{ macro.listArticles(articles_page.object_list) }}
{{ macro.paginationArt(articles_previous_page, articles_next_page) }}
{% endblock content %} {% endblock content %}

View file

@ -3,5 +3,6 @@
{% block content %} {% block content %}
{{ macro.listArticles(articles_page.object_list) }} {{ macro.listArticles(articles_page.object_list) }}
{{ macro.paginationArt(articles_previous_page, articles_next_page) }}
{% endblock content %} {% endblock content %}

View file

@ -18,3 +18,15 @@
</div> </div>
{% endfor %} {% endfor %}
{%- endmacro %} {%- endmacro %}
{% macro paginationArt(prev, next) -%}
<div id="base-pagenation">
{% if prev is not none %}
<p id="base-prev"><a href="{{ SITEURL }}/{{ prev.url }}">Articles récents</a></p>
{% endif %}
{% if next is not none %}
<p id="base-next"><a href="{{ SITEURL }}/{{ next.url }}">Ancients articles</a></p>
{% endif %}
</div>
{%- endmacro %}