(in-package :kira) (feature post posts) (feature book books) (feature quote quotes) (feature video videos) (defun render-standard-page () (let ((head (region-string :head)) (title (region-string :title)) (heading (region-string :heading)) (left (region-string :left)) (right (region-string :right)) (sidebar (region-string :sidebar)) (content (region-string :content))) (html (:html (:head ((:meta :http-equiv "content-type" :content "text/html; charset=UTF-8")) ((:link :rel "stylesheet" :type "text/css" :href "/cb.css")) ((:script :src "/cb.js")) (:title title) head) (:body ((:table :id "layout" :width "100%") (:tr ((:td :id "left" :class "sidebar" :width 220 :valign "top") ((:div :class "inner") (let ((method-exists (method-exists nil #'render-sidebar *node* *view*)) (section-exists (method-exists nil #'render-sidebar *section* nil))) (with-region-style (:sidebar) (:if (or left sidebar method-exists section-exists) (:progn left sidebar (cond (method-exists (render-sidebar *node* *view*)) (section-exists (render-sidebar *section* nil)))) (:progn ((:p :class "avatar") ((:a :title (render-title :groups)) (:uri-to :groups) ((:img :src "/map.png" :width 190 :height 245 :alt (render-title :groups))))) (:panel (:uri :groups) (:list (groups *root*) :descending t)) (do-collection (video (featured 'videos)) (:panel (:uri video) (:title "Featured Video") (render-title video) (multiple-value-bind (min sec) (duration video t) (when min (html " " (:small (:format "(~d:~2,'0d)" min sec))))) (:br) (render-image video :width 120 :height nil))) (:panel (:title (render-link :blogs) "   " ((:a :class "image" :rel "nofollow" :title "RSS 2.0") (:uri-to :blogs/rss) ((:img :src "/rss.png" :width 16 :height 16 :alt "RSS 2.0")))) (:list (blog *root*))) (:panel (:title (render-link :events) "   " ((:a :class "image" :rel "nofollow" :title "iCal") (:uri-to :events/ical) ((:img :src "/ical.png" :width 16 :height 16 :alt "iCal")))) (:list (events *root*))) (:whereas ((forum (forum *root*))) (:panel (:uri forum) (:list (posts forum)))) (:panel (:uri :people) (:list (people *root*) :style 'joined)))))))) ((:td :id "content" :valign "top") ((:div :class "inner") (:when heading (:h1 (:whereas ((breadcrumb (breadcrumb *node* *view* *section*))) ((:a* :class "breadcrumb") breadcrumb) " > ") heading)) (:whereas ((alerts (alerts t))) ((:ul :id "alerts") ((:li :class "head") "[messages]") (dolist (alert alerts) (html (:li alert))))) content (:when (or *prev* *next*) ((:p :id "pagination") (:when *prev* (:a (:uri-to (request-uri) :start *prev* :previous-page-p t) "<< Previous")) (:when (and *prev* *next*) " | ") (:when *next* (:a (:uri-to (request-uri) :start *next* :previous-page-p nil) "Next >>")))))) ((:td :id "right" :class "sidebar" :width 220 :valign "top") ((:div :class "inner") ((:div :id "lighthouse") ((:a :title +site-title+) (:uri-to *root*) ((:img :src "/lighthouse.png" :width 190 :height 160 :alt +site-title+))) ((:div :class "menu" :id "menu-left") (:p (:a (:uri-to *root*) "» home")) (:p (:a (:uri-to :about) "» about")) (:p (:a (:uri-to :blogs) "» blog"))) ((:div :class "menu" :id "menu-right") (:p (:a (:uri-to :groups) "» groups")) (:p (:a (:uri-to :forum) "» discuss")) (:p (:a (:uri-to :videos) "» watch")))) ((:div :id "login") (render-account-menu)) (:panel (:title "Search civilbrights.net") ((:form :action "http://www.google.com/cse" :id "cse-search-box") (:hidden-field "cx" "017355592286771379187:r0uyrcfwuza") (:table (:tr (:td ((:input :type "text" :name "q" :size 16))) (:td ((:input :type "image" :name "sa" :src "/search.png" :title "search")))))) ((:script :src "http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"))) right (with-region-style (:sidebar) (:panel (:uri :quotes) (:collection (featured 'quotes))) (:panel (:uri :books) (:collection (featured 'books))))))))))))) (defhandler ((root root)) (:title +site-title+) (:heading ((:a :class "civilbrights") "/about" "civil" ((:span :style "color: rgb(0, 120, 188)") "brights"))) (:collection (featured 'posts)))