Diff of /news-page.lisp [4e5d73] .. [f3064f] Maximize Restore

  Switch to side-by-side view

--- a/news-page.lisp
+++ b/news-page.lisp
@@ -1,3 +1,5 @@
+(in-package :sbcl-page)
+
 (define-page :news "News" "news" news-page)
 
 (define-page :all-news "All News" "all-news" all-news-page :index-order :none)
@@ -6,68 +8,80 @@
 
 (defmacro define-news (version-number &rest major-items)
   `(progn
-    (setf *recent-news* (remove ,version-number *recent-news* :key #'car :test #'equalp))
-    (push-end (cons ,version-number ',major-items) *recent-news*)))
+     (setf *recent-news* (remove ,version-number *recent-news* :key #'car :test #'equalp))
+     (push-end (cons ,version-number ',major-items) *recent-news*)))
 
 (defun whitespace-onlyp (s)
   (scan "^\\s+$" s))
 
-(defun format-as-ul (list &key (toplevel t))
-  `((:|ul| :|class| "news-items")
-    ,@(remove nil
-              (mapcar #'(lambda (item)
-                          (if (not
-                               (or (and (listp item) (eql (length item) 1)
-                                        (whitespace-onlyp (car item)))
-                                   (and (not (listp item)) (whitespace-onlyp item))))
-                              (if (listp item)
-                                  `((:|li| :|class| "news-item") ,(car item)
-                                    ,@(if (cdr item)
-                                          (list (format-as-ul (cdr item) :toplevel nil))))
-                                  `((:|li| :|class| "news-item") ,item)))) list))))
+(defun format-as-ul (list)
+  (<ul class= "news-items">
+       (remove
+        nil
+        (mapcar
+         (lambda (item)
+           (if (not
+                (or (and (listp item) (eql (length item) 1)
+                         (whitespace-onlyp (car item)))
+                    (and (not (listp item)) (whitespace-onlyp item))))
+               (if (listp item)
+                   (<li class= "news-item">
+                        (car item)
+                        (if (cdr item)
+                            (list (format-as-ul (cdr item)))))
+                   (<li class= "news-item"> item)))) list))))
 
 (defun news-page ()
-  `(((:|a| :|name| "top") "")
-    
-    (:|p| "New SBCL versions are usually released at the end of each
-month: check the " ((:|a| :|href| "http://sourceforge.net/project/showfiles.php?group_id=1373")
-                    "Sourceforge File List")
-     " to see the current version. The new features of the two most recent SBCL releases are listed below.")
+  (list
+   (<a name= "top"> "")
+   (<p> "New SBCL versions are usually released at the end of each
+month: check the "
+        (<a href= "http://sourceforge.net/project/showfiles.php?group_id=1373">
+            "Sourceforge File List")
+        " to see the current version. The new features of the two most recent SBCL releases are listed below.")
 
-    (:|p| "Please see the " ((:|a| :|href| ,(page-link :all-news))
-"complete news page") " for details on all historical SBCL releases.")
+   (<p> "Please see the "
+        (<a href=,(page-link :all-news)>
+            "complete news page")
+        " for details on all historical SBCL releases.")
 
-    ,@(mapcar #'(lambda (news)
-              `(:|p|
-                ((:|a| :|name| ,(car news)) "")
-                (:|h2| ,(format nil "New in version ~A" (car news)))
-                ((:|div| :|class| "back-to-top-link") ((:|a| :|href| "#top" ) "Back to top"))
+   (mapcar
+    (lambda (news)
+      (<p>
+       (<a href=,(car news)> "")
+       (<h2> (format nil "New in version ~A" (car news)))
+       (<div class= "back-to-top-link">
+             (<a href="#top"> "Back to top"))
                 
-                ,(format-as-ul (cdr news))))
-              (loop for i from 1 to 2
-                    for j in *recent-news*
-                    collect j))
-    ((:|a| :|href| ,(page-link :all-news)) "Older SBCL releases")))
+       (format-as-ul (cdr news))))
+    (loop for i from 1 to 2
+       for j in *recent-news*
+       collect j))
+   (<a href=,(page-link :all-news)>
+       "Older SBCL releases")))
 
 (defun all-news-page ()
-  `(((:|a| :|name| "top") "")
-    
-    (:|p| "New SBCL versions are usually released at the end of each
-month: check the " ((:|a| :|href| "http://sourceforge.net/project/showfiles.php?group_id=1373")
-                    "Sourceforge File List")
-     " to see the current version. The new features of all SBCL releases are listed below.")
+  (list
+   (<a name= "top"> "")
+   (<p> "New SBCL versions are usually released at the end of each
+month: check the "
+        (<a href= "http://sourceforge.net/project/showfiles.php?group_id=1373">
+            "Sourceforge File List")
+        " to see the current version. The new features of all SBCL releases are listed below.")
 
-    ((:|ul| :|class| "news-links")
-     ,@(mapcar #'(lambda (news)
-                   `(:|li| ((:|a| :|href| ,(concatenate 'string "#" (car news)))
-                            ,(car news)) " "))
-               *recent-news*))
+   (<ul class= "news-links">
+        (mapcar (lambda (news)
+                  (<li> (<a href=,(concatenate 'string "#" (car news))>
+                            (car news)) " "))
+                *recent-news*))
 
-    ,@(mapcar #'(lambda (news)
-              `(:|p|
-                ((:|a| :|name| ,(car news)) "")
-                (:|h2| ,(format nil "New in version ~A" (car news)))
-                ((:|div| :|class| "back-to-top-link") ((:|a| :|href| "#top" ) "Back to top"))
+   (mapcar
+    (lambda (news)
+      (<p>
+       (<a href=,(car news)> "")
+       (<h2> (format nil "New in version ~A" (car news)))
+       (<div class= "back-to-top-link">
+             (<a href="#top"> "Back to top"))
                 
-                ,(format-as-ul (cdr news))))
-          *recent-news*)))
+       (format-as-ul (cdr news))))
+    *recent-news*)))