diff options
| author | Jieiku | 2022-05-30 22:45:37 -0700 |
|---|---|---|
| committer | Jieiku | 2022-05-30 22:45:37 -0700 |
| commit | 9d3c60b05febe570e0facada8927feb26859f128 (patch) | |
| tree | edebce508726de06bd76066631aa988b82d1094a /templates/index.html | |
| parent | a04e54d9fed5760e6843b74d20e8df63b8d890c6 (diff) | |
| download | abridge-9d3c60b05febe570e0facada8927feb26859f128.tar.gz abridge-9d3c60b05febe570e0facada8927feb26859f128.tar.bz2 abridge-9d3c60b05febe570e0facada8927feb26859f128.zip | |
Add Pagination, Update Readme
Diffstat (limited to 'templates/index.html')
| -rw-r--r-- | templates/index.html | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/templates/index.html b/templates/index.html index f0740fe..abc29c0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -19,9 +19,29 @@ </p> </article> {% endfor %} + {% if paginator.previous or paginator.next %} <nav> - {% if paginator.previous %}<a href="{{ paginator.previous | safe }}">< Previous</a> {% endif %}{% if paginator.next %}<a href="{{ paginator.next | safe }}">Next ></a>{% endif %} + <div>{% if paginator.previous %}<a href="{{ paginator.previous | safe }}">< Previous</a> {% endif %} </div> + <div> + <ul> + {% for pager in range(start=1, end=paginator.number_pagers+1) %} + <li> + {% if pager == 1 %} + <a class="pag {% if paginator.current_index == pager %}cnav{% endif %}" href='{{ get_url(path="/", trailing_slash=true) }}'> + {{pager}} + </a> + {% else %} + <a class="pag {% if paginator.current_index == pager %}cnav{% endif %}" href='{{ paginator.base_url }}{{pager}}'> + {{pager}} + </a> + {% endif -%} + </li> + {% endfor %} + </ul> + </div> + <div>{% if paginator.next %}<a href="{{ paginator.next | safe }}">Next ></a>{% endif %} </div> </nav> + {% endif -%} </div> {% set section_item = get_section(path="_index.md") %} {% if config.extra.recent | default(value=true) %} |
