From f548a928a3e271891e16e811ebce4a997f96ef5b Mon Sep 17 00:00:00 2001 From: William Ouwehand Date: Fri, 16 Jun 2023 17:29:33 +0200 Subject: combine conditionals --- templates/macros/macros.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'templates/macros') diff --git a/templates/macros/macros.html b/templates/macros/macros.html index 34ab651..dd718e7 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -119,8 +119,7 @@ {%- macro footer(page) %} -{%- if page.reading_time %} -{%- if page.reading_time > 2 %} +{%- if page.reading_time and page.reading_time > 2 %}
{%- endif %} {%- endif %} -- cgit v1.3.1 From 60b1bfea5d2eba0a1f1c9807087635c0abc6cfd0 Mon Sep 17 00:00:00 2001 From: William Ouwehand Date: Fri, 16 Jun 2023 17:33:03 +0200 Subject: Add prev/next page title paginator --- sass/abridge.scss | 6 ++++++ templates/macros/macros.html | 13 +++++++++++++ 2 files changed, 19 insertions(+) (limited to 'templates/macros') diff --git a/sass/abridge.scss b/sass/abridge.scss index f5c69c0..4efd6dd 100644 --- a/sass/abridge.scss +++ b/sass/abridge.scss @@ -656,6 +656,12 @@ $syntax: true !default;//syntax highlighting for code blocks a,span { margin: .2rem; } + &:last-child //prev/next page title + { + div:last-child { + text-align: right; + } + } } footer nav > a { margin: .2rem; diff --git a/templates/macros/macros.html b/templates/macros/macros.html index dd718e7..ee5f896 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -122,7 +122,20 @@ {%- if page.reading_time and page.reading_time > 2 %} {%- endif %} + {%- endmacro footer %} -- cgit v1.3.1 From eade3b10759e73c99facb55e7f258f6d98f41b5a Mon Sep 17 00:00:00 2001 From: William Ouwehand Date: Fri, 16 Jun 2023 19:31:22 +0200 Subject: add disable setting in config --- config.toml | 1 + templates/macros/macros.html | 4 +++- templates/page.html | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'templates/macros') diff --git a/config.toml b/config.toml index f5fc2b7..6b65a04 100644 --- a/config.toml +++ b/config.toml @@ -121,6 +121,7 @@ meta_index = { position="bottom", size="s90", author=false, readtime=false, read meta_post = { position="top", size="s95", author=true, readtime=false, readstring="min read", date=true, categories_tags=true, divider=" " } hide_section_dates = false # hides the date for sections that use posts.html as their template. +hide_page_nextprev_titles = false # hides the next/previous titles for pages that use page.html as their template. title_size_index = "s85" # size: s95, s90, s85, s80, s75, s70, false(full size) footer_size = "s90" # size: s95, s90, s85, s80, s75, s70, false(full size) footer_credit = true diff --git a/templates/macros/macros.html b/templates/macros/macros.html index ee5f896..bc38935 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -118,11 +118,12 @@ -{%- macro footer(page) %} +{%- macro footer(page, config) %} {%- if page.reading_time and page.reading_time > 2 %} {%- endif %} {%- endmacro footer %} diff --git a/templates/page.html b/templates/page.html index c92e49c..979e0a1 100644 --- a/templates/page.html +++ b/templates/page.html @@ -47,7 +47,7 @@ {%- endif %}{%- endif %} {%- block page_footer %} - {{- macros::footer(page=page) }} + {{- macros::footer(page=page, config=config) }} {%- endblock page_footer %} {%- block toc %} -- cgit v1.3.1