minor restructuring
This commit is contained in:
parent
dfe5c56163
commit
7c33c9ba08
|
@ -15,20 +15,26 @@
|
||||||
(if (null? *data*) (read-data))
|
(if (null? *data*) (read-data))
|
||||||
(let loop ((count (- (length *data*) 1)))
|
(let loop ((count (- (length *data*) 1)))
|
||||||
(if (< count 0)
|
(if (< count 0)
|
||||||
(send-html/finish
|
(show-final-page)
|
||||||
`(html (body (p (h1 "THAT'S IT"))
|
|
||||||
(p ("That's it..."))
|
|
||||||
(hr)
|
|
||||||
(p (URL "news.scm" "See news again.") (br)
|
|
||||||
(URL "/" "Return to main menu.")))))
|
|
||||||
(begin
|
(begin
|
||||||
(send-html/suspend
|
(show-news-page count)
|
||||||
(lambda (next-url)
|
|
||||||
`(html (body (p (h1 ,(list-ref *data* count)))
|
|
||||||
(a (@ href ,next-url) "read more...")
|
|
||||||
(hr)
|
|
||||||
(p (URL "news.scm" "See news again from beginning.") (br)
|
|
||||||
(URL "/" "Return to main menu."))))))
|
|
||||||
(loop (- count 1))))))
|
(loop (- count 1))))))
|
||||||
|
|
||||||
|
(define (show-final-page)
|
||||||
|
(send-html/finish
|
||||||
|
`(html (body (p (h1 "THAT'S IT"))
|
||||||
|
(p ("That's it..."))
|
||||||
|
(hr)
|
||||||
|
(p (URL "news.scm" "See news again.") (br)
|
||||||
|
(URL "/" "Return to main menu."))))))
|
||||||
|
|
||||||
|
(define (show-news-page count)
|
||||||
|
(send-html/suspend
|
||||||
|
(lambda (next-url)
|
||||||
|
`(html (body (p (h1 ,(list-ref *data* count)))
|
||||||
|
(a (@ href ,next-url) "read more...")
|
||||||
|
(hr)
|
||||||
|
(p (URL "news.scm" "See news again from beginning.") (br)
|
||||||
|
(URL "/" "Return to main menu.")))))))
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue