clean target added in Makefile + more natual pagination

This commit is contained in:
ahmadbilalkhalid 2019-11-18 19:36:27 +05:00
parent ffa3141648
commit 604f8d17c0
2 changed files with 11 additions and 2 deletions

View file

@ -15,3 +15,6 @@ permissions: build
build: build:
lektor build -O $(BUILDDIR) lektor build -O $(BUILDDIR)
clean:
rm -rf $(BUILDDIR)

View file

@ -5,10 +5,16 @@
{% else %} {% else %}
<span class="disabled">&laquo; Previous</span> <span class="disabled">&laquo; Previous</span>
{% endif %} | {% endif %} |
{{ pagination.page }} |
{% for page in range(pagination.page + 1, pagination.pages + 1)[:5] %}
{% for page in range(1, pagination.pages + 1) %}
{% if page != pagination.page %}
<a href="{{ pagination.for_page(page)|url }}">{{ page }}</a> | <a href="{{ pagination.for_page(page)|url }}">{{ page }}</a> |
{% else %}
{{ pagination.page }} |
{% endif %}
{% endfor %} {% endfor %}
{% if pagination.has_next %} {% if pagination.has_next %}
<a href="{{ pagination.next|url }}">Next &raquo;</a> <a href="{{ pagination.next|url }}">Next &raquo;</a>
{% else %} {% else %}