diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-12-22 21:52:16 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-12-22 21:52:16 +0100 |
commit | 07aa3655f41c97289e49c31cc0cd1681dbe21b33 (patch) | |
tree | 414ec9b39e6d30072f454e2694413a706fcdf1b8 | |
parent | Fix prev and next month buttons. (diff) | |
download | calp-07aa3655f41c97289e49c31cc0cd1681dbe21b33.tar.gz calp-07aa3655f41c97289e49c31cc0cd1681dbe21b33.tar.xz |
Broke out nav-link into function.
Diffstat (limited to '')
-rw-r--r-- | module/output/html.scm | 20 |
1 files changed, 8 insertions, 12 deletions
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 "<!doctype HTML>") (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")) |