From 384132878a4f240c0675e111001143dede6bae9a Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 28 Feb 2008 00:29:23 +0100 Subject: minor tweaks --- tekuti/filters.scm | 2 +- tekuti/page.scm | 16 ++++++++-------- tekuti/post.scm | 4 ++-- tekuti/request.scm | 2 +- tekuti/template.scm | 12 +++++++----- tekuti/web.scm | 3 +-- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/tekuti/filters.scm b/tekuti/filters.scm index 5056883..b6bce67 100644 --- a/tekuti/filters.scm +++ b/tekuti/filters.scm @@ -84,7 +84,7 @@ (let ((sxml (cadr (with-input-from-string (string-append "
" text "
") xml->sxml)))) (pre-post-order - (pk sxml) + sxml `((*default* . ,(lambda (tag . body) (if (can-contain-p? tag) (wpautop tag body) diff --git a/tekuti/page.scm b/tekuti/page.scm index 34c86c8..7ad46b7 100644 --- a/tekuti/page.scm +++ b/tekuti/page.scm @@ -234,7 +234,6 @@ (define (page-index request index) (rcons* request - 'title "my bloggidy blog" 'body `(,(main-sidebar request index) ,@(map (lambda (post) (show-post post #f)) @@ -248,7 +247,8 @@ => (lambda (tree) (let ((post (post-from-tree slug tree))) (rcons* request - 'title (assq-ref post 'title) + 'title (string-append (assq-ref post 'title) + " -- " *title*) 'body (show-post post #t))))) (else (page-not-found request index))))) @@ -269,7 +269,9 @@ (else (let ((comment (make-new-comment (post-from-tree slug tree) data))) (rcons* request - 'body `((p "hey hey hey like fat albert" ,comment)))))))) + 'title "comment posted" + 'body `((p "Comment, posted, thanks.") + (p "Back to the post: " (post-link post))))))))) (else (page-not-found request index))))) @@ -317,10 +319,9 @@ (lambda (x) #f)) (let lp ((posts (assq-ref index 'posts))) - (pk 'foo (or (null? posts) (car posts))) (cond ((or (null? posts) (too-early? (car posts))) (rcons* request - 'title "no posts found" + 'title *title* 'body `((h1 "No posts found") (p "No posts were found in the specified period.")))) ((early-enough? (car posts)) @@ -328,7 +329,7 @@ (cond ((or (null? posts) (too-early? (car posts))) (rcons* request - 'title "archives" + 'title (string-append "archives -- " *title*) 'body (reverse out))) ((new-header (car posts)) => (lambda (sxml) @@ -346,7 +347,7 @@ (define (page-debug request index) (rcons* request - 'title "hello" + 'title "debug" 'body `((p "hello world!") (table (tr (th "header") (th "value")) @@ -427,4 +428,3 @@ (div (@ (xmlns "http://www.w3.org/1999/xhtml")) ,(post-sxml-content post))))) (take-max (assq-ref index 'posts) 10)))))))) - diff --git a/tekuti/post.scm b/tekuti/post.scm index 1bc1cc4..6138c11 100644 --- a/tekuti/post.scm +++ b/tekuti/post.scm @@ -126,7 +126,7 @@ (size "22") (tabindex "3"))) " " (label (@ (for "url")) (small "Website"))) ;(p (small "allowed tags: ")) - (p (textarea (@ (name "comment") (id "comment") (cols "100%") + (p (textarea (@ (name "comment") (id "comment") (cols "65") (rows "10") (tabindex "4")) ,comment)) (p (input (@ (name "submit") (type "submit") (id "submit") (tabindex "5") @@ -147,7 +147,7 @@ `(li (@ (class "alt") (id ,(assq-ref comment 'key))) (cite ,(let ((url (assq-ref comment 'author_url)) (name (assq-ref comment 'author))) - (if url + (if (and url (not (string-null? url))) `(a (@ (href ,url) (rel "external nofollow")) ,name) name))) " says:" (br) diff --git a/tekuti/request.scm b/tekuti/request.scm index acf5c2a..d3b3c0c 100644 --- a/tekuti/request.scm +++ b/tekuti/request.scm @@ -157,7 +157,7 @@ (nreq (if req (- (length req) nopt) 0))) (lambda (path) (let ((pathtail (list-head-match pat path (- npat ntail)))) - (pk pat npat ntail req opt nopt nreq path pathtail) + ;(pk pat npat ntail req opt nopt nreq path pathtail) (if (and pathtail (>= (length pathtail) nreq) (<= (length pathtail) (+ nreq nopt))) (append pathtail diff --git a/tekuti/template.scm b/tekuti/template.scm index 092da87..2117034 100644 --- a/tekuti/template.scm +++ b/tekuti/template.scm @@ -45,9 +45,9 @@ '("about" "software" "writings" "photos")) " | "))) `(html - (head (title ,(rref request 'title "wingolog")) + (head (title ,(rref request 'title *title*)) (meta (@ (name "Generator") - (content "The Guile SXML Toolkit"))) + (content "An unholy concoction of parenthetical guile"))) (link (@ (rel "stylesheet") (type "text/css") (media "screen") @@ -55,9 +55,11 @@ (body (div (@ (id "rap")) (h1 (@ (id "header")) - (a (@ ,(href "")) "wingolog")) + (a (@ ,(href "")) ,*title*)) ,(make-navbar) (div (@ (id "content")) - ,@(rref request 'body '((p "what")))) + ,@(rref request 'body '((p "(missing content?)")))) (div (@ (id "footer")) - "powered by sxml"))))) + "powered by " + (a (@ (href "http://wingolog.org/software/tekuti/")) + "parentheses")))))) diff --git a/tekuti/web.scm b/tekuti/web.scm index a9b0e48..9f782a7 100644 --- a/tekuti/web.scm +++ b/tekuti/web.scm @@ -94,8 +94,7 @@ ((GET archives year? month? day?) page-archives) ((GET archives year! month! day! post!) page-show-post) ((POST archives year! month! day! post!) page-new-comment) - ((GET feed) page-feed-rss2) - ((GET feed rss2) page-feed-rss2) + ((GET feed) page-feed-atom) ((GET feed atom) page-feed-atom) ((GET tags) page-show-tags) ((GET tags tag!) page-show-tag) -- cgit v1.2.3-54-g00ecf