diff options
| author | Jake G | 2023-06-16 10:36:39 -0700 |
|---|---|---|
| committer | GitHub | 2023-06-16 10:36:39 -0700 |
| commit | 45337eff2f7cd132b94e52ff6c4aca4c4082fa8b (patch) | |
| tree | c660ccbc836f47f0e8750bcd5408338e234f3557 /templates/macros/macros.html | |
| parent | 28052596836f4c8ca823cfa5a904a6a48f2965a4 (diff) | |
| parent | eade3b10759e73c99facb55e7f258f6d98f41b5a (diff) | |
| download | abridge-45337eff2f7cd132b94e52ff6c4aca4c4082fa8b.tar.gz abridge-45337eff2f7cd132b94e52ff6c4aca4c4082fa8b.tar.bz2 abridge-45337eff2f7cd132b94e52ff6c4aca4c4082fa8b.zip | |
Merge pull request #123 from wold5/refactor
add paginator on post page (v2)
Diffstat (limited to 'templates/macros/macros.html')
| -rw-r--r-- | templates/macros/macros.html | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/templates/macros/macros.html b/templates/macros/macros.html index 34ab651..bc38935 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -118,12 +118,26 @@ -{%- macro footer(page) %} -{%- if page.reading_time %} -{%- if page.reading_time > 2 %} +{%- macro footer(page, config) %} +{%- if page.reading_time and page.reading_time > 2 %} <p><b><a href="#">Back to top</a></b></p> {%- endif %} +<nav><!-- prev/next page title. Keep for CSS selector even if empty --> +{% if not config.extra.hide_page_nextprev_titles | default(value=false) %} +{% if page.lower or page.higher-%} + <div> + {% if page.lower -%} + <a href="{{ page.lower.permalink | safe }}">‹ {{ page.lower.title | truncate(length=100) }}</a> + {%- endif %} + </div> + <div> + {% if page.higher -%} + <a href="{{ page.higher.permalink | safe }}"> {{ page.higher.title | truncate(length=100) }} ›</a> + {%- endif %} + </div> {%- endif %} +{%- endif %} +</nav> {%- endmacro footer %} |
