From 07aa3655f41c97289e49c31cc0cd1681dbe21b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 22 Dec 2019 21:52:16 +0100 Subject: Broke out nav-link into function. --- module/output/html.scm | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'module/output') diff --git a/module/output/html.scm b/module/output/html.scm index 57edc015..a9643fc3 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -233,7 +233,11 @@ start end)) ;; (display "") (newline) - + (define (nav-link display date) + `(a (@ (href ,(date->string date "~Y-~m-~d") ".html") + (class "nav hidelink")) + (div (@ (class "nav")) + ,display))) ((@ (sxml simple) sxml->xml) `(html (@ (lang sv)) @@ -280,22 +284,14 @@ ;; Small calendar and navigation (div (@ (class "about")) ;; prev button - (a (@ (href ,(date->string (month- start) - "~Y-~m-~d") ".html") - (class "nav hidelink")) - (div (@ (class "nav")) - "«")) + ,(nav-link "«" (month- start)) ;; calendar table (div ,(cal-table (start-of-month start) (current-date))) - ;; next next-button - (a (@ (href ,(date->string (month+ start) - "~Y-~m-~d") ".html") - (class "nav hidelink")) - (div (@ (class "nav")) - "»"))) + ;; next button + ,(nav-link "»" (month+ start))) ;; List of events (div (@ (class "eventlist")) -- cgit v1.2.3