cryogen-project / cryogen-project/cryogen

[feature] pagination for posts summary

Open
#234 1 comment 0 reactions 0 assignees View on GitHub
likely invalid
Dominant language
HTML
Stars
1.1k
Forks
93
PR merge metrics
No merged PRs in 30d

Description

Currently there is a way to do `prev` / `next` but not `0`, `1`, `2`, `...`
```html


{% if prev-uri %}
« Prev
{% endif %}
{% if next-uri %}
Next »
{% endif %}

```

I would like to add numbers between `prev` and `next` like in the example below.
![image](https://user-images.githubusercontent.com/3903726/121242598-0be66000-c89d-11eb-8bf4-707549aaf32b.png)

To make it possible we need to add data to Selmer with page index, URL, is page active.

Here is a Hugo example:
```html
{{ if gt $paginator.TotalPages 1 }}

{{ end }}
```

This is the part which Cryogen doesn't have:
```html
{{ range .Paginator.Pagers }}

  • {{ .PageNumber }}

  • {{ end }}
    ```
    So we need something in that taste.

    Contributor guide

    Open the contributing guide

    Assessment

    This issue has not been assessed yet.

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.