From d5b827097b456100039370003899ec7ad04ac934 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Wed, 19 Jun 2019 17:39:29 +0200 Subject: templates: If applicable, disable "Last" and "First" pagination links. * src/cuirass/templates.scm (pagination): Disable "Last" and "First" if applicable. --- src/cuirass/templates.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm index 342fd13..ab1b85c 100644 --- a/src/cuirass/templates.scm +++ b/src/cuirass/templates.scm @@ -210,7 +210,8 @@ (nav (@ (class "mx-auto") (aria-label "Page navigation")) (ul (@ (class "pagination")) - (li (@ (class "page-item")) + (li (@ (class "page-item" + ,(if (string-null? prev-link) " disabled"))) (a (@ (class "page-link") (href ,first-link)) "<< First")) @@ -224,7 +225,8 @@ (a (@ (class "page-link") (href ,next-link)) "Next >")) - (li (@ (class "page-item")) + (li (@ (class "page-item" + ,(if (string-null? next-link) " disabled"))) (a (@ (class "page-link") (href ,last-link)) "Last >>")))))) -- cgit v1.2.3