Ticket #310: make-index-call-cc.org.diff

File make-index-call-cc.org.diff, 4.3 KB (added by Mario Domenech Goulart, 14 years ago)
  • scripts/make-egg-index.scm

    diff --git a/scripts/make-egg-index.scm b/scripts/make-egg-index.scm
    index 055b987..5afb9d1 100644
    a b  
    6161  (let ((title (sprintf "Eggs Unlimited (release branch ~a)" *major-version*))
    6262        (eggs (gather-egg-information dir)))
    6363    (sxml->html
    64      `((literal "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
    65        (literal "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">")
    66        (html
     64     `((literal "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">")
     65       (html (@ (xmlns "http://www.w3.org/1999/xhtml"))
    6766        ,(header title)
    6867        (body
    69          ,(titlebar title)
    70          ,(sidebar)
     68         ,(menu)
    7169         ,(content (prelude title)
    7270                   (emit-egg-information eggs))
    7371         ,(trailer)))))))
    7472
    7573(define (wiki-link path desc)
    76   `(a (@ (href "http://chicken.wiki.br/" ,path))
    77       ,desc))
    78 
    79 (define (sidebar)
    80   `(div (@ (id "toc-links"))
    81         (div (@ (id "toc"))
    82              (p ,(wiki-link "" "Home") (br)
    83                 ,(wiki-link "manual/index" "Manual") (br)
    84                 ,(wiki-link "eggs" "Eggs") (br)
    85                 ,(wiki-link "users" "Users") (br)
    86                 ))))
     74  `(a (@ (href "http://wiki.call-cc.org/" ,path)) ,desc))
     75
     76(define (menu)
     77  `(div (@ (id "menu"))
     78        (ul (li ,(wiki-link "" "Home"))
     79            (li (a (@ (href "http://code.call-cc.org")) "Download"))
     80            (li ,(wiki-link "manual/index" "Manual"))
     81            (li ,(wiki-link "eggs" "Eggs"))
     82            (li (a (@ (href "http://chickadee.call-cc.org")) "API Browser"))
     83            (li (a (@ (href "http://bugs.call-cc.org")) "Bugs"))
     84            )))
    8785
    8886(define (content . body)
    89   `(div (@ (id "content-box"))
    90         (div (@ (class "content"))
    91              ,body)))
     87  `(div (@ (id "content"))
     88             ,body))
    9289
    9390(define (header title)
    9491  `(head
     
    9693;;       ,+stylesheet+)
    9794    (link (@ (rel "stylesheet")
    9895             (type "text/css")
    99              (href "http://chicken.wiki.br/common-css")))
     96             (href "http://wiki.call-cc.org/chicken.css")))
    10097    (title ,title)))
    10198
    102 (define (titlebar title)
    103   `(div (@ (id "header"))
    104         (h1 (a (@ (href "http://chicken.wiki.br/eggs"))
    105                ,title))))
    106 
    10799(define (prelude title)
    108   `((p (img (@
    109              (style "float: right;")
    110              (src "http://www.call-with-current-continuation.org/eggs/3/egg.jpg"))))
     100  `((h2 "Eggs Unlimited (release branch 4)")
    111101    (p (b "Last updated: " ,(seconds->string (current-seconds))))
    112102    (p "A library of extensions for the Chicken Scheme system.")
    113103    (h2 "Installation")
     
    129119    (p "For more information, enter")
    130120    (pre "  chicken-install -help\n")
    131121    (p "If you would like to access the subversion repository, see the "
    132        (a (@ (href "http://chicken.wiki.br/eggs tutorial"))
     122       (a (@ (href "http://wiki.call-cc.org/eggs tutorial"))
    133123          "Egg tutorial") ".")
    134124    (p "If you are looking for 3rd party libraries used by one of the extensions, "
    135125       "check out the CHICKEN "
     
    177167                (h3 (a (@ (href "#category-list"))
    178168                       ,catname))
    179169                (table
    180                  (tr (th "Name") (th "Description") (th "License") (th "author") (th "maintainer") (th "version"))
     170                 (tr (th "Name") (th "Description") (th "License") (th "Author") (th "Maintainer") (th "Version"))
    181171                 ,@eggs)))))))
    182172   +categories+))
    183173
     
    193183              (warning "extension has .meta entry of incorrect type and will not be listed" (car egg) p x)
    194184              (return '()))))
    195185     (d "  ~a   ~a" (car egg) (prop 'version "HEAD" any?))
    196      `((tr (td (a (@ (href ,(sprintf "http://chicken.wiki.br/eggref/~a/~a" *major-version* (car egg))))
     186     `((tr (td (a (@ (href ,(sprintf "http://wiki.call-cc.org/eggref/~a/~a" *major-version* (car egg))))
    197187                  ,(symbol->string (car egg))))
    198188           (td ,(prop 'synopsis "unknown" string?))
    199189           (td ,(prop 'license "unknown" name?))
     
    240230   +link-regexp+
    241231   str
    242232   (lambda (name)  ;; wiki username
    243      `(a (@ (href ,(string-append "http://chicken.wiki.br/users/"
     233     `(a (@ (href ,(string-append "http://wiki.call-cc.org/users/"
    244234                                  (string-substitute " " "-" name 'global))))
    245235         ,name))
    246236   (lambda (x)     ;; raw HTML chunk