[clhp-cvs] CVS update: public_html/view-source.clhp public_html/index.clhp public_html/funcs.lisp

Anthony Ventimiglia aventimiglia at common-lisp.net
Thu Nov 13 20:06:15 UTC 2003


Update of /project/clhp/cvsroot/public_html
In directory common-lisp.net:/tmp/cvs-serv24505

Modified Files:
	index.clhp funcs.lisp 
Added Files:
	view-source.clhp 
Log Message:
Beginning work on View-Source page.

Date: Thu Nov 13 15:06:15 2003
Author: aventimiglia



Index: public_html/index.clhp
diff -u public_html/index.clhp:1.6 public_html/index.clhp:1.7
--- public_html/index.clhp:1.6	Thu Nov 13 12:24:40 2003
+++ public_html/index.clhp	Thu Nov 13 15:06:14 2003
@@ -31,62 +31,24 @@
          <li><a href=\"http://common-lisp.net/mailman/listinfo/clhp-cvs\">clhp-cvs</a> Reports on CVS activity.</li>
 </ul>")
        ("Documentation"
-	"Sorry, right now you're left to reading the source on how CLHP specific functions and variables work, but I'll have some basic documentation coming soon")))
+	"Sorry, right now you're left to reading the source on how CLHP specific functions and variables work, but I'll have some basic documentation coming soon. If you want to see examples of CLHP in action, click the <b>View-Source</b> link at the top of any of the pages on this site.")))
            
        
 
 ;; Start of page output
 (echon +doctype+)
+?>
 
-(echon
- (tag '|html|
-      (list
-       (head "CLHP the Common Lisp Hypertext Preprocessor")
-       (tag '|body|
-	    (page-body "$Date: 2003/11/13 17:24:40 $")))))
-
-
-;(defvar *title* "CLHP the Common Lisp Hypertext Preprocessor")
-;(defvar *readme* "/home/ant/src/clhp/README")
-;(defvar *links* '(("Download" "ftp://common-lisp.net/pub/project/clhp")))
-;                  
-;
-;(defun dump-text-file (file-name)
-;  (with-open-file
-;   (stream file-name :direction :input :if-does-not-exist :error)
-;   (let* ((buffer-size (file-length stream))
-;          (buffer (make-array buffer-size :element-type 'character)))
-;     (read-sequence buffer stream)
-;     buffer)))
-;
-;(defun link (pair)
-;  "Takes a cons pair (CONTENT URI) and forms a link."
-;  (tag "a" "href" (cadr pair) (car pair)))
-;
-;(echo
-; (tag "html"
-;      (list
-;       (tag "head"
-;            (tag "title" *title*))
-;       (tag "body"
-;            (list
-;             (tag "h1" *title*)
-;             (tag "hr")
-;             (tag "p" (list
-;                        "I apologize for the lack of content on this site, "
-;                        "CLHP is still in it's early stages, so this simply "
-;                        "contains the README file, with the addition of some "
-;                        "extra links"))
-;             (tag "p"
-;                  (list
-;                   "To get the latest version, click the "
-;                   (link (assoc "Download" *links* :test #'string=))
-;                   " link. To checkout the CVS via anonymous pserver cvs, use "
-;                   (tag "b" (list
-;                             "anonymous at common-lisp.net:/project/clhp/cvsroot "
-;                             "co clhp"))))                 
-;             (tag "h3" "README")
-;             (tag "hr")
-;             (tag "pre" (dump-text-file *readme*)))))))
-;(format t "~&")
-?>
\ No newline at end of file
+<html>
+
+<?clhp (echon (head "CLHP the Common Lisp Hypertext Preprocessor")) ?>
+
+<body>
+
+<?clhp
+(loop for tag in (page-body "$Date: 2003/11/13 20:06:14 $")
+      do (echon tag))
+?>
+
+</body>
+</html>


Index: public_html/funcs.lisp
diff -u public_html/funcs.lisp:1.4 public_html/funcs.lisp:1.5
--- public_html/funcs.lisp:1.4	Thu Nov 13 12:27:05 2003
+++ public_html/funcs.lisp	Thu Nov 13 15:06:14 2003
@@ -1,4 +1,4 @@
-;; $Id: funcs.lisp,v 1.4 2003/11/13 17:27:05 aventimiglia Exp $
+;; $Id: funcs.lisp,v 1.5 2003/11/13 20:06:14 aventimiglia Exp $
 ;;
 ;; Functions used on clhp website
 ;; at http://common-lisp.net/project/clhp
@@ -7,8 +7,8 @@
 (defpackage :net.common-lisp.aventimiglia.clhp.www
   (:nicknames #:www)
   (:use #:cl #:clhp)
-  (:export #:+doctype+ #:echon #:head #:*page-sections*
-	   #:page-body))
+  (:export #:+doctype+ #:echon #:head #:*page-sections* #:page-body
+	   #:page-header))
 
 (in-package :www)
 
@@ -18,9 +18,11 @@
   '(("http://common-lisp.net/" "Common-Lisp.net")))
 
 (defconstant +site-links+
-  '(("http://common-lisp.net/cgi-bin/viewcvs.cgi/clhp/?cvsroot=clhp"
+  '(("/" "Home")
+    ("http://common-lisp.net/cgi-bin/viewcvs.cgi/clhp/?cvsroot=clhp"
      "ViewCVS")
     ("ftp://common-lisp.net/pub/project/clhp/" "Downloads")))
+    
 
 (defvar *page-sections* nil
   "These are the text sections of the page. Each section is a element
@@ -53,7 +55,12 @@
 	     (list caption " "))
 	(tag '|span| '|class| "headerSubTitle" subtitle)
 	(tag '|div| '|class| "headerLinks" (make-links +header-links+))
-	(tag '|div| '|class| "siteMap" (make-links +site-links+)))))
+	(tag '|div| '|class| "siteMap"
+	     (make-links
+	      (append +site-links+
+		      (list (list (format nil "/view-source.clhp?page=~A"
+				  (gethash :script_name *server-env*))
+				  "View-Source"))))))))
 
 (defun page-body (cvs-date)
   (list





More information about the Clhp-cvs mailing list