From 8ba23339283089444a63eba3604cbd63cba40ad0 Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro <aperez@igalia.com> Date: Tue, 6 Feb 2024 01:24:07 +0200 Subject: [PATCH] Add pagination to security page --- security.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/security.md b/security.md index 74c01840f..a758332cf 100644 --- a/security.md +++ b/security.md @@ -6,6 +6,7 @@ pagination: data: collections.WSA size: 50 alias: posts + reverse: true --- <style> main section ol { @@ -88,7 +89,7 @@ main section ol > li:first-child a[href]:is(:hover, :focus) { <section> <ol reversed> -{%- for post in posts reversed -%} +{%- for post in posts -%} <li {% if forloop.first %}class="first"{% endif %}> <a href="{{ post.url }}"> <time>{{ post.date | date: "%Y-%m-%d" }}</time> @@ -103,3 +104,13 @@ main section ol > li:first-child a[href]:is(:hover, :focus) { {%- endfor -%} </ol> </section> + +<nav class="pagination"> + <ol> + <li>{% if pagination.href.previous %}<a href="{{ pagination.href.previous }}" title="Previous">«</a>{% else %}<span>«</span>{% endif %}</li> + {%- for pageEntry in pagination.pages %} + <li><a href="{{ pagination.hrefs[ forloop.index0 ] }}"{% if page.url == pagination.hrefs[ forloop.index0 ] %} aria-current="page"{% endif %}>{{ forloop.index }}</a></li> + {%- endfor %} + <li>{% if pagination.href.next %}<a href="{{ pagination.href.next }}" title="Next">»</a>{% else %}<span>»</span>{% endif %}</li> + </ol> +</nav>