[Lisppaste-cvs] CVS update: lisppaste2/web-server.lisp
Brian Mastenbrook
bmastenbrook at common-lisp.net
Wed Nov 12 05:43:12 UTC 2003
Update of /project/lisppaste/cvsroot/lisppaste2
In directory common-lisp.net:/tmp/cvs-serv9265
Modified Files:
web-server.lisp
Log Message:
Minor changes
Date: Wed Nov 12 00:43:12 2003
Author: bmastenbrook
Index: lisppaste2/web-server.lisp
diff -u lisppaste2/web-server.lisp:1.11 lisppaste2/web-server.lisp:1.12
--- lisppaste2/web-server.lisp:1.11 Wed Nov 12 00:38:46 2003
+++ lisppaste2/web-server.lisp Wed Nov 12 00:43:11 2003
@@ -1,4 +1,4 @@
-;;;; $Id: web-server.lisp,v 1.11 2003/11/12 05:38:46 bmastenbrook Exp $
+;;;; $Id: web-server.lisp,v 1.12 2003/11/12 05:43:11 bmastenbrook Exp $
;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/web-server.lisp,v $
;;;; See the LICENSE file for licensing information.
@@ -38,12 +38,12 @@
" | "
((a :href "http://common-lisp.net/project/lisppaste") "lisppaste home page")))
-(defun time-delta (time)
+(defun time-delta (time &optional (level 2))
(let ((delta (- (get-universal-time) time)))
(cond
((< delta 1) "<Doc Brown>From the <i>future</i>...</Doc Brown>")
((< delta (* 60 60)) (format nil "~A ago" (time-delta-primitive delta 1)))
- (t (format nil "~A ago" (time-delta-primitive delta))))))
+ (t (format nil "~A ago" (time-delta-primitive delta level))))))
(defun first-<-mod (n &rest nums)
(some #'(lambda (n2)
@@ -86,7 +86,7 @@
`(tr ((td :nowrap) ((a :href ,(araneida:urlstring (araneida:merge-url *display-paste-url* (prin1-to-string (paste-number paste)))))
,(concatenate 'string "#" (prin1-to-string (paste-number paste)))))
((td :nowrap) ,(encode-for-pre (paste-user paste)))
- ((td :nowrap) ,(time-delta (paste-universal-time paste)))
+ ((td :nowrap) ,(time-delta (paste-universal-time paste) 1))
((td :width "100%" :bgcolor "#F4F4F4" :nowrap) ,(encode-for-pre (paste-title paste)))
((td :nowrap) ,(length (paste-annotations paste)))))
*pastes*)))
@@ -207,13 +207,13 @@
`((tr (td (p)) (td))
(tr
(td ((a :name ,(prin1-to-string (paste-number a))) "Annotation title:"))
- (td ,(encode-for-pre (paste-title a))))
+ ((td :align "left") ,(encode-for-pre (paste-title a))))
(tr
(td "Annotated by:")
- (td ,(encode-for-pre (paste-user a))))
+ ((td :align "left") ,(encode-for-pre (paste-user a))))
(tr
(td)
- (td ,(time-delta (paste-universal-time a))))
+ ((td :align "left") ,(time-delta (paste-universal-time a))))
(tr
((td :valign "top" :nowrap) "Annotation contents:")
((td :bgcolor "#F4F4F4" :width "100%") (pre ,(encode-for-pre (paste-contents a)))))))
More information about the Lisppaste-cvs
mailing list