aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-12-22 21:52:16 +0100
committerHugo Hörnquist <hugo@hornquist.se>2019-12-22 21:52:16 +0100
commit07aa3655f41c97289e49c31cc0cd1681dbe21b33 (patch)
tree414ec9b39e6d30072f454e2694413a706fcdf1b8 /module
parentFix prev and next month buttons. (diff)
downloadcalp-07aa3655f41c97289e49c31cc0cd1681dbe21b33.tar.gz
calp-07aa3655f41c97289e49c31cc0cd1681dbe21b33.tar.xz
Broke out nav-link into function.
Diffstat (limited to 'module')
-rw-r--r--module/output/html.scm20
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"))