+
;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Apr 2000
;;;;
-;;;; $Id: web-utils-aserve.lisp,v 1.2 2002/10/06 13:30:17 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
+;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
-;;;; Kmrcl users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the GNU General Public License.
+;;;; KMRCL users are granted the rights to distribute and use this software
+;;;; as governed by the terms of the Lisp Lesser GNU Public License
+;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
;;;; *************************************************************************
-
(in-package :kmrcl)
-(declaim (optimize (speed 3) (safety 1)))
+(declaim (optimize (speed 3) (safety 1) (compilation-speed 0) (debug 3)))
;;; AllegroServe interaction functions
(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