X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=haunt.scm;h=db8f0b876a6c070e1c2a986c2cf8b6aa7fa8ce62;hb=45ebde25a8c462596f8210715ce2b5150ed0559c;hp=3cefb99e2808d80e3751461538124647c24b12de;hpb=bf9ff03aeeb0d686989c16f98a3701e6f708364f;p=blog.git diff --git a/haunt.scm b/haunt.scm index 3cefb99..db8f0b8 100644 --- a/haunt.scm +++ b/haunt.scm @@ -33,9 +33,13 @@ `(" " (span (@ (style "margin: 0 3px")) ⦿) (span (@ (class "tags")) - ,@(map (lambda (tag) - `((a (@ (href ,(format #f "tags/~a.html" tag))) ,tag) " ")) - tags))))) + ,@(drop-right + (apply + append + (map (lambda (tag) + `((a (@ (href ,(format #f "tags/~a.html" tag))) ,tag) ", ")) + tags)) + 1))))) (else div)))) @@ -62,7 +66,8 @@ (li (@ (id "blog-title-header")) (a (@ (href "index.html")) (h1 ,(assoc-ref metadata 'author))))) - (ul (@ (class "navigation-items center"))) + (ul (@ (class "navigation-items center")) + (li (a (@ (href "https://www.jsancho.org/")) "in spanish"))) (ul (@ (class "navigation-items right")) ,@(map (lambda (page) `(li (a (@ (href ,(cdr page))) ,(car page)))) @@ -85,10 +90,14 @@ (site-post-slug site post) ".html")) (define (get-paragraphs sxml count) - (let ((pars (filter - (lambda (e) (and (pair? e) (eq? (car e) 'p))) - sxml))) - (list-head pars (min count (length pars))))) + (define (getp sxml count res) + (cond ((or (= count 0) (null? sxml)) + res) + ((and (pair? (car sxml)) (eq? (caar sxml) 'p)) + (getp (cdr sxml) (- count 1) (cons (car sxml) res))) + (else + (getp (cdr sxml) count (cons (car sxml) res))))) + (reverse (getp sxml count '()))) (define (post-summary post) (or (post-ref post 'summary)