Skip to content

Commit

Permalink
Add pagination to security page
Browse files Browse the repository at this point in the history
  • Loading branch information
aperezdc committed Feb 5, 2024
1 parent d0c6c86 commit 8ba2333
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion security.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pagination:
data: collections.WSA
size: 50
alias: posts
reverse: true
---
<style>
main section ol {
Expand Down Expand Up @@ -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>
Expand All @@ -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>

0 comments on commit 8ba2333

Please sign in to comment.