r3071: *** empty log message ***
[kmrcl.git] / web-utils-aserve.lisp
index f6b9c75be9bf85915fa1c26c8f85a936b8c3aa0d..74a518a308aee40c5f42f20f67575e68234a7c82 100644 (file)
@@ -1,3 +1,4 @@
+
 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
 ;;;; *************************************************************************
 ;;;; FILE IDENTIFICATION
@@ -7,7 +8,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: web-utils-aserve.lisp,v 1.4 2002/10/10 16:23:48 kevin Exp $
+;;;; $Id: web-utils-aserve.lisp,v 1.5 2002/10/16 17:37:18 kevin Exp $
 ;;;;
 ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
     (princ-http "Browser Home"))
   (princ-http "</font><p></p>"))
 
-(defun head (title-str)
+(defun head (title-str &key css)
+  (unless css
+    (setq css "http://b9.com/main.css"))
   (net.html.generator:html 
-   (:head 
-    "<LINK rel=\"stylesheet\" href=\"http://www.med-info.com/main.css\" type=\"text/css\">"
+   (:head
+    (princ-http (format nil "<LINK rel=\"stylesheet\" href=\"~A\" type=\"text/css\">" css))
     (:title (:princ-safe title-str)))))
 
 
         ,@body)
      (princ-http "</pagedata>")))
 
-(defmacro with-trans-page (title &rest body)
+(defmacro with-html-page ((title &key css) &rest body)
   `(prog1
        (progn
          (print-http "<?xml version=\"1.0\" standalone=\"yes\"?>")
          (print-http " \"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">")
          (print-http "")
          (print-http "<html xmlns=\"http://www.w3.org/1999/xhtml\">")
-         (head ,title)
+         (head ,title :css ,css)
          (print-http "<body bgcolor=\"#FFFFFF\">")
          (prog1 
              ,@body