aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--sass/include/_nav.scss6
-rw-r--r--templates/index.html22
3 files changed, 31 insertions, 1 deletions
diff --git a/README.md b/README.md
index 24cea96..237b423 100644
--- a/README.md
+++ b/README.md
@@ -91,6 +91,10 @@ You can customize your configurations, templates and content for yourself. Look
at the `config.toml`, `content` files, and templates files in this
repo for an idea.
+### Number of Items per page for pagination
+
+To change the number of items per page edit: `abridge/content/_index.md` and change the value for `paginate_by`
+
### Colors and Styles
Colors and style are handled by the sass files of [abridge.css](https://github.com/jieiku/abridge.css)
diff --git a/sass/include/_nav.scss b/sass/include/_nav.scss
index a1e5402..db19bc8 100644
--- a/sass/include/_nav.scss
+++ b/sass/include/_nav.scss
@@ -2,6 +2,12 @@
* Horizontal Nav
* https://github.com/raj457036/attriCSS
*/
+.cnav {
+ color: var(--a3);
+}
+main nav {
+ margin-top: var(--s2);
+}
main nav a,
main nav a:visited {
font-weight: var(--fh);
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 }}">&#60; Previous</a> {% endif %}{% if paginator.next %}<a href="{{ paginator.next | safe }}">Next &#62;</a>{% endif %}
+ <div>{% if paginator.previous %}<a href="{{ paginator.previous | safe }}">&#60; 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 &#62;</a>{% endif %} </div>
</nav>
+ {% endif -%}
</div>
{% set section_item = get_section(path="_index.md") %}
{% if config.extra.recent | default(value=true) %}