Bootstrap post page
This commit is contained in:
parent
b6faf6fded
commit
35c56844aa
2 changed files with 49 additions and 32 deletions
|
@ -214,25 +214,43 @@
|
||||||
|
|
||||||
(define (comment-form post author email url comment)
|
(define (comment-form post author email url comment)
|
||||||
`(form
|
`(form
|
||||||
(@ (action ,(post-url post)) (method "POST"))
|
(@ (action ,(post-url post)) (method "POST")
|
||||||
(p (input (@ (type "text") (name "author") (value ,author)
|
(class "form-horizontal"))
|
||||||
(size "22") (tabindex "1")))
|
(div (@ (class "control-group"))
|
||||||
" " (label (@ (for "author")) (small "Name")))
|
(label (@ (class "control-label") (for "author")) "Name")
|
||||||
(p (input (@ (type "text") (name "email") (value ,email)
|
(div (@ (class "controls"))
|
||||||
(size "22") (tabindex "2")))
|
(input (@ (type "text") (name "author") (id "author")
|
||||||
" " (label (@ (for "email")) (small "Mail (will not be published)")))
|
(value ,author) (tabindex "1") (class "span6")
|
||||||
(p (input (@ (type "text") (name "url") (value ,url)
|
(placeholder "Your Name")))))
|
||||||
(size "22") (tabindex "3")))
|
(div (@ (class "control-group"))
|
||||||
" " (label (@ (for "url")) (small "Website")))
|
(label (@ (class "control-label") (for "email"))
|
||||||
(p (input (@ (type "text") (name "x") (value "")
|
"Mail (will not be published)")
|
||||||
(size "22") (tabindex "3")))
|
(div (@ (class "controls"))
|
||||||
" " (label (@ (for "x")) (small "What's your favorite number?")))
|
(input (@ (type "text") (name "email") (id "email")
|
||||||
;(p (small "allowed tags: "))
|
(value ,email) (tabindex "2") (class "span6")
|
||||||
(p (textarea (@ (name "comment") (id "comment") (cols "65")
|
(placeholder "you@somehost.com")))))
|
||||||
(rows "10") (tabindex "4"))
|
(div (@ (class "control-group"))
|
||||||
,comment))
|
(label (@ (class "control-label") (for "url")) "Website")
|
||||||
(p (input (@ (name "submit") (type "submit") (id "submit") (tabindex "5")
|
(div (@ (class "controls"))
|
||||||
(value "Submit Comment"))))))
|
(input (@ (type "text") (name "url") (id "url")
|
||||||
|
(value ,url) (tabindex "3") (class "span6")
|
||||||
|
(placeholder "http://your.website.com")))))
|
||||||
|
(div (@ (class "control-group"))
|
||||||
|
(label (@ (class "control-label") (for "x"))
|
||||||
|
"What's your favorite number?")
|
||||||
|
(div (@ (class "controls"))
|
||||||
|
(input (@ (type "text") (name "x") (id "x") (value "")
|
||||||
|
(tabindex "3") (class "span6")))))
|
||||||
|
(div (@ (class "control-group"))
|
||||||
|
(div (@ (class "controls"))
|
||||||
|
(textarea (@ (name "comment") (id "comment") (cols "65")
|
||||||
|
(rows "10") (tabindex "4") (class "span6"))
|
||||||
|
,comment)))
|
||||||
|
(div (@ (class "control-group"))
|
||||||
|
(div (@ (class "controls"))
|
||||||
|
(button (@ (type "submit") (class "btn btn-primary")
|
||||||
|
(name "submit") (id "submit") (tabindex "5"))
|
||||||
|
"Submit Comment")))))
|
||||||
|
|
||||||
(define (comments-sxml-content-edit post)
|
(define (comments-sxml-content-edit post)
|
||||||
(map
|
(map
|
||||||
|
@ -336,17 +354,13 @@
|
||||||
,@(tag-cloud (top-tags index 30))))
|
,@(tag-cloud (top-tags index 30))))
|
||||||
|
|
||||||
(define (post-sidebar post index)
|
(define (post-sidebar post index)
|
||||||
(sidebar-ul
|
`((h2 (a (@ (href ,(relurl '("feed" "atom"))))
|
||||||
`((li (h2 (a (@ (href ,(relurl '("feed" "atom"))))
|
"subscribe "))
|
||||||
"subscribe "
|
(h2 "related")
|
||||||
(img (@ (src ,(relurl '("wp-content" "feed-icon-14x14.png")))
|
|
||||||
(alt "[feed]")))
|
|
||||||
)))
|
|
||||||
(li (h2 "related")
|
|
||||||
(ul ,@(map (lambda (post-and-tags)
|
(ul ,@(map (lambda (post-and-tags)
|
||||||
`(li (@ (style "margin-top: 5px"))
|
`(li (@ (style "margin-top: 5px"))
|
||||||
,(post-link (car post-and-tags))))
|
,(post-link (car post-and-tags))))
|
||||||
(take-max (compute-related-posts post index) 10)))))))
|
(take-max (compute-related-posts post index) 10)))))
|
||||||
|
|
||||||
(define (related-tag-cloud tag index)
|
(define (related-tag-cloud tag index)
|
||||||
`(div (@ (id "tag-cloud"))
|
`(div (@ (id "tag-cloud"))
|
||||||
|
|
|
@ -198,8 +198,11 @@
|
||||||
(cond
|
(cond
|
||||||
((post-from-key index (make-post-key year month day post))
|
((post-from-key index (make-post-key year month day post))
|
||||||
=> (lambda (post)
|
=> (lambda (post)
|
||||||
(respond `(,(post-sidebar post index)
|
(respond `((div (@ (class "row"))
|
||||||
|
(div (@ (class "span9"))
|
||||||
,(show-post post #t))
|
,(show-post post #t))
|
||||||
|
(div (@ (class "span3"))
|
||||||
|
,(post-sidebar post index))))
|
||||||
#:title (string-append (post-title post) " -- " *title*)
|
#:title (string-append (post-title post) " -- " *title*)
|
||||||
#:etag (assq-ref index 'master))))
|
#:etag (assq-ref index 'master))))
|
||||||
(else
|
(else
|
||||||
|
|
Loading…
Reference in a new issue