X-Git-Url: http://git.kpe.io/?p=wol.git;a=blobdiff_plain;f=genpage.lisp;fp=genpage.lisp;h=451b04f5ad13aad5e97f91247e3c16fbe783d613;hp=4b1dbf44861f24ee43ce04e9593a6e39bb229b92;hb=cf7030dd6955c663f1f1422ff61c3aac41e4b8fa;hpb=5aae1f6dc83069356d33d1cfdbb6dee074e8665c diff --git a/genpage.lisp b/genpage.lisp index 4b1dbf4..451b04f 100644 --- a/genpage.lisp +++ b/genpage.lisp @@ -39,32 +39,32 @@ (defmacro def-stdsite-header (site &body body) `(setf (gethash ',site *header-table*) - #'(lambda (plist command) - (declare (ignorable plist command)) - ,@body))) + #'(lambda (plist command) + (declare (ignorable plist command)) + ,@body))) (defmacro def-stdsite-footer (site &body body) `(setf (gethash ',site *footer-table*) - #'(lambda (plist command) - (declare (ignorable plist command)) - ,@body))) + #'(lambda (plist command) + (declare (ignorable plist command)) + ,@body))) (defmacro def-stdsite-banner (site &body body) `(setf (gethash ',site *banner-table*) - #'(lambda (plist command) - (declare (ignorable plist command)) - ,@body))) + #'(lambda (plist command) + (declare (ignorable plist command)) + ,@body))) (defmacro def-stdsite-contents (site &body body) `(setf (gethash ',site *contents-table*) - #'(lambda (plist command) - (declare (ignorable plist command)) - ,@body))) + #'(lambda (plist command) + (declare (ignorable plist command)) + ,@body))) (defmacro gen-std-head (title site plist command &body body) `(html - (:head + (:head (when ,title (html (:title ,title))) (maybe-gen-header ',site ,plist ,command) @@ -82,15 +82,15 @@ (html ((:div class "stdbodytable") ((:div :style "width:160px;position:fixed;left:3;right:auto;top:0") - ((:img :src "/images/umlisp-logo.png" :alt "logo" - :style "border:0;width:160;height:55")) + ((:img :src "/images/umlisp-logo.png" :alt "logo" + :style "border:0;width:160;height:55")) (maybe-gen-contents ',site ,plist ,command)) ((:div :style "position:absolute;left:170px;top:0") ((:div :style - "font-size:20pt;color:#777;text-align:center;margin-bottom:4pt") - "High Performance Common Lisp Interface to the Unified Medical Langauge System") + "font-size:20pt;color:#777;text-align:center;margin-bottom:4pt") + "High Performance Common Lisp Interface to the Unified Medical Langauge System") ,@body - (gen-std-footer ,site ,plist ,command)))))) + (gen-std-footer ,site ,plist ,command)))))) (defun ml-head (title-str &optional (css "http://b9.com/main.css") altcss) @@ -100,8 +100,8 @@ (when altcss (html ((:link :rel "stylesheet" :type "text/css" - :href (if (eq altcss t) - "http://b9.com/umls.css" altcss))))) + :href (if (eq altcss t) + "http://b9.com/umls.css" altcss))))) (when title-str (html (:title (lml-write-string title-str))))))) @@ -110,7 +110,7 @@ (:xml (dtd-prologue format) (lml-format "~%" - (aif css it "http://b9.com/umlsxml.css")) + (aif css it "http://b9.com/umlsxml.css")) (lml-write-string "") (lml-write-char #\Newline) (when title @@ -148,7 +148,7 @@ (defun page-keyword-format (format) (ecase format ((:html :xhtml :xhtml11 :xhtml10-strict :xhtml10-transitional - :xhtml10-frameset) + :xhtml10-frameset) :html) (:xml :xml) @@ -156,24 +156,24 @@ :text))) (defmacro with-lml-page ((title &key (format :xhtml) css altcss (precompute t)) - &rest body) + &rest body) (let ((fmt (gensym "FMT-"))) `(let ((,fmt ,format)) (with-ml-page (:format (page-keyword-format ,fmt) :precompute ,precompute) - (let ((*html-stream* *modlisp-socket*)) - (prog1 - (progn - (page-prologue ,title ,format ,css ,altcss) - ,@body) - (page-epilogue ,format))))))) + (let ((*html-stream* *modlisp-socket*)) + (prog1 + (progn + (page-prologue ,title ,format ,css ,altcss) + ,@body) + (page-epilogue ,format))))))) (defmacro gen-std-page ((site plist command title &key css altcss - (precompute t) (format :xhtml)) - &body body) + (precompute t) (format :xhtml)) + &body body) `(let ((*print-circle* nil)) (with-lml-page (,title :css ,css :altcss ,altcss :format ,format - :precompute ,precompute) + :precompute ,precompute) (gen-std-body ,site ,plist ,command ,@body)))) @@ -194,7 +194,7 @@ ,@body (lml-princ "")) ((:html :xhtml :xhtml11 :xhtml10-strict :xhtml10-transitional - :xhtml10-frameset) + :xhtml10-frameset) (lml-princ "") @@ -204,17 +204,17 @@ (defun ml-link (page name session-id &key (format :html)) (case format ((:html :xhtml :xhtml11 :xhtml10-strict :xhtml10-transitional - :xhtml10-frameset) + :xhtml10-frameset) (html ((:div class "homelink") "Return to " (with-ml-link ((make-ml-url page :session-id session-id :html t)) - (lml-write-string name)) + (lml-write-string name)) " page."))) ((:xml :ie-xml) (lml-princ "Return to ") (with-ml-link ((make-ml-url page :session-id session-id :html t) - :format format) + :format format) (lml-write-string name)) (lml-write-string " page."))))