diff options
| author | Jakob L. Kreuze | 2019-12-28 21:35:20 -0500 |
|---|---|---|
| committer | Jakob L. Kreuze | 2019-12-28 21:35:20 -0500 |
| commit | b6811d23266cf804ea58919ab85e6aec4be7b7e7 (patch) | |
| tree | 1d87252b3ad4b15cf3012604070c3f6d523908f8 /haunt/jakob/builder/blogroll.scm | |
| parent | 7b2e58eafb5562ca425075e112746b0ab33a0869 (diff) | |
Refactor SXML generation with a reader macro.
Diffstat (limited to 'haunt/jakob/builder/blogroll.scm')
| -rw-r--r-- | haunt/jakob/builder/blogroll.scm | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/haunt/jakob/builder/blogroll.scm b/haunt/jakob/builder/blogroll.scm index 9d75c1e..866ee2b 100644 --- a/haunt/jakob/builder/blogroll.scm +++ b/haunt/jakob/builder/blogroll.scm @@ -83,22 +83,19 @@ each tag is used." (define* (render-entries title prefix entries #:optional tag) "Return an SHTML document listing ENTRIES in PREFIX, with a header of TITLE." - `(main - ,@(maybe-cons* - `(h1 ,(if tag - (format #f "~a - Tagged with \"~a\"" title tag) - title)) - (unless tag - (render-tag-cloud prefix entries)) - (unless tag - `(hr)) - (map (lambda (entry) - (render-preview (entry-name entry) - (entry-uri entry) - (entry-tags entry) - prefix - (entry-comments entry))) - entries)))) + #<(main + `(h1 ,(if tag + (format #f "~a - Tagged with \"~a\"" title tag) + title)) + ,(unless tag (render-tag-cloud prefix entries)) + ,(unless tag `(hr)) + ,@(map (lambda (entry) + (render-preview (entry-name entry) + (entry-uri entry) + (entry-tags entry) + prefix + (entry-comments entry))) + entries))) (define (entries->pages title prefix entries) "Return a page listing ENTRIES in PREFIX with a header of TITLE, as well as |