Commit 795fc4ad authored by Arjun Thekoot Harisankar's avatar Arjun Thekoot Harisankar 💻

Fixed Minor Bugs on Announcements and Developer Blog Pages

parent e3d4fdb3
......@@ -26,56 +26,18 @@
{% if paginator.total_pages > 1 %}
<div class="pagination justify-content-center mt-3">
{% if paginator.previous_page %}
<a class="ml-1 mr-1" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo;
{% if site.prev %}
{{site.prev}}{% else %}Prev
{% endif %}
</a>
<a href="{{ paginator.previous_page_path }}" class="ml-1 mr-1">Prev</a>
{% else %}
<span>&laquo;
{% if site.prev %}
{{site.prev}}{% else %}Prev
{% endif %}
</span>
{% endif %}
{% if paginator.total_pages > 20 %}
{% for page in
(1..paginator.total_pages) %}
{% assign relative_to_current = paginator.page
| minus: page | replace: '-', '' | divided_by: 1 %}
{% if page ==
paginator.page %}
<span class="ml-1 mr-1">{{ page }}</span>
{% elsif relative_to_current < 5 and page == 1 %}
<a class="ml-1 mr-1" href="{{ '/' | relative_url }}">{{ page }}</a>
{% elsif relative_to_current < 5 %}
<a class="ml-1 mr-1" href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
{% endif %}
{% endfor %}
{% else %}
{% for page in
(1..paginator.total_pages) %}
{% if page == paginator.page %}
<span class="ml-1 mr-1">{{ page }}</span>
{% elsif page == 1 %}
<a class="ml-1 mr-1" href="{{ '/' | relative_url }}">{{ page }}</a>
{% else %}
<a class="ml-1 mr-1" href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
{% endif %}
{% endfor %}
<span class="ml-1 mr-1">Prev</span>
{% endif %}
<span class="ml-1 mr-1 ">Page:
{{ paginator.page }}
of
{{ paginator.total_pages }}</span>
{% if paginator.next_page %}
<a class="ml-1 mr-1" href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">
{% if site.next %}
{{site.next}}{% else %}Next
{% endif %}
&raquo;</a>
<a href="{{ paginator.next_page_path }}" class="ml-1 mr-1">Next</a>
{% else %}
<span>
{% if site.next %}
{{site.next}}{% else %}Next
{% endif %}
&raquo;</span>
<span class="ml-1 mr-1 ">Next</span>
{% endif %}
</div>
{% endif %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment