[cl-blog-cvs] CVS update: cl-blog/cl-blog.lisp cl-blog/variable.lisp
Brian Mastenbrook
bmastenbrook at common-lisp.net
Fri Oct 22 01:06:01 UTC 2004
Update of /project/cl-blog/cvsroot/cl-blog
In directory common-lisp.net:/tmp/cvs-serv22119
Modified Files:
cl-blog.lisp variable.lisp
Log Message:
Remove unnecessary *no-css* now that stylesheets are fixed
Date: Fri Oct 22 03:05:58 2004
Author: bmastenbrook
Index: cl-blog/cl-blog.lisp
diff -u cl-blog/cl-blog.lisp:1.6 cl-blog/cl-blog.lisp:1.7
--- cl-blog/cl-blog.lisp:1.6 Wed Oct 20 03:42:11 2004
+++ cl-blog/cl-blog.lisp Fri Oct 22 03:05:58 2004
@@ -76,36 +76,27 @@
"")))
(encode-for-pre (urlstring url))))
-(defvar *no-css* nil)
-
(defvar *use-editor* nil)
-(defclass no-cell-phone-css-mixin () ())
+(defclass use-htmlarea-mixin () ())
-(defmethod handle-request-response :around ((handler no-cell-phone-css-mixin) method request)
- (if (some #'(lambda (e) (search "NetFront" e)) (request-header request :user-agent))
- (let ((*no-css* t)
- (*use-editor* nil))
- (call-next-method))
- (if (some #'(lambda (e) (or
- (and (search "Gecko" e)
- (not (search "WebKit" e)))
- (search "MSIE" e)))
- (request-header request :user-agent))
- (let ((*no-css* nil)
- (*use-editor* (and *allow-html-editor* t)))
+(defmethod handle-request-response :around ((handler use-htmlarea-mixin) method request)
+ (if (some #'(lambda (e) (or
+ (and (search "Gecko" e)
+ (not (search "WebKit" e)))
+ (search "MSIE" e)))
+ (request-header request :user-agent))
+ (let ((*use-editor* (and *allow-html-editor* t)))
(call-next-method))
- (call-next-method))))
+ (call-next-method)))
(defun blog-wrap-page (title body)
`(html
(head (title ,title)
- ,@(unless *no-css*
- (loop for style in *page-css*
+ ,@(loop for style in *page-css*
with primary = t
collect `((link :rel ,(if primary "stylesheet" "alternate stylesheet") :title ,(car style) :type "text/css" :href ,(cdr style)))
do (setf primary nil))
- )
,@(if *use-editor*
'(((script :type "text/javascript")
"_editor_url = \"/htmlarea/\";
@@ -248,11 +239,11 @@
(defclass validate-unhandled-part-mixin ()
((validate-lambda :initarg :validate-lambda :initform (constantly t) :accessor validate-lambda)))
-(defclass main-handler (handler no-cell-phone-css-mixin) ())
+(defclass main-handler (handler use-htmlarea-mixin) ())
(defclass authenticate-mixin () ())
-(defclass new-entry-handler (handler authenticate-mixin no-cell-phone-css-mixin) ())
+(defclass new-entry-handler (handler authenticate-mixin use-htmlarea-mixin) ())
(defun entry-from-regexp-validator (regexp)
(lambda (unhandled-part)
@@ -263,12 +254,12 @@
0))))
(and str (find-entry (parse-integer str))))))
-(defclass display-entry-handler (handler validate-unhandled-part-mixin no-cell-phone-css-mixin)
+(defclass display-entry-handler (handler validate-unhandled-part-mixin use-htmlarea-mixin)
((validate-lambda :initarg :validate-lambda
:initform (entry-from-regexp-validator "^(\\d+)$")
:accessor validate-lambda)))
-(defclass edit-entry-handler (handler validate-unhandled-part-mixin authenticate-mixin no-cell-phone-css-mixin)
+(defclass edit-entry-handler (handler validate-unhandled-part-mixin authenticate-mixin use-htmlarea-mixin)
((validate-lambda :initarg :validate-lambda
:initform (entry-from-regexp-validator "^(\\d+)$")
:accessor validate-lambda)))
@@ -278,7 +269,7 @@
:initform (entry-from-regexp-validator "^(\\d+)$")
:accessor validate-lambda)))
-(defclass delete-entry-handler (handler validate-unhandled-part-mixin authenticate-mixin no-cell-phone-css-mixin)
+(defclass delete-entry-handler (handler validate-unhandled-part-mixin authenticate-mixin use-htmlarea-mixin)
((validate-lambda :initarg :validate-lambda
:initform (entry-from-regexp-validator "^(\\d+)$")
:accessor validate-lambda)))
@@ -292,7 +283,7 @@
0)))
(and str (find str *categories* :test #'string-equal))))))
-(defclass archives-handler (handler no-cell-phone-css-mixin #+nil validate-unhandled-part-mixin)
+(defclass archives-handler (handler use-htmlarea-mixin #+nil validate-unhandled-part-mixin)
(#+nil
(validate-lambda :initarg :validate-lambda
:initform (category-from-regexp-validator "^/(\\w+)$")
@@ -921,4 +912,4 @@
(install-handler (http-listener-handler *listener*)
(make-instance 'trackback-handler)
- (urlstring *trackback-url*) nil)
\ No newline at end of file
+ (urlstring *trackback-url*) nil)
Index: cl-blog/variable.lisp
diff -u cl-blog/variable.lisp:1.2 cl-blog/variable.lisp:1.3
--- cl-blog/variable.lisp:1.2 Tue Oct 19 03:33:06 2004
+++ cl-blog/variable.lisp Fri Oct 22 03:05:58 2004
@@ -1,12 +1,12 @@
(in-package :cl-blog)
-(defparameter *blog-short-name* "A CL Blog!")
+(defparameter *blog-short-name* "Instant Social Conversion")
(defparameter *blog-subtitle* "Notes on technology and politics")
-(defparameter *users* '("a-user"))
+(defparameter *users* '("chandler" "number6"))
-(defparameter *owner-email* "owner at domain")
+(defparameter *owner-email* "chandler at unmutual.info")
(defparameter *people-links* '(("http://planet.lisp.org/" .
"Planet Lisp")
@@ -30,7 +30,8 @@
(defparameter *allow-html-editor* t) ; if non-nil, use HTMLArea at /htmlarea/
; for browsers which support it
-(defparameter *categories* '("Technology"
+(defparameter *categories* '("Politics"
+ "Technology"
"Personal"
"Education"
"Lisp"
@@ -38,10 +39,10 @@
(defparameter *blog-url-root*
(merge-url (make-url :scheme "http"
- :host "localhost" :port 8080)
+ :host "www.iscblog.info")
"/blog/"))
-(defparameter *internal-http-port* 8080)
+(defparameter *internal-http-port* 1082)
;;; You shouldn't need to edit below this line
;;; LINE
@@ -72,11 +73,9 @@
#-sbcl
'araneida:threaded-reverse-proxy-listener
:translations
- #+nil
`((,(araneida:urlstring *blog-url-root*)
,(araneida:urlstring fwd-url)))
- #-nil nil
- :address #(0 0 0 0)
+ :address #(127 0 0 1)
:port (araneida:url-port fwd-url))))
(defparameter *new-entry-url* (merge-url *blog-url-root* "new"))
@@ -93,4 +92,4 @@
(defparameter *email-redirect-url* (merge-url *blog-url-root* "email"))
-(defparameter *trackback-url* (merge-url *blog-url-root* "trackback/"))
\ No newline at end of file
+(defparameter *trackback-url* (merge-url *blog-url-root* "trackback/"))
More information about the Cl-blog-cvs
mailing list